Multiprocess and http in DeepStream

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
DeepStream 6.1
• Issue Type( questions, new requirements, bugs)

Here is my program structure:

I’m trying to use multiprocessing to produce multiple subprocess to run deepstream app by my server in C++. I write a http program to control the producing subprocess. When a request coming, the main process will produce a subproccess runing deepstream and create a pipe to communicate this subprocess and main process .To filter the model detect result, I have to use http to receive another request to get filter params like confidence and detect scope, then transmit the filter params to corresponding subprocess by pipe in a thread of subprocess. I use a global variable called “global_alarm_params” to save the params in project and make sure that every coding file can get this global variable.

I have already test the multiprocess logic and the data transmitting by pipe in thread logic, they are all correct.

When I run the coding, create the first, second subprocess successfully, but creating the third subprocess, the error occurd like this, could not run the third subprocess successfully.

Device is in streaming mode
ERROR from sink_sub_bin_encoder1: Could not get/set settings from/on resource.
Debug info: gstv4l2object.c(3507): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/nvv4l2h264enc:sink_sub_bin_encoder1:
ERROR from sink_bin_queue: Internal data stream error.


The another problem is in this coding:

process_meta (AppCtx * appCtx, NvDsBatchMeta * batch_meta, GstBuffer * buf = nullptr)
{
  // For single source always display text either with demuxer or with tiler
  if (!appCtx->config.tiled_display_config.enable ||
      appCtx->config.num_source_sub_bins == 1) {
    appCtx->show_bbox_text = 1;
  }
    // test global variable
      std::cout << "params confidence:" << global_alarm_params.confidence << std::endl;

When I start the deepstream subprocess and try to change the params in subprocess by http of main process and the pipe, and cout it in function “process meta” in file “deepstream_app.c”, it occurd a very confusing error:

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.948: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.948: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.948: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor
params confidence:0.8

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.971: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor
params confidence:0.8

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.996: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.996: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor

(deepstream-app:271495): GStreamer-CRITICAL **: 10:30:22.996: 0x7f1c7413b5e0: failed to wake event: Bad file descriptor

If you meet this question or have the same requirement like me, please contact with me to solve this together.

Thank you so much for your help.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

There are limited resources for CPU, GPU, Memory, Encoder, Deocder… If you run multiple deepstream apps in parallel, it will repeatedly consume resources. Can the following demo meet your needs:sources\apps\sample_apps\deepstream-server?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.