-
Notifications
You must be signed in to change notification settings - Fork 643
Description
Description / Steps to reproduce the issue
A deadlock occurs when one of the following functions is called if CONFIG_SYSTEM_SETTINGS_CACHED_SAVES is not set:
settings_setstorage()settings_sync()settings_clear()settings_create()
To further explain what's going on, dump_cache() is the function is charge of writing pending changes to the persistent storage. This function can be either invoked through save() (which is itself called by settings_setstorage(), settings_sync(), etc.) when CONFIG_SYSTEM_SETTINGS_CACHED_SAVES is disabled, or invoked via a signal when CONFIG_SYSTEM_SETTINGS_CACHED_SAVES is set.
In the first configuration settings_setstorage() (and all the other mentioned functions) lock a mutex but also call indirectly dump_cache() which also tries lock on the very same mutex, causing a deadlock.
The issue was identified on nuttx-apps 12.9.0, but the code hasn't been touched since.
On which OS does this issue occur?
[OS: Mac]
What is the version of your OS?
macOS 15.5
NuttX Version
12.9.0
Issue Architecture
[Arch: arm]
Issue Area
[Area: System]
Host information
No response
Verification
- I have verified before submitting the report.