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

DokanBroadcastLink stuck in BroadcastSystemMessage causes timeout #957

Closed bailey27 closed 3 years ago

bailey27 commented 3 years ago

Feature request can skip this form. Bug report must complete it. Check List must be 100% match or it will be automatically closed without further discussion. Please remove this line.

Environment

Check List

(built from latest github source instead)

On my new notebook, if I mounted an fs (either cppcryptfs or Dokany mirror) using a drive letter, it would get timed out and unmounted by the driver after a short time.

This happend only when I used a drive letter. It did not happen if I mounted to an empty directory.

I debugged it, and what I found was that after mounting to a drive letter, and before the keepalive setup is done, dokan1.dll calls BroadcastSystemMessage() to inform other apps about the new drive letter.

This call to BroadcasstSystemMessage() is getting stuck either forever or at least long enough for the kernel driver to timeout the fs and unmount it.

If I remove the BSF_NOTIMEOUTIFNOTHUNG flag in the call to BroadcastSystemMessage(), then the call to BroadcastSystemMessage() returns after about 7 seconds, the keepalive code runs, and everything is ok.

It looks to me that some (probably pre-installed) software on my new notebook is getting the broadcast and not responding to it but also not appearing to Windows to be hung.

Liryna commented 3 years ago

@bailey27 Hey!

Looks like it would be a good idea to remove this flag indeed. We have no reason to wait their answers. Would you mind doing a PR for removing it ?

bailey27 commented 3 years ago

Hi!

Sure, I'll do that.

Liryna commented 3 years ago

@bailey27 Awesome :) Thanks for the report as always :D

bailey27 commented 3 years ago

You're welcome!