I’ve updated everything to r28.2.1 and recompiled all, but the crash still occurs.
Error in `...`: malloc(): memory corruption: 0x0000007f5002b540
Thread 17 "Output Plane" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f5563f050 (LWP 28877)]
0x0000007fb54f2528 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x0000007fb54f2528 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x0000007fb54f39e0 in __GI_abort () at abort.c:89
#2 0x0000007fb55298c4 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fb55da5a0 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3 0x0000007fb552f2ec in malloc_printerr (action=<optimized out>, str=0x7fb55dab50 "malloc(): memory corruption", ptr=<optimized out>,
ar_ptr=<optimized out>) at malloc.c:5006
#4 0x0000007fb553149c in _int_malloc (av=av@entry=0x7f50000020, bytes=bytes@entry=16312) at malloc.c:3474
#5 0x0000007fb5533404 in __GI___libc_malloc (bytes=16312) at malloc.c:2913
#6 0x0000007fb5976f44 in alloc_small () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#7 0x0000007fb596162c in get_sof () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#8 0x0000007fb59623d4 in read_markers () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#9 0x0000007fb59608f0 in consume_markers () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#10 0x0000007fb5952714 in jpeg_consume_input () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#11 0x0000007fb5952a18 in jpeg_read_header () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#12 0x000000000056dfb8 in NvJPEGDecoder::decodeToFd (this=0x7fa8001990, fd=@0x7f5563e58c: -1, in_buf=0x7f5c880000 "77307741
Error in ...
: malloc(): memory corruption: 0x0000007f5002b540
Thread 17 “Output Plane” received signal SIGABRT, Aborted.
[Switching to Thread 0x7f5563f050 (LWP 28877)]
0x0000007fb54f2528 in __GI_raise (sig=sig@entry=6) at …/sysdeps/unix/sysv/linux/raise.c:54
54 …/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x0000007fb54f2528 in __GI_raise (sig=sig@entry=6) at …/sysdeps/unix/sysv/linux/raise.c:54
#1 0x0000007fb54f39e0 in __GI_abort () at abort.c:89
#2 0x0000007fb55298c4 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fb55da5a0 “*** Error in `%s’: %s: 0x%s ***\n”)
at …/sysdeps/posix/libc_fatal.c:175
#3 0x0000007fb552f2ec in malloc_printerr (action=, str=0x7fb55dab50 “malloc(): memory corruption”, ptr=,
ar_ptr=) at malloc.c:5006
#4 0x0000007fb553149c in _int_malloc (av=av@entry=0x7f50000020, bytes=bytes@entry=16312) at malloc.c:3474
#5 0x0000007fb5533404 in __GI___libc_malloc (bytes=16312) at malloc.c:2913
#6 0x0000007fb5976f44 in alloc_small () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#7 0x0000007fb596162c in get_sof () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#8 0x0000007fb59623d4 in read_markers () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#9 0x0000007fb59608f0 in consume_markers () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#10 0x0000007fb5952714 in jpeg_consume_input () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#11 0x0000007fb5952a18 in jpeg_read_header () from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#12 0x000000000056dfb8 in NvJPEGDecoder::decodeToFd (this=0x7fa8001990, fd=@0x7f5563e58c: -1, in_buf=0x7f5c880000 “\377\330\377\341\004kExif”,
in_buf_size=175573, pixfmt=@0x7f5563e588: 1295135284, width=@0x7f5563e580: 4096, height=@0x7f5563e584: 2160)
04kExif",
in_buf_size=175573, pixfmt=@0x7f5563e588: 1295135284, width=@0x7f5563e580: 4096, height=@0x7f5563e584: 2160)
The output of the version information is:
cat /etc/nv_tegra_release | head -1
# R28 (release), REVISION: 2.1, GCID: 11272647, BOARD: t186ref, EABI: aarch64, DATE: Thu May 17 07:29:06 UTC 2018
If I use the original library (r28.2.1) from Jetpack, the program doesn’t crash, but there’s still a memory leak for each decoded frame.
Attached is a compressed archive of the first 10 frames. The frames were captured from a Logitech Brio 4k camera.
frames.tar.gz (5.37 MB)