Hi,
We written a custom camera driver and trying to use nvcamera-daemon to run two cameras via gstreamer. When running two cameras via gstreamer, the nvcamera daemon seg fault.
I am using Jetson 3.3. I have added the logs below with the gst-launch commands.
Regards
Paul
Log for the first camera
GST_DEBUG=3 gst-launch-1.0 nvcamerasrc sensor-id=0 ! "video/x-raw(memory:NVMM),height=800, width=1280, format=I420, framerate=60/1" ! nvvidconv ! xvimagesink -ev
Setting pipeline to PAUSED ...
Socket read error. Camera Daemon stopped functioning.....
0:00:00.687844708 23051 0x5c7960 ERROR nvcamerasrc gstnvcamerasrc.cpp:2448:gst_nvcamera_open:<nvcamerasrc0> REQ_NVCAM_CREATE_SESSION to camera_daemon failed
gst_nvcamera_open() failed ret=0
0:00:00.687964132 23051 0x5c7960 WARN basesrc gstbasesrc.c:3354:gst_base_src_start:<nvcamerasrc0> error: Failed to start
0:00:00.688118660 23051 0x5c7960 WARN basesrc gstbasesrc.c:3725:gst_base_src_activate_push:<nvcamerasrc0> Failed to start in push mode
0:00:00.688156932 23051 0x5c7960 WARN GST_PADS gstpad.c:1106:gst_pad_set_active:<nvcamerasrc0:src> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...
Log for the second camera
GST_DEBUG=3 gst-launch-1.0 nvcamerasrc sensor-id=3 ! "video/x-raw(memory:NVMM),height=800, width=1280, format=I420, framerate=60/1" ! nvvidconv ! xvimagesink -ev
Setting pipeline to PAUSED ...
Available Sensor modes :
1280 x 800 FR=100.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
0:00:00.587072345 23003 0x5c50f0 FIXME default gstutils.c:3766:gst_pad_create_stream_id_internal:<nvcamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
New clock: GstSystemClock
NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 1280x800 FrameRate = 100.000000 ...
/GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0.GstPad:src: caps = "video/x-raw\(memory:NVMM\)\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ format\=\(string\)I420\,\ framerate\=\(fraction\)60/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\(memory:NVMM\)\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ format\=\(string\)I420\,\ framerate\=\(fraction\)60/1"
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ framerate\=\(fraction\)60/1\,\ format\=\(string\)YUY2"
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ framerate\=\(fraction\)60/1\,\ format\=\(string\)YUY2"
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = "video/x-raw\(memory:NVMM\)\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ format\=\(string\)I420\,\ framerate\=\(fraction\)60/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\(memory:NVMM\)\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ format\=\(string\)I420\,\ framerate\=\(fraction\)60/1"
Socket read error. Camera Daemon stopped functioning.....
Received error from camera daemon....exiting....
Got EOS from element "pipeline0".
Execution ended after 0:00:08.380207659
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:08.969267747 23003 0x5b7610 ERROR nvcamerasrc gstnvcamerasrc.cpp:2027:gst_nvcamera_close:<nvcamerasrc0> NvCameraSrc: terminate session request failed
Setting pipeline to NULL ...
Freeing pipeline ...
Log for the nvcamera-daemon
FiberScheduler: fiber 0x7f30001390 exiting
Thread 9 getting next capture
disposing CC 943 Session 2
Thread 11 is waiting
Thread 9 is waiting
Thread 1 is waiting
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
Created fiber 0x7f30001390 for CC 948 globalID 948 session 2
Thread 7 is working on CC 948 session 2 globalID 948 step 0
CC 948 session 2 completed step 0 in fiber 0x7f30001390
cc 948(847) session 2 runCount=847 runIspOut=843, latest ccId=943
AC Stats Delay Count:5
CC 948 session 2 completed step 1 in fiber 0x7f30001390
NV AE and AfApply algorithms are active.
CC 948 session 2 completed step 2 in fiber 0x7f30001390
CC 948 session 2 completed step 3 in fiber 0x7f30001390
CC 948 session 2 completed step 4 in fiber 0x7f30001390
CC 948 session 2 completed step 5 in fiber 0x7f30001390
CC 948 session 2 completed step 6 in fiber 0x7f30001390
CC 948 session 2 processing step 7 in fiber 0x7f30001390
FiberScheduler: cc 948, session 2, fiber 0x7f30001390 in progress...
Thread 7 getting next capture
Thread 8 is waiting
Thread 7 is waiting
Created fiber 0x7f30000eb0 for CC 949 globalID 949 session 2
Thread 3 is working on CC 949 session 2 globalID 949 step 0
CC 949 session 2 completed step 0 in fiber 0x7f30000eb0
cc 949(848) session 2 runCount=848 runIspOut=843, latest ccId=943
cc 949(848) session 2 waiting
FiberScheduler: cc 944, session 2, fiber 0x7f30001050 succeeded async operation
Thread 6 is working on CC 944 session 2 globalID 944 step 8
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
exposureTime=0.041667 analogGain=2.828104 digitalGain=1.000000 commonGain=0.117838 expComp=1.000000
lux in Statsupdate: isAohdrEnable=0 currentSceneLux 222.655
CC 944 session 2 completed step 8 in fiber 0x7f30001050
CC 944 session 2 completed step 9 in fiber 0x7f30001050
CC 944 session 2 completed step 10 in fiber 0x7f30001050
NV AF analysis algorithm is active.
AfAnalysis cc 944 push FK_ISP_RUN_NUMBER=844.
CC 944 session 2 completed step 11 in fiber 0x7f30001050
cc 949(848) session 2 wait completed by ispOut cc 944
AC Stats Delay Count:5
CC 944 session 2 completed step 12 in fiber 0x7f30001050
CC 949 session 2 completed step 1 in fiber 0x7f30000eb0
CC 944 session 2 completed step 13 in fiber 0x7f30001050
NV AE and AfApply algorithms are active.
CC 944 session 2 completed step 14 in fiber 0x7f30001050
CC 944 session 2 completed step 15 in fiber 0x7f30001050
CC 944 session 2 completed step 16 in fiber 0x7f30001050
CC 944 session 2 completed step 17 in fiber 0x7f30001050
FiberScheduler: cc 944, session 2, fiber 0x7f30001050 complete
FiberScheduler: fiber 0x7f30001050 exiting
Thread 6 getting next capture
disposing CC 944 Session 2
Thread 6 is waiting
Thread 2 is waiting
Thread 12 is waiting
CC 949 session 2 completed step 2 in fiber 0x7f30000eb0
CC 949 session 2 completed step 3 in fiber 0x7f30000eb0
CC 949 session 2 completed step 4 in fiber 0x7f30000eb0
CC 949 session 2 completed step 5 in fiber 0x7f30000eb0
CC 949 session 2 completed step 6 in fiber 0x7f30000eb0
CC 949 session 2 processing step 7 in fiber 0x7f30000eb0
FiberScheduler: cc 949, session 2, fiber 0x7f30000eb0 in progress...
Thread 3 getting next capture
Thread 3 is waiting
Thread 4 is waiting
FiberScheduler: cc 945, session 2, fiber 0x7f300008c0 succeeded async operation
Thread 10 is working on CC 945 session 2 globalID 945 step 8
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
exposureTime=0.041667 analogGain=2.832344 digitalGain=1.000000 commonGain=0.118014 expComp=1.000000
lux in Statsupdate: isAohdrEnable=0 currentSceneLux 218.791
CC 945 session 2 completed step 8 in fiber 0x7f300008c0
CC 945 session 2 completed step 9 in fiber 0x7f300008c0
CC 945 session 2 completed step 10 in fiber 0x7f300008c0
NV AF analysis algorithm is active.
AfAnalysis cc 945 push FK_ISP_RUN_NUMBER=845.
CC 945 session 2 completed step 11 in fiber 0x7f300008c0
CC 945 session 2 completed step 12 in fiber 0x7f300008c0
CC 945 session 2 completed step 13 in fiber 0x7f300008c0
CC 945 session 2 completed step 14 in fiber 0x7f300008c0
CC 945 session 2 completed step 15 in fiber 0x7f300008c0
CC 945 session 2 completed step 16 in fiber 0x7f300008c0
Thread 5 is working on CC 950 session 2 globalID 950 step 0
CC 950 session 2 completed step 0 in fiber 0x7f30001050
cc 950(849) session 2 runCount=849 runIspOut=845, latest ccId=945
AC Stats Delay Count:5
CC 950 session 2 completed step 1 in fiber 0x7f30001050
NV AE and AfApply algorithms are active.
Created fiber 0x7f30001050 for CC 950 globalID 950 session 2
CC 945 session 2 completed step 17 in fiber 0x7f300008c0
FiberScheduler: cc 945, session 2, fiber 0x7f300008c0 complete
FiberScheduler: fiber 0x7f300008c0 exiting
Thread 10 getting next capture
disposing CC 945 Session 2
Thread 11 is waiting
Thread 10 is waiting
Thread 9 is waiting
CC 950 session 2 completed step 2 in fiber 0x7f30001050
CC 950 session 2 completed step 3 in fiber 0x7f30001050
CC 950 session 2 completed step 4 in fiber 0x7f30001050
CC 950 session 2 completed step 5 in fiber 0x7f30001050
CC 950 session 2 completed step 6 in fiber 0x7f30001050
CC 950 session 2 processing step 7 in fiber 0x7f30001050
FiberScheduler: cc 950, session 2, fiber 0x7f30001050 in progress...
Thread 5 getting next capture
Thread 1 is waiting
Thread 5 is waiting
FiberScheduler: cc 946, session 2, fiber 0x7f300011f0 succeeded async operation
Thread 8 is working on CC 946 session 2 globalID 946 step 8
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
exposureTime=0.041667 analogGain=2.867987 digitalGain=1.000000 commonGain=0.119499 expComp=1.000000
lux in Statsupdate: isAohdrEnable=0 currentSceneLux 200.021
CC 946 session 2 completed step 8 in fiber 0x7f300011f0
CC 946 session 2 completed step 9 in fiber 0x7f300011f0
CC 946 session 2 completed step 10 in fiber 0x7f300011f0
NV AF analysis algorithm is active.
AfAnalysis cc 946 push FK_ISP_RUN_NUMBER=846.
CC 946 session 2 completed step 11 in fiber 0x7f300011f0
CC 946 session 2 completed step 12 in fiber 0x7f300011f0
CC 946 session 2 completed step 13 in fiber 0x7f300011f0
CC 946 session 2 completed step 14 in fiber 0x7f300011f0
CC 946 session 2 completed step 15 in fiber 0x7f300011f0
CC 946 session 2 completed step 16 in fiber 0x7f300011f0
CC 946 session 2 completed step 17 in fiber 0x7f300011f0
FiberScheduler: cc 946, session 2, fiber 0x7f300011f0 complete
FiberScheduler: fiber 0x7f300011f0 exiting
Thread 8 getting next capture
disposing CC 946 Session 2
NvPclSettingsApply: Reading PCL settings
Thread 7 is waiting
Thread 8 is waiting
Created fiber 0x7f300008c0 for CC 951 globalID 951 session 2
Thread 2 is working on CC 951 session 2 globalID 951 step 0
CC 951 session 2 completed step 0 in fiber 0x7f300008c0
cc 951(850) session 2 runCount=850 runIspOut=846, latest ccId=946
AC Stats Delay Count:5
CC 951 session 2 completed step 1 in fiber 0x7f300008c0
NV AE and AfApply algorithms are active.
CC 951 session 2 completed step 2 in fiber 0x7f300008c0
CC 951 session 2 completed step 3 in fiber 0x7f300008c0
Thread 6 is waiting
CC 951 session 2 completed step 4 in fiber 0x7f300008c0
CC 951 session 2 completed step 5 in fiber 0x7f300008c0
CC 951 session 2 completed step 6 in fiber 0x7f300008c0
CC 951 session 2 processing step 7 in fiber 0x7f300008c0
FiberScheduler: cc 951, session 2, fiber 0x7f300008c0 in progress...
Thread 2 getting next capture
Thread 12 is waiting
Thread 2 is waiting
FiberScheduler: cc 947, session 2, fiber 0x7f30000d10 succeeded async operation
Created fiber 0x7f300011f0 for CC 952 globalID 952 session 2
Thread 4 is working on CC 947 session 2 globalID 947 step 8
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
exposureTime=0.041667 analogGain=2.906271 digitalGain=1.000000 commonGain=0.121095 expComp=1.000000
lux in Statsupdate: isAohdrEnable=0 currentSceneLux 177.967
CC 947 session 2 completed step 8 in fiber 0x7f30000d10
CC 947 session 2 completed step 9 in fiber 0x7f30000d10
CC 947 session 2 completed step 10 in fiber 0x7f30000d10
NV AF analysis algorithm is active.
AfAnalysis cc 947 push FK_ISP_RUN_NUMBER=847.
CC 947 session 2 completed step 11 in fiber 0x7f30000d10
CC 947 session 2 completed step 12 in fiber 0x7f30000d10
CC 947 session 2 completed step 13 in fiber 0x7f30000d10
CC 947 session 2 completed step 14 in fiber 0x7f30000d10
CC 947 session 2 completed step 15 in fiber 0x7f30000d10
CC 947 session 2 completed step 16 in fiber 0x7f30000d10
CC 947 session 2 completed step 17 in fiber 0x7f30000d10
FiberScheduler: cc 947, session 2, fiber 0x7f30000d10 complete
FiberScheduler: fiber 0x7f30000d10 exiting
Thread 4 getting next capture
disposing CC 947 Session 2
Thread 4 is working on CC 952 session 2 globalID 952 step 0
Thread 10 is waiting
CC 952 session 2 completed step 0 in fiber 0x7f300011f0
Thread 3 is waiting
cc 952(851) session 2 runCount=851 runIspOut=847, latest ccId=947
AC Stats Delay Count:5
Thread 11 is waiting
CC 952 session 2 completed step 1 in fiber 0x7f300011f0
NV AE and AfApply algorithms are active.
CC 952 session 2 completed step 2 in fiber 0x7f300011f0
CC 952 session 2 completed step 3 in fiber 0x7f300011f0
Segmentation fault (core dumped)