libv4l2_nvvidconv plugin segmentation fault on VIDIOC_STREAMOFF
madisongh opened this issue · 1 comments
madisongh commented
Describe the bug
Initially raised in this discussion.
On OE4T builds, the libv4l2_nvvidconv
V4L2 plugin will crash with a segmentation fault when it is passed a VIDIOC_STREAMOFF
ioctl when the stream is already off.
This behavior is not seen in the stock L4T Ubuntu distro due to a long-standing Debian downstream patch that allows a null thread ID to be passed to pthread functions. However, this is likely a bug in the plugin itself, since passing an invalid thread ID to pthread_join()
invokes "undefined behavior" per the POSIX specifications.
This is known to be an issue with R32.4.x, L4T R32.5.x, and R32.6.x.
To Reproduce
Steps to reproduce the behavior:
- Build an image with
tegra-demo-distro
that includestegra-mmapi-samples
- On the target, run the
jpeg_decode
sample program (see below) - The sample program sucessfully generates the output file, then terminates with a segmentation fault.
Additional context
To invoke the sample program:
$ /opt/tegra-mmapi/bin/jpeg_decode num_files 1 /opt/tegra-mmapi/data/Picture/nvidia-logo.jpg /tmp/nvidia-logo.yuv