GStreamer segmentation fault on Jetson Nano for MJPEG stream

I am facing some issues running a GStreamer on my Jetson Nano 4GB with the default L4T components.

The minimal pipeline
gst-launch-1.0 souphttpsrc location=http://192.168.0.123:8080/videofeed is-live=true ! decodebin ! fakevideosink
runs with the following input
grafik
which is provided by the IP Webcam app.

Unfortunately, it crashes randomly after some seconds

** (gst-launch-1.0:14150): CRITICAL **: 11:52:42.781: gst_adapter_push: assertion ‘GST_IS_BUFFER (buf)’ failed
Caught SIGSEGV
#0 0x0000007fa7b34e28 in __GI___poll (fds=0x55644ad0e0, nfds=548275495816, timeout=) at …/sysdeps/unix/sysv/linux/poll.c:41
#1 0x0000007fa7c41f58 in () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#2 0x00000055642144d0 in ()
Segmentation fault (core dumped)

I can’t detect any issues checking the debug output, so the back trace is the only thing which may help.

Does anybody has an idea what could be the problem or how to do some deeper investigation?

1 Like

Hi,
For information, please run

$ export GST_DEBUG=*FACTORY*:4

And share the log. Would like to know what elements are picked by decodebin.

Hi,
thanks for your help, here is the requested output:

0:00:03.107036362 16450 0x55788e7980 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “souphttpsrc”
0:00:03.110074827 16450 0x55788e7980 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “decodebin”
0:00:03.111364474 16450 0x55788e7980 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “typefind” named “typefind”
0:00:03.112338181 16450 0x55788e7980 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “fakevideosink”
0:00:03.112527557 16450 0x55788e7980 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “fakesink” named “sink”
0:00:03.112914488 16450 0x55788e7980 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “pipeline”
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got context from element ‘souphttpsrc0’: gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
Setting pipeline to PLAYING …
New clock: GstSystemClock
0:00:03.373045211 16450 0x55786c5400 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “multipartdemux”
0:00:03.373919021 16450 0x55786c5400 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “multiqueue”
nvbuf_utils: Could not get EGL display connection
0:00:05.485369445 16450 0x55786c5400 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “nvjpegdec”

I hope this helps.

Hi,
Looks like decodebin picks nvjpegdec, Please try the command with nvv4l2decoder:

gst-launch-1.0 souphttpsrc location=http://192.168.0.123:8080/videofeed is-live=true ! multipartdemux ! multiqueue ! jpegparse ! nvv4l2decoder mjpeg=1 ! nvoverlaysink

Unfortunately, the pipeline does not show any image. The pipeline gets prepared and there are some warnings after startup

NvMMLiteOpen : Block : BlockType = 277
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 277
0:00:02.978454382 18482 0x7f6c5f0990 WARN v4l2 gstv4l2object.c:4434:gst_v4l2_object_probe_caps:nvv4l2decoder0:src Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:02.978524279 18482 0x7f6c5f0990 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55c70ae040 Failed to determine interlace mode
0:00:02.978564541 18482 0x7f6c5f0990 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55c70ae040 Failed to determine interlace mode
0:00:02.979949254 18482 0x7f6c5f0990 WARN v4l2videodec gstv4l2videodec.c:1673:gst_v4l2_video_dec_decide_allocation: Duration invalid, not setting latency
0:00:02.991752391 18482 0x7f6c4f6230 WARN v4l2bufferpool gstv4l2bufferpool.c:1512:gst_v4l2_buffer_pool_dqbuf:nvv4l2decoder0:pool:src Driver should never set v4l2_buffer.field to ANY

I’ve also recognized no network traffic from the camera, the previous pipeline lead to a constant network traffic.

What gives :

gst-launch-1.0 -ev souphttpsrc location=http://192.168.0.123:8080/videofeed is-live=true do-timestamp=true ! multipartdemux ! image/jpeg, framerate=30/1 ! decodebin ! autovideosink

Thanks! For now, it looks quite stable. Could you explain what could cause the issue here? Why should I make use of multipartdemux?

Not sure for your case, just thoughts;

  • having source doing timestamp may be required
  • using autovideosink may be able to use frames from NVMM memory
  • using multipartdemux may help in seeking for start of frame, convert as expected for colorimetry, and may also adjust framerate for playing back.

Sounds plausible. Thanks for all your helpe here!

Thank Wirno_Talone and Honey_Patouceul for the help.

Sorry to come up with this issue again:

I was now able to do some more testing, unfortunately, I’ve recognized exactly the same exception still occurs. Are there other things I could try to do to find the issue?

Better send the exact command you’ve tried with the output log for better advice.

You may try nvv4l2decoder instead of nvjpegdec chosen by decodebin, as proposed by DaneLLL:

gst-launch-1.0 -ev souphttpsrc location=http://192.168.0.123:8080/videofeed is-live=true do-timestamp=true ! multipartdemux ! image/jpeg, framerate=30/1 ! nvv4l2decoder mjpeg=1 ! autovideosink