You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Program runs into deadlock once FATFileSystem::file_truncate(...) is called: any subsequent member function call from a different thread context is blocked as mutex is not returned.
int FATFileSystem::file_truncate(fs_file_t file, off_t length)
{
FIL *fh = static_cast<FIL *>(file);
lock();
// save current position
FSIZE_t oldoff = f_tell(fh);
// seek to new file size and truncate
FRESULT res = f_lseek(fh, length);
if (res) {
unlock();
return fat_error_remap(res);
}
res = f_truncate(fh);
if (res) {
unlock();
return fat_error_remap(res);
}
// restore old position
res = f_lseek(fh, oldoff);
if (res) {
unlock();
return fat_error_remap(res);
}
****missing unlock() here****
return 0;
}
Target(s) affected by this defect ?
All targets
Toolchain(s) (name and version) displaying this defect ?
arm-none-eabi-gcc (1.70201.0)
pio version 5.1.1
What version of Mbed-os are you using (tag or sha) ?
mbed 6.6.0
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
n/a
How is this defect reproduced ?
The defect can only be reproduced when member functions are accessed from different threads; problem does not occur if member functions are called from the same thread as mutex is already owned by this thread.
The text was updated successfully, but these errors were encountered:
@horeich thank you for raising this issue.Please take a look at the following comments:
It would help if you could also specify the versions of any tools you are using?
NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'. This indicates to us that at least all the fields have been considered.
Please update the issue header with the missing information, the issue will not be mirrored to our internal defect tracking system or investigated until this has been fully resolved.
Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. Internal Jira reference: https://jira.arm.com/browse/IOTOSM-3923
Uh oh!
There was an error while loading. Please reload this page.
Description of defect
Program runs into deadlock once FATFileSystem::file_truncate(...) is called: any subsequent member function call from a different thread context is blocked as mutex is not returned.
Target(s) affected by this defect ?
All targets
Toolchain(s) (name and version) displaying this defect ?
arm-none-eabi-gcc (1.70201.0)
pio version 5.1.1
What version of Mbed-os are you using (tag or sha) ?
mbed 6.6.0
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
n/a
How is this defect reproduced ?
The defect can only be reproduced when member functions are accessed from different threads; problem does not occur if member functions are called from the same thread as mutex is already owned by this thread.
The text was updated successfully, but these errors were encountered: