-
Notifications
You must be signed in to change notification settings - Fork 910
File system becomes inconsistent over time #598
Description
Steps to reproduce
I cannot tell you all the steps as I do not know but here is the gist:
I am developing an android app in kotlin and jni that uses the file system. I write and read to the file system.
Over time the file system starts to report invalid and corrupt information. I store hashes of the files and filesizes and then check them in my app for consistency and they start failing out of the blue and this either requires an android studio restart or a WSA restart or a computer restart.
The files are being read from the WSA "Share user folders" folder. One is a pdf and the pdf ends up showing corruption. The file size is incorrect and the hash is wrong(causing my app to fail).
How do I know it is not my app:
I can make no code changes, run the app, it fails(I can see the corruption in the PDF which always seems to be random) and then the failures on the filesize and or hashesh. I can then close out AS and then restart WSA and it works(again, without touching the code.
✔️ Expected Behavior
For there not to be any any file issues.
❌ Actual Behavior
There is no permanent corruption. It seems like memory corruption happens or there is some bug in the "share user folder" in tracking the files.
It works most of the time and I have no idea what seems to trigger the issue or if it is just random. The files are not being written to either side(windows or WSA). This seems to be an internal bug with the implementation of "share user folder".
The issue, though, is persistent in that it will continue to report incorrect info. I have even, when it first started happening, overwritten the file with a copy(since I thought it got corrupt) and it did the same thing. Maybe some type of caching is going on and it gets corrupted.
This has been on going for several months. Happens about 10% of the time I work on the app after several uses. This also may be related to "sleep" as I put my computer to sleep over night and then come back and work on it the next day(usually though I close out AS but WSA still runs. I do not use many android apps specially while using AS).
Again, it seems to be something solely connected to the Share user folder. I have not attempted to put all the files inside the WSA FS to see if it also gets corrupted although I'll eventually get to that stage.
Other Software
No response
Please specify the version of Windows Subsystem for Android
2311.40000,5.0