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
Hardfault in lfs_dir_relocatingcommit, LFS 2.9, LFS_ASSERT(pdir) with pdir null #949
Comments
Hi @HariTheCoder341, thanks for creating an issue. This is going to be difficult to debug. Is it possible to reduce this down into a locally-reproducible example? Preferably in a littlefs test case (example).
Are you sure you're using v2.9? I don't think these line numbers quite line up. The But not every call to The |
Hi @geky and thank you for your quick reply. I confirm we are using 2.9. I'm trying to reproduce the problem with a specific test function (written in c) in attach. We also tried to replace (in the real environment) the lfs_rename function with a custom function that perform a file copy. I'll keep investigating and let you know... |
Hi, I confirm that by replacing the lfs_rename with a copy function, which replicates the purpose, we have no reset after extensive and continuous testing for 10 consecutive days. I also generated a log file with LFS_YES_TRACE active, but it exceeds 1.5 GB, so I don't think it can be attached here or that it can be of any help, I'm only publishing the final part. It takes a day and a half for the problem to occur... not knowing how to proceed, we will comment out the lfs_rename in favor of the copy for now. |
We are experiencing hardfault time to time in this scenario (while(true) loop).
We have 3 directory created, "Records", "ToSend", "Archive"
Hardfault happens in function "lfs_dir_relocatingcommit" line 2226 hitted by LFS_ASSERT(pdir); because pdir is 0 (null).
It happen here:
After reboot and during mount:
We also noticed that lfs_dir_relocatingcommit is called with pdir = NULL in three points, line 2433, 2494, 2545.
Is this intentional?
Why could this problem happen and how can we avoid this?
But, if we mount the fs at the beginning and unmount it at each while cycle, it does not happen.
EDIT: It happens slower... more iteration to get to the error
Thank you
The text was updated successfully, but these errors were encountered: