Guess this one is more for RidgeRun or Leopard Imaging.
Brief:
Platform: Jetson Nano, Ubuntu 18.04
Application with IMX477 works with L4T 32.4.4 [JP 4.4.1], but crash on L4T 32.7.5. [JP 4.6.5].
We developed an application that uses IMX477 in slave mode. We did the necessary modification on the kernel driver imx477, and everything worked fine.
Lately, we have decided to upgrade L4T to 32.7.5. We applied the same modifications on the driver as in 32.4.4. When we tried a simple pipeline the stream crashed.
Pipeline printed the following errors:
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting..
(for more see: L4T 32.7.5 without modified nvarguscamerasrc.so, IMX in slave mode)
A similar issue was described in Some basic problems with nvarguscamerasrc plugin for gstreamer - #12 by david.fernandez
So we tried to increase 10x TIMEOUTS. We downloaded corresponding gst-nvarguscamera sources for 32.7.5, changed the TIMEOUTS, and compiled it on external jetson nano (L4T 32.4.4). Then we transferred built libgstnvarguscamerasrc.so
from external jetson nano. To our targeted device with the camera into the /usr/lib/aarch64-linux-gnu/gstreamer-1.0
. We tried to run the stream, and the pipeline failed because of Caught SIGSEGV
(for more see: Output of pipeline: L4T 32.7.5 with modified nvarguscamerasrc.so, IMX in master mode.)
I’m not sure if I did something wrong but the new compiled library ( 287 592 B) had a very different size from the original one ( 68 392 B).
We tried to check if it’s working in master mode. With the original nvarguscamerasrc.so and in master mode stream was working without problem (but frames were not in sync with the external device), but after changing nvarguscamerasrc.so we got the same the SIGSEGV
.
Was the way I implemented new nvarguscamerasrc.so correct? What is the reason for nvbuf_utils: Can not get HW buffer from FD... Exiting..
?
################################## EXPERIMENTS RESULTS ##################################
Tested pipeline:
gst-launch-1.0 -e nvarguscamerasrc sensor-id=2 \
! "video/x-raw(memory:NVMM),width=4056,height=3040,framerate=30/1" ! nvvidconv ! pngenc \
! multifilesink location=/media/sd_card/camera_frames/slave_%03d.png
==========================================================================================
Pipeline is working with : L4T 32.7.5 without modification on nvarguscamerasrc.so, IMX in master mode.
In the output of pipeline I don’t see any issues, also in dmesg everything look fine.
Output of pipeline: L4T 32.7.5 without modified nvarguscamerasrc.so, IMX in slave mode.
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
Output of dmesg
...
[ 382.486848] imx477 30-0010: IMX477:: start streaming 1
[ 384.058433] fence timeout on [ffffffc0cce5fe40] after 1500ms
[ 384.058496] fence timeout on [ffffffc0cce5fcc0] after 1500ms
[ 384.058520] name=[nvhost_sync:3], current value=0 waiting value=1
[ 384.058559] ---- mlocks ----
[ 384.058581] name=[nvhost_sync:4], current value=0 waiting value=1
[ 384.058614] ---- mlocks ----
[ 384.058660] ---- syncpts ----
[ 384.058704] ---- syncpts ----
[ 384.058738] id 3 (54600000.isp_0) min 0 max 3 refs 4 (previous client : )
[ 384.058784] id 4 (54600000.isp_1) min 0 max 3 refs 4 (previous client : )
...
Look like nvargus is crashing.
Output of pipeline: L4T 32.7.5 with modified nvarguscamerasrc.so, IMX in master mode.
GST_ARGUS: Available Sensor modes :
Caught SIGSEGV
#0 0x0000007f80c4aef8 in __GI___poll (fds=0x55943a95e0, nfds=547622323080, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1 0x0000007f80d57f58 in () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#2 0x0000005594391320 in ()
Spinning. Please run 'gdb gst-launch-1.0 8234' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
In dmesg I see only this:
...
Casual camera setting
...
[ 4259.378287] imx477 30-0010: IMX477:: start streaming 0
[ 4259.406675] imx477 30-0010: IMX477::stop streaming
[ 4259.407854] imx477 30-0010: imx477_power_off:
Stream starts and after less than 30 ms it’s powered off.
Output of pipeline: L4T 32.7.5 with modified nvarguscamerasrc.so, IMX in slave mode.
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
Caught SIGSEGV
#0 0x0000007f88c9cef8 in __GI___poll (fds=0x558e021c30, nfds=547756876680, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1 0x0000007f88da9f58 in () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#2 0x000000558dedb250 in ()
Spinning. Please run 'gdb gst-launch-1.0 5900' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
In dmesg I see only this:
...
[ 1255.940558] imx477 30-0010: IMX477:: start streaming 1
[ 1255.986135] imx477 30-0010: IMX477::stop streaming
[ 1255.987230] imx477 30-0010: imx477_power_off:
################################## END OF EXPERIMENTS RESULTS ##################################