Multi camera issue

Hi,

I’m developing a camera module with four mipi cameras. The four cameras can light up at the same time.
Now,during the 4 cameras working,if one of them does not runs well,such as frame stopped or remove one through unplug mipi cable, the other there also stop display frames on screen. And when i reopen the cameras, they can’t open again, the terminal shows that:Socket read error. Camera Daemon stopped functioning… Finally, I must kill the nvcamera-daemon task, and restart this task, camera can reopen success.
Now my questions,
Q1: Why does a camera run incorrectly affect other cameras? It looks like a bug in the nvcamera-daemon task.
We want to see that,four cameras work independently without affecting each other’s running.
Q2: The nvcamera-daemon should make a time-out measure that to resume from an unnormal state.

Paste the log for your reference:

nvidia@tegra-ubuntu:~$ DISPLAY=:0 gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1088, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv flip-method=2 ! 'video/x-raw, width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! xvimagesink -e 
Setting pipeline to PAUSED ...

Available Sensor modes : 
1928 x 1088 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
968 x 548 FR=60.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
1280 x 720 FR=60.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 1928x1088 FrameRate = 30.000000 ...
<b>(remove one camera through unplug mipi cable)</b>
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was closed
Additional debug info:
xvimagesink.c(555): gst_xv_image_sink_handle_xevents (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
(ctrl + c)
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 3:18:32.429852352
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
(ctrl + c)
<b>(Do reopen the cameras, can't success)</b>
nvidia@tegra-ubuntu:~$ DISPLAY=:0 gst-launch-1.0 nvcamerasrc sensor-id=2 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1088, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv flip-method=2 ! 'video/x-raw, width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! xvimagesink -e 
Setting pipeline to PAUSED ...
Socket read error. Camera Daemon stopped functioning.....
gst_nvcamera_open() failed ret=0
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 ...
nvidia@tegra-ubuntu:~$

Pls help me solve this issue, thanks!

@limiao
I believe multiple camera can working well individually. However if you declare 4 camera sensors in your DT you can’t unplug any of them due to nvcamerasrc will scan all of them via i2c bus during launch anyone of them.

Thanks for your reply.
Btw,
We really want to see that,unplug one of the four cameras will not affect other’s running.
Which part of the code generated nvcamera-daemon, the nvcamerasrc or Camera Core in Camera Architecture Stack?
Can you open the nvcamerasrc and Camera-Core source code to us? We want to try to fix this issue.

Sorry we don’t have plan to release those code due to IP concern.