I am trying to run deepstream-transfer-learning-app as a system service, using a single CSI camera as a source and fakesink as the only sink. Although the app runs properly when run from terminal, attempts to run it as a system service result in nvargus crashing.
When I run the program from terminal, I find it runs smoothly for at least 1 hour. However, when I try to run the same program as a system service it stops after some ~35 seconds, displaying the following information in the associated journalctl log:
SYNC_IOC_FENCE_INFO ioctl failed with 9
ERROR from src_elem: DISCONNECTED
Debug info: Argus Error Status
CONSUMER: ERROR OCCURRED
Quitting
SYNC_IOC_FENCE_INFO ioctl failed with 9
GST_ARGUS: Cleaning up
App run failed
My service definition file looks like this (replacing by full paths):
[Unit]
Description=Deepstream App Service
StartLimitIntervalSec=0[Service]
ExecStart=/opt/nvidia/deepstream/<PATH_TO_PROGRAM>/deepstream-transfer-learning-app -c <PATH_TO_CONFIG_FILE>
Type=simple
Restart=no[Install]
WantedBy=multi-user.target
I tried to check nvargus-daemon by initializing it from terminal using sudo /usr/sbin/nvargus-daemon, and I found the following information:
=== NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections…=== deepstream-transfer-learning-app[31405]: Connection established (7F7D9C91D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 593)
SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
Acquiring SCF Camera device source via index 1 has failed. === deepstream-transfer-learning-app[31405]: CameraProvider initialized (0x7f789e4d80)LSC: LSC surface is not based on full res!
CRASH STARTS HERE
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 542)
=== deepstream-transfer-learning-app[31405]: CameraProvider destroyed (0x7f789e4d80)=== deepstream-transfer-learning-app[31405]: Connection closed (7F7D9C91D0)=== deepstream-transfer-learning-app[31405]: Connection cleaned up (7F7D9C91D0)
I have tried setting the user in the system definition file and calling the application from a script that I later called from the service definition file. Both situations resulted in the same error. Do you have any idea of what may be causing this situation?
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) Nvidia Jetson Nano Developer Kit 4GB
• DeepStream Version 6.0.1
• JetPack Version (valid for Jetson only) 4.6.2
• TensorRT Version 8.2.1