I believe i am causing a system thread deadlock in ntfs. my code runs fine
on fat16 and fat32 and seems to run fine on beta1 of whistler. here’s the
problem
i have code that, when seeing a delete, will rename the file to a protected
folder. for the current test, i try to delete 3000 files. i get anywhere
from 100 - 900 files deleted and then the system stops deleting files. the
mouse still moves and the animated file delete stuff still occurs. thus i
think i have a system thread deadlock issue.
How can i write code to have a private thread help solve this problem? I
don’t know what the thread would do differently than what my call to the
fsd currently does. or is there a better solution?
thanks. - jb
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
The biggest tip I can give with regards to deadlocking the system
with a file sytsem filter is to not hold locks across calls into the file
system. Because of the reentrant nature of the file system, its very easy
to bollocks up the locking heirarchy with your own locks, causing deadlocks.
Just be careful about introducing race conditions in your own code as you
drop locks around calls into the file system.
If you are using fast mutexes, one sure way to deadlock the system
is to hold a fast mutext across a call into the file system; The fast mutex
raises the irql to APC_LEVEL, so that, if the fsd handles the IO
asynchronously (and thus tries to post a special kernel apc for completion),
the APC will never complete (you’ve raised the IRQL in your mainline code,
and are waiting for a return that requires you to drop back to APC level).
Also, fast mutexes cannot be acquired recursively.
You should probably try to diagnose the deadlock and solve it
instead of giving up on your current design just yet. There are many useful
WinDbg commands to diagnose deadlocks, depending on which synchronization
primitives you you are using.
-----Original Message-----
From: xxxxx@earthlink.net [mailto:xxxxx@earthlink.net]
Sent: Thursday, January 25, 2001 8:29 AM
To: File Systems Developers
Subject: [ntfsd] deadlocking ntfs…
I believe i am causing a system thread deadlock in ntfs. my code runs fine
on fat16 and fat32 and seems to run fine on beta1 of whistler. here’s the
problem
i have code that, when seeing a delete, will rename the file to a protected
folder. for the current test, i try to delete 3000 files. i get anywhere
from 100 - 900 files deleted and then the system stops deleting files. the
mouse still moves and the animated file delete stuff still occurs. thus i
think i have a system thread deadlock issue.
How can i write code to have a private thread help solve this problem? I
don’t know what the thread would do differently than what my call to the
fsd currently does. or is there a better solution?
thanks. - jb
You are currently subscribed to ntfsd as: xxxxx@ntpsoftware.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com