Hello everyone, I hope you are doing extremely well.
I have built a shared library that intercepts the kernel level “ioctl” calls to analyse the flow of calls as a beginner into driver programming. The problem that I have is with loading that library before running any argus samples that come shipped with the Jetson board.
The log file is opened (visible by the “FILE OPENED”), but log file is deliberately closed before anything even begins, but the calls made by the application are indeed being passed through my intercept function (verifiable by the “Log file not Found” message that gets printed).
But I am not sure why the log file is being abruptly closed in the beginning of the whole process itself. Is there a clean-up process that is making the file descriptors go away, or is there a problem with my library because I have NOT made my log file thread safe. I tried running the ‘oneShot’ and ‘yuvOneShot’ applications, but both failed with the logging, although they do capture an image.
My log file does open, but gets closed immediately after I get the message “Wrote file: argus_oneShot.jpg”. Although the further messages that indicate the “not being able to write the log to the ioctl made” are only visible after the above “Wrote” message. There is a significant delay in the calling of the destructor of my shared library, which makes me question what is actually happening.
The bad file descriptor error also is unclear to me, and whether or not is it related to my issue.
I think that the argus application internally is spawning a new process, which is interfering with my file descriptor; leading to undefined behaviour. But this is just a mere speculation.
My log file works perfectly on my x86 host machine with both, direct V4L2 calls, as well as with GStreamer.
The output that I get if I run the sample on the Jetson is attached below. I would appreciate any help in debugging this, thanks!