Two CSI cameras plus h264 encoder cause SIGSEGV on Jetpack 4.5.1

I’m using custom board with two Alvium CSI cameras and kernel source based on Allied Vision patch

Everything is OK with Jetpack 4.4. But since I’ve moved to Jetpack 4.5.1 I’m not able to run GStreamer pipeline with both cameras and a h264 encoder.

One camera plus encoder works fine

 gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc bitrate=8000000 ! h264parse ! matroskamux name=mux ! filesink location=~/test.mkv

Two cameras without encoder are OK too

gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! nvcompositor name=mix ! nvegltransform ! nveglglessink  v4l2src device=/dev/video1 ! nvvidconv ! mix.

Even one camera and two encoders run smoothly

gst-launch-1.0 v4l2src device=/dev/video1 ! nvvidconv ! tee name=t ! queue !  nvv4l2h264enc bitrate=8000000 ! h264parse ! matroskamux name=mux ! filesink location=~/test.mkv t. ! queue ! nvv4l2h264enc bitrate=8000000 ! h264parse ! mux.

But two cameras and encoder fail with SIGSEGV

 gst-launch-1.0 v4l2src device=/dev/video1 ! nvvidconv ! nvv4l2h264enc bitrate=8000000 ! h264parse ! matroskamux name=mux ! filesink location=~/test.mkv v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc bitrate=8000000 ! h264parse ! mux.

When I run this pipeline from application with gst_parse_launch() gdb backtrace shows this

#0  0x0000007f88592090 in  () at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#1  0x0000007f88592f9c in  () at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#2  0x0000007f885918f8 in  () at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#3  0x0000007f885916b8 in  () at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#4  0x0000007f8dab7b20 in  () at /usr/lib/aarch64-linux-gnu/libv4l2.so.0
#5  0x0000007f8dab36c0 in v4l2_fd_open () at /usr/lib/aarch64-linux-gnu/libv4l2.so.0
#6  0x0000007f8dc0963c in  () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so
#7  0x0000005569bf8d50 in  ()

Jetpack 4.4 has no libv4l2_nvargus.so thus I assume that the problem is with the updated v4l libraries.
Can anyone reproduce the issue?

What if below command?

gst-launch-1.0 v4l2src device=/dev/video1 ! nvvidconv ! nvv4l2h264enc bitrate=8000000 ! h264parse ! matroskamux name=mux ! filesink location=~/test.mkv &
gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc bitrate=8000000 ! h264parse ! matroskamux name=mux ! filesink location=~/test1.mkv &

@mrstecklo
Have apply this patch to confirm it.

@ShaneCCC

Have apply this patch to confirm it.

The patch solved the problem, thank you

What if below command?

Yes, independent processes work fine
I’ve also noticed that replacing nvv4l2h264enc with omxh264enc helps too

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