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
nuttx - statfs() might lead to halt #13087
Comments
Yes I consider this a problem if an SD card failure can cause the mavlink module or navigator (guessing) to stop responding. Can we handle the failure gracefully in dataman? |
That is not that simple. its something deeper on the OS. |
Yes I agree it should fail with a timeout. I will look into this, but it will be after the 16 th, |
Note that the timeout need to be somewhere on the writer or the other process that holding the semaphore. |
I know, I mean that will be the ultimate test once the core problem is addressed. If in the mission the failure also needs to trigger a failsafe otherwise you'll get stuck on the last mission item. |
Presumably this is all implemented. It should complain about a failure to load the mission and be in the same state as after a finished mission. |
From what I seen, writing to the SD, and other operations with it doesn't has timeouts. |
I'm guessing this is dev call material, anyone here would like to lead the discussion on the next dev call Oct 16th? |
note-this is duplication to issue i Opened on PX4/NuttX (original Issue). I am not sure where to put that and one can be removed.
Describe the bug
I added mavlink message, that checks the SD card status periodically (in contrast to current implementation STORAGE_INFORMATION, that need to be asked by the ground).
during checking my message, I tested what will happen if I remove the SD card during operation. doing that caused the mavlink thread to stop.
first, do you consider that as a problem? how the system behave if SD is removed, or get malfunction during flight.
I only checked that above scenario, (added periodic check mavlink message). but i guess that other methods that required the SD are much more critical, for example reading mission on commander....
I think that it related to the fact that reading the status of fat32 is done by fat_statfs(), that waits for semaphore fat_semtake(fs);
To Reproduce
Testing code can be found at:
https://github.com/BazookaJoe1900/Firmware/tree/testing-sd_removal
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: