Nvjpegenc segmentation fault

This is more a Bug report than an actual question. I am running nvjpegenc with 5 instances on a resolution of 1640x1232 1FPS. after some frames I am getting a segmentation fault. This is the backtrace of the gdb.

memcpy () at ../sysdeps/aarch64/memcpy.S:74
74	../sysdeps/aarch64/memcpy.S: No such file or directory.
(gdb) bt
#0  memcpy () at ../sysdeps/aarch64/memcpy.S:74
#1  0x0000007fa5dcba8c in jpeg_write_raw_data () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#2  0x0000007fa5e44aa4 in ?? () from /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libnvgstjpeg.so
#3  0x0000007fa618fe50 in ?? () from /usr/lib/aarch64-linux-gnu/libgstvideo-1.0.so.0
#4  0x0000000000cc1920 in ?? ()

I was NOT able to reproduce this with a simple pipeline, I am using gstreamer inside of my application whicht is doing much more things in parallel. It seems to only happen if the ARM is on high load. However, this is a pipeline that simulates what I am actually doing

gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, framerate=30/1 ! videorate ! video/x-raw, framerate=1/1 ! tee name=t \
! queue ! nvjpegenc ! multifilesink location=%03d_cam0.jpeg \
t. ! queue ! nvjpegenc ! multifilesink location=%03d_cam1.jpeg \
t. ! queue ! nvjpegenc ! multifilesink location=%03d_cam2.jpeg \
t. ! queue ! nvjpegenc ! multifilesink location=%03d_cam3.jpeg \
t. ! queue ! nvjpegenc ! multifilesink location=%03d_cam4.jpeg

I am not getting a segmentation fault if I substitute nvjpegenc with jpegenc.

Hi crossfire5,
We will try to reproduce with your pipeline and update.

Hi crossfire5,

I tried your pipeline 10 times on TX1/R24.2.1, but can’t see segmentation fault issue.
Which image version are you using? Could you install JetPack3.0 and try again?

Thanks!

Hi, thank you for your response. The pipeline above was not the way to exactly reproduce the error, it should just show what I am doing.

I found out that the problem appears not with high CPU load, but with a specific resolution.

Could you try out this pipeline:

gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, width=1640, height=1232, framerate=30/1 ! videorate ! video/x-raw, framerate=1/10 ! queue ! nvjpegenc ! fakesink

which almost always crashes for me. Changing the resolution to 1920x1080 seems to work. Using jpegenc instead of nvjpegenc works as well.

I am on L4T 24.2.1

Hi crossfire5,
We are able to observe the issue. Instinctively it seems to be HW limitation, but needs further confirmation. Will check and update.

This is a SW issue and the fix is in next release.

Thank you, I am glad to hear that

Verified the pipeline on r28.1

gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, width=1640, height=1232, framerate=30/1 ! videorate ! video/x-raw, framerate=1/10 ! queue ! nvjpegenc ! fakesink

Please try.

Hi DaneLLL,

Have you find a test for confirme that nvjpeg work on 28.1.

I have same bug that Crossfire5 , on TX1 L4T 24.2.1 ,

I used the J120 (auvidea) carry board , but i need nvjpeg and J120.

So , may be i can find solution for the nvjpeg problem with J120 update (v1.4 for Jetson TX2 28.1 only).
For that, i must to switch to TX2 , and i like a confirmation before change .

thx

ok, i test … that’s works !

… and ?

Hi Syd, your issue is not same as this one. Please start a new post and give steps to reproduce it.

ok, thx … I start new post for nvjpegdec ;)

https://devtalk.nvidia.com/default/topic/1025892/jetson-tx1/l4t-28-1-gstreamer-1-0-and-buserror-on-nvjpegdec-plugin/