Nvargus-Daemon for each individual CameraDevice

Is it possible to run multiple instances of nvargus-daemon, one for each camera device?

I can provide more information as needed, but basically I would like to handle failures in the camera provider by restarting instances of the daemon. I am seeing failures very similar to this topic: JP5.1 nvarguscamera doesn't recover from single NVCSI failure - #36 by JerryChang

Unlike that topic, I cannot terminate the process which has my Gstreamer pipeline. Trying to stop the pipeline from playing leads to the same errors, and trying to create a new nvarguscamerasrc fails because the resource is already owned.

By restarting a background process like the daemon, I can avoid terminating my main process with the pipeline. But restarting the nvargus-daemon causes all camera streams to be affect, and I do not want to impact the successful streams when there is a failure with one. (I am streaming 8 cameras on my custom carrier board.) Until now, I have been running without daemon doing this: Argus (Tegra Multimedia API) in multi-process mode does not terminate - #5 by ShaneCCC

I am running my pipeline on AGX Xavier with Jetpack 5.1.1. Let me know what additional information I can provide.

You can build the argus APP by DISABLE_MULTIPROCESS by below command.

cmake -DDISABLE_MULTIPROCESS=ON ..

Thank you for the quick response.

From what I understand reading these two posts…

… DISABLE_MULTIPROCESS=ON will build the Argus application so that it does not link to libnvargus_socketclient.so. I.e., the CameraProvider Argus calls will not be via socket to the Nvargus-daemon - daemon should NOT be running.

For example, with DISABLE_MULTIPROCESS=ON, CameraProvider:: createCaptureSession(CameraDevice*, Status*) would NOT be handled by the daemon, it would be directly handled by libnvargus.so. (Refer to API for CameraProvider here.)

I hope my understanding is correct.

However, what I would like is that the CameraProvider in a process calls ONE instance daemon process FOR EACH CameraDevice. For example, one daemon process handles CaptureSession instance #1, another daemon with another PID handles CaptureSession instance #2, etc.

In that case, rather than DISABLE_MULTIPROCESS=ON, I would like to build the Argus application with something like ENABLE_MULTIPROCESS_MULTIPLE_DAEMONS=ON (a hypothetical build flag).

Is something like this possible?

As I mentioned above, the reason I am wondering if this is possible is that for all releases of Jetpack 5.X.X that I have tested, the Nvargus-Daemon can have failures and needs to be restarted. I gave an example of a failure above.

If all CaptureSession instances are handled by one daemon, and the daemon fails, then all stream will fail. On the other hand, if there are multiple daemon processes, I can restart each individually, and there should be no impact on other CaptureSession instances.

I cannot build with DISABLE_MULTIPROCESS=ON because I do not want to start and terminate multiple application processes, one for each CameraDevice.

I hope this makes more sense. Please let me know if it is unclear or if you need more information.

I don’t think so.
What’s my suggest is build by DISABLE_MULTIPROCESS=ON and terminal each failed camera and restart it.

Understood that this is not possible. Thanks for letting me know.

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