fs-uae icon indicating copy to clipboard operation
fs-uae copied to clipboard

Possible deadlock in filesystem operations

Open alpine9000 opened this issue 7 years ago • 2 comments

If you really push the filesystem from an Amiga program (reading hundreds of files repeatedly), fs-uae will sometimes freeze the Amiga thread performing the operation.

deterministic=1 seems to prevent the issue from happening, also so far I have not been able to reproduce this issue on real hardware or WinUAE.

I have attatched a test case which is a simple Blitz Basic program that reads a file 300 times. It also includes a test script that repeatedly calls the test program.

To reproduce the issue, enter the BT directory and call the test script "execute test"

It might take hundreds of calls to the test program (so many minutes and thousands of filesystem operations) before the issue will be triggered.

Once the thread is locked, accessing the "About" menu item from the Workbench menu will unfreeze it.

We have reproduced this issue on Mac, Windows and Linux versions of fs-uae.

fs-uae-test.zip

alpine9000 avatar Jan 13 '19 23:01 alpine9000

Thanks for the testcase, I haven't tried it yet, but a testcase such as this is very valuable to fix the problem :)

Some background information regarding deterministic=1 - in this case, the processing is not done by a thread - but instead synchronously in the emulation thread. That also slows done the processing since we do not want to keep the emulation thread too busy, so it could be that the issue is not triggered simply due to the slowdown in that case.

FrodeSolheim avatar May 11 '19 14:05 FrodeSolheim