[Jetson Linux API Reference] Slightly different behavior: OE4T <-> L4T #784
Replies: 6 comments 3 replies
-
The "inappropriate ioctl" message can be ignored. One of the libv4l2 plugins is trying to query the decoder device, but the driver doesn't support that ioctl. I'm not sure why you don't see that on stock L4T, since I think the same plugin is installed there. As for the segfault, it looks like it's happening in the shutdown/cleanup code, so it's after the conversion has been completed, which is why you see the output file. The mmapi samples recipe doesn't get a whole lot of attention, and I don't often get a chance to exercise the samples. I often have problems with running them with each new release, partly due to toolchain differences, partly due to the C++ classes in the samples having some iffy coding, and partly due to our use of more (and possibly different) built-from-source bits. The makefiles also require a bunch of patches to get them to build in our environment, and there could be something wrong with those, too. I'd welcome any help with getting them in better shape. |
Beta Was this translation helpful? Give feedback.
-
I spent some time looking at this, and the segfault issue is a bit complicated. It behaves differently in stock L4T because Debian (and thus Ubuntu) have a patch for glibc's NPTL implementation that has been around for over 10 years but has never made it upstream: link. This patch adds an extra check for a null thread ID before dereferencing it as a pointer. Stock glibc does not have that extra check. Now, as part of the destructor of an The problem appears to be that a single v4l2 fd is shared between the element and both element plane objects. When the first STREAMOFF is performed, for the the thread ID gets cleared; when the second STREAMOFF happens for the other plane, the plugin again calls I'm not sure whether it's a bug in the MMAPI or in the V4L2 plugin, though. |
Beta Was this translation helpful? Give feedback.
-
I've opened #785 to track this, and I think I have a workaround we can use. I've also got some updates pending to how we build libv4l2 to address discrepancies between the stock upstream version and NVIDIA's version. |
Beta Was this translation helpful? Give feedback.
-
The workaround has been merged into all of the currently-maintained branches, and their associated demo distro branches have also been updated to pick it up. There was one additional issue in the |
Beta Was this translation helpful? Give feedback.
-
Just to follow up... I've moved the recipes for building the argus and MMAPI samples into meta-tegra for the L4T R32.6.1-based branches (master and dunfell), and have added a test script to the corresponding branches in the demo distro to run through all the MMAPI samples (except the few multi-camera/multi-stream ones). This was a good exercise, as I uncovered a few more issues that required some additional patches to the samples, and a change to the way we were packaging the cuda-nvrtc libraries. |
Beta Was this translation helpful? Give feedback.
-
I just verified that my initial issue is solved. :) Thank you for your prompt answer and fix! |
Beta Was this translation helpful? Give feedback.
-
Hi all,
First of all I'm not quite sure whether this is really a bug, so I start a discussion first...
Describe
When I run one of the Jetson Linux API Reference samples I get a different behavior on OE4T and L4T. I noticed this first on hardknott (32.5.1) and I just verified on dunfell (32.6.1) as well.
This is what it look like on dunfell (32.6.1):
Surprisingly one can find the decoded JPEG in /tmp/nvidia-logo.yuv!
On L4T it behaves different:
Not mentioning that the decoded JPEG can be found in ~jetson/nvidia-logo.yuv.
I tried to get closer by running the with
strace
and it turns out that "Inappropriate ioctl for device" came from/dev/nvhost-nvdec
:So I wonder why in one case the IOCTL cmd runs fine and on the other case it is an "Inappropriate ioctl for device"
To Reproduce
Just follow the steps above.
Additional context
I searched the Wiki for something regarding the samples, but I failed...
Beta Was this translation helpful? Give feedback.
All reactions