Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on readdir on Windows #40

Open
KromDaniel opened this issue Nov 18, 2016 · 6 comments
Open

Crash on readdir on Windows #40

KromDaniel opened this issue Nov 18, 2016 · 6 comments

Comments

@KromDaniel
Copy link

KromDaniel commented Nov 18, 2016

Hey,

npm v4.0.2
node v6.4.0
Windows 10
[email protected]

The given example won't work on windows

process.getgid is not a function
process.getuid is not a function

If I try to remove the UID and GID then on readdir callback function if I
callback empty directory cb(0) it works, but on this case cb(0, ["test"]); the app just crash

[nodemon] app crashed - waiting for file changes before starting...

process.on("uncaughtException") won't fire any event

Any idea what can I do?

Thanks!

@sam0x17
Copy link
Contributor

sam0x17 commented Feb 26, 2017

👍 I am also experiencing this exact issue. Anyone?

@KromDaniel were you ever able to figure it out?

@sam0x17
Copy link
Contributor

sam0x17 commented Feb 27, 2017

I can confirm that the second I uncomment the if(path === '/') return cb(0, ['test']) line in the example, I get this same issue (with gid and uid paramters omitted, as above).

Here is the debug output from Dokany during this point. Note that the INSUFFICIENT_RESOURCES status is getting raised, maybe this has something to do with the problem?

Kernel debug output: http://pastebin.com/raw/A7p7EqhZ

@sam0x17
Copy link
Contributor

sam0x17 commented Feb 27, 2017

I have created an issue on the main Dokany repo as well: dokan-dev/dokany#465

@sam0x17
Copy link
Contributor

sam0x17 commented Feb 27, 2017

Possibly notable excerpts from kernel log (in chronological order):

Some STATUS_ACCESS_DENIED statuses pop up

00055627	0.00486348	[DokanFS]    => DokanDiskDeviceControl	
00055628	0.00486576	[DokanFS]    DiskDeviceControl Device name \Device\Volume{d6cc17c5-1731-4085-bce7-964f1e9f5de9} 	
00055629	0.00486690	[DokanFS]   IOCTL_STORAGE_QUERY_PROPERTY	
00055630	0.00486842	[DokanFS]     PropertyStandardQuery Unknown 6	
00055631	0.00486918	[DokanFS]    <= DokanDiskDeviceControl	
00055632	0.00487108	[DokanFS]   status = 0xc0000022	
00055633	0.00487222	[DokanFS]   status = STATUS_ACCESS_DENIED	
00055634	0.00487336	[DokanFS]   status = 0xc0000022	
00055635	0.00487450	[DokanFS]   status = STATUS_ACCESS_DENIED	
00055636	0.00487564	[DokanFS] <== DokanDispatchIoControl

A little bit later a single STATUS_INVALID_DEVICE_REQUEST is raised

00055839	0.00514174	[DokanFS] ==> DokanDispatchIoControl	
00055840	0.00514288	[DokanFS]   ProcessId 4	
00055841	0.00514364	[DokanFS]    IdType = DCB	
00055842	0.00514478	[DokanFS]    => DokanDiskDeviceControl	
00055843	0.00514706	[DokanFS]    DiskDeviceControl Device name \Device\Volume{d6cc17c5-1731-4085-bce7-964f1e9f5de9} 	
00055844	0.00514820	[DokanFS]    Unknown Code 0x4d008	
00055845	0.00515010	[DokanFS]    BaseCode: 0x4(unknown) FunctionCode 0x402(1026)	
00055846	0.00515124	[DokanFS]    <= DokanDiskDeviceControl	
00055847	0.00515238	[DokanFS]   status = 0xc0000010	
00055848	0.00515390	[DokanFS]   status = STATUS_INVALID_DEVICE_REQUEST	
00055849	0.00515504	[DokanFS]   status = 0xc0000010	
00055850	0.00515618	[DokanFS]   status = STATUS_INVALID_DEVICE_REQUEST	
00055851	0.00515732	[DokanFS] <== DokanDispatchIoControl	

(probably not relevant) much later a STATUS_INSUFFICIENT_RESOURCES is raised, but I think this is after Dokan has begun cleaning up the drive after it has already failed.

00057004	20.02175140	[DokanFS] ==> ReleaseTimeoutPendingIRP	
00057005	20.02175522	[DokanFS]  timeout Irp #6	
00057006	20.02177620	[DokanFS]   status = 0xc000009a	
00057007	20.02177811	[DokanFS]   status = STATUS_INSUFFICIENT_RESOURCES	
00057008	20.02178192	[DokanFS] <== ReleaseTimeoutPendingIRP	
00057009	20.02178383	[DokanFS]   Timeout, umount	
00057010	20.02178574	[DokanFS] ==> DokanUnmount	
00057011	20.02179146	[DokanFS]   Send Unmount to Service : \Volume{d6cc17c5-1731-4085-bce7-964f1e9f5de9}	
00057012	20.02179718	[DokanFS] => NotificationLoop	
00057013	20.02179909	[DokanFS] Try acquire SpinLock...	
00057014	20.02180099	[DokanFS] SpinLock irp Acquired	
00057015	20.02180099	[DokanFS] SpinLock notify Acquired	
00057016	20.02180290	[DokanFS] Clear Events...	
00057017	20.02180290	[DokanFS] Notify event cleared	
00057018	20.02180481	[DokanFS] Pending event cleared	
00057019	20.02180672	[DokanFS] Release SpinLock...	
00057020	20.02180862	[DokanFS] SpinLock notify Released	
00057021	20.02180862	[DokanFS] SpinLock irp Released	
00057022	20.02181053	[DokanFS] <= NotificationLoop	

@sam0x17
Copy link
Contributor

sam0x17 commented Mar 1, 2017

here is a simple project that reproduces the error if used with the latest Dokany on windows.

https://github.com/samkelly/flashsync_node_test

@Rondom
Copy link

Rondom commented Apr 2, 2017

Fixed by #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants