-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] uORB framework hangs when error code 0 is returned by function #15787
Comments
@linguini1 Hello:
The process of the selftest is quite straightforward:
"orb_ioctl" is actually equivalent to "ioctl" in that it requires using errno to determine specific error codes. However, we have internally modified it to directly return errno. I will push this pull request (PR) shortly. |
I did take a look at this through the call graph and I'm unsure where this would cause an issue as well. I added some log statements to the I know the file descriptor is valid because other
Been a long day and it appears I forgot how |
@linguini1 |
No, I mean the call to The hanging doesn't occur in my implementation of |
This is very strange. You can add some logging in file_vioctl to see what happens in the subsequent process. If the system hangs, does it manifest as a crash? Are there any logs available? |
I am not sure what changed but this is working now. I will keep an eye on this because I encountered the same issue the the LIS2MDL driver I wrote, but I will properly test further before re-raising an issue so as to not waste anyone's time. Thank you @Donny9 for the help and my apologies! |
Description / Steps to reproduce the issue
When a driver-level implementation of the
selftest
function returns a 0 (OK
) error code, the uORB framework hangs indefinitely.Steps to reproduce:
selftest
functionorb_ioctl(fd, SNIOC_SELFTEST, 0)
selftest
to return 0I observed this issue while writing a self-test function for the LSM6DSO32 IMU. When the selftest fails everything is fine, but when it passes the function hangs forever. I was able to confirm this by adding a log statement at the exit point and changing the return code to
-EACCESS
before the function returns. The log statement gets executed and the function does not hang. It does hang if I remove the error code change code and allow the function to return 0.On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Linux 6.13.1-arch1-1 #1 SMP PREEMPT_DYNAMIC GNU/Linux
NuttX Version
master
Issue Architecture
[Arch: arm]
Issue Area
[Area: OS Components]
Host information
No response
Verification
The text was updated successfully, but these errors were encountered: