dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.21k stars 661 forks source link

Fuse wrapper crashes on high IO #1066

Closed Temtaime closed 2 years ago

Temtaime commented 2 years ago

Environment

Check List

Description

Run fuse mirror. Use crystal disk mark with nvme preset and third option(Q32T16). image It will crash almost instantly. The instruction at 0x7FFBE7F313AD referenced memory at 0x20. The memory could not be written -> 0000000000000020 in cygdokanfuse2.dll:cygdokanfuse2__ZN14impl_file_lock9lock_fileEP16impl_file_handlexxb

Sometimes it crashes on EnterCriticalSection, sometimes on LeaveCriticalSection. Most of the crashes are in impl_file_lock::remove_file with invalid this pointer.

Logs

It is not related to dokan, but to fuse wrapper. So no logs here.

Liryna commented 2 years ago

@Temtaime There is a fix at head in the dokan2.dll that probably fix this issue. Can you try to build it and see if it works?

Temtaime commented 2 years ago

I'm using 2.0.2.1000 Do you mean i should try https://github.com/dokan-dev/dokany/commit/81164bc9cee53a23ec6733de0991249f789dd47e ?

Liryna commented 2 years ago

Oh my bad the last release includes it :D Could you provide some logs to find out what happens ? Looks like the lock should be alive for the life time of the mount.

Is it only the nvme SSD option that produce the crash ?

Temtaime commented 2 years ago

nvme option provides 16 threads instead of just 1, without this option it takes some time for bug to appear. The problem lies in file handles/locks being corrupted on intensive load, i don't think it is related to dokan2 library, but lies in fuse wrapper. I'll try to provide more info in days

Liryna commented 2 years ago

@Temtaime Were you able to look more into this issue?

Temtaime commented 2 years ago

Sorry, was a little busy unexpectedly. Sadly that bug reports are get closed without fixes. You could try to reproduce it on your own.