Tony:
Thanks for the help, but it appears that there ain’t much there. The
application is just cmd.exe, where I type “ren c:\x y”, where c:\x is a
directory.
The call actually comes from a kernel thread started by
FltQueueGenericWorkItem, so I’m not sure of the best way to track that down.
My driver isn’t doing anything with locks, so if it’s lock contention, it
ain’t coming from me.
FWIW, here’s the output from windbg:
kd> !stacks
…
[CMD.EXE]
66c.0005b4 8114eda0 0000756 BLOCKED nt!KiSwapThread
Kernel stack currently not resident.
f40e3c4c 8042c2ad nt!KeWaitForSingleObject(8114ef88, 00000011,
f40e3d01)+0x1a1
f40e3d50 804c54a4 nt!NtRequestWaitReplyPort(00000024, 0012fcd0,
0012fcd0)+0x75a
f40e3d50 80464f84 nt!KiSystemService(00000024, 0012fcd0,
0012fcd0)+0xc4
0012fca0 77f88b77 NTDLL!NtRequestWaitReplyPort(00000000, 00000000,
00000000)+0xb
kd> !thread 8114eda0
THREAD 8114eda0 Cid 66c.5b4 Teb: 7ffde000 Win32Thread: a2227b98 WAIT:
(WrLpcReply) UserMode Non-Alertable
8114ef88 Semaphore Limit 0x1
Waiting for reply to LPC MessageId 00000edf:
Pending LPC Reply Message:
e27dd3d1: [60800000,04000000]
Not impersonating
Owning Process 8114f020
Wait Start TickCount 42180 Elapsed Ticks: 1878
Context Switch Count 923 LargeStack
UserTime 0:00:00.0015
KernelTime 0:00:00.0359
Start Address 0x7c57b70c
Win32 Start Address 0x4ad1a610
Stack Init f40e4000 Current f40e3c0c Base f40e4000 Limit f40e1000 Call 0
Priority 8 BasePriority 8 PriorityDecrement 0 DecrementCount 0
Kernel stack not resident.
ChildEBP RetAddr Args to Child
f40e3c24 8042c2ad 8114ef88 8114ef58 8114eda0 nt!KiSwapThread+0xc5
f40e3c4c 804c54a4 8114ef88 00000011 f40e3d01 nt!KeWaitForSingleObject+0x1a1
f40e3d50 80464f84 00000024 0012fcd0 0012fcd0 nt!NtRequestWaitReplyPort+0x75a
f40e3d50 77f88b77 00000024 0012fcd0 0012fcd0 nt!KiSystemService+0xc4
0012fca0 00000000 00000000 00000000 00000000
NTDLL!NtRequestWaitReplyPort+0xb
kd> !locks
**** DUMP OF ALL RESOURCE OBJECTS ****
KD: Scanning for held locks…
Resource @ nt!CmpRegistryLock (0x80474460) Shared 1 owning threads
Contention Count = 21
NumberOfExclusiveWaiters = 1
Threads: 8181cb20-01<*>
Threads Waiting On Exclusive Access:
812f6840
KD: Scanning for held locks…
Resource @ 0x817f84f4 Exclusively owned
Contention Count = 55
NumberOfSharedWaiters = 3
NumberOfExclusiveWaiters = 1
Threads: 8181c020-01<*> 81163da0-01 812a7da0-01 8181cb20-01
Threads Waiting On Exclusive Access:
8181d8a0
KD: Scanning for held locks…
Resource @ 0x81819340 Shared 1 owning threads
Threads: 8181d623-01<*> *** Actual Thread 8181D620
KD: Scanning for held
locks…
Resource @ 0x812475c0 Shared 1 owning threads
Threads: 8181dda3-01<*> *** Actual Thread 8181DDA0
3464 total locks, 4 locks currently held
The problem is trivial to reproduce and doesn’t *seem* to be related to my
driver. So unless someone can confirm that they’ve successfully done a
directory rename with FltSetInformationFile, I’m just going to use
ZwSetInformationFile for now and get back to work…
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Wednesday, November 09, 2005 9:08 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FltSetInformationFile won’t rename a directory?
Ken,
I don’t think we want to see the thread that is running when you break
in - we want to see the hung thread. If you know the application you
were running you can pick it out of the running process list (“!process
0 0”). Otherwise you can do a full system process/thread dump
(“!process 0 7”) or you can use “!stacks” to try and find the
interesting thread.
If it is a lock-based deadlock (which is a distinct possibility) you can
also use “!locks” to see it.
I hope this helps.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Wednesday, November 09, 2005 8:24 AM
To: ntfsd redirect
Subject: RE: [ntfsd] FltSetInformationFile won’t rename a directory?
I’m afraid it doesn’t help much:
kd> kb
ChildEBP RetAddr Args to Child
804717e0 80468705 00000001 f9d5be02 000000d1
nt!RtlpBreakWithStatusInstruction
804717e0 80069b02 00000001 f9d5be02 000000d1 nt!KeUpdateSystemTime+0x161
80471864 804643bc 0000000e 00000000 00000000 hal!HalProcessorIdle+0x2
ffdff800 80480f64 00000001 00000000 000064ba nt!KiIdleLoop+0x10
ffdff804 00000000 00000000 000064ba 000064ba nt!KiTimerExpireDpc+0x4
I tried kb=ebp, kb=eip, kb=esp and they give similar results.
Let me clarify one thing: the entire system isn’t hung, just my
minifilter.
FltSetInformationFile just never returns. Of course, since my
minifilter
processes all disk I/O, anything that requires disk hangs. But anything
in
memory (like a command-line prompt) still works OK.
I think I’ve done most of the things to rule out something stupid on my
part
(always a possibility ;-):
- I use FltSetInformationFile several other places with no problem
- FltSetInformationFile works fine renaming a file
- ZwSetInformationFile works fine renaming a directory using
(essentially)
the same arguments that I pass to FltSetInformationFile
It’s only when FltSetInformationFile is used to rename a directory that
I’ve
hit this problem. (FYI, it’s a “simple” rename, where the
FILE_RENAME_INFORMATION just contains the new name of the directory.)
I presume that FltSetInformationFile calls ZwSetInformationFile, so it
must
be doing something else internally.
Like I said, I can use ZwSetInformationFile as a workaround, but
FltSetInformationFile is the “right” thing to use.
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Wednesday, November 09, 2005 7:47 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] FltSetInformationFile won’t rename a directory?
It’s hanging in the FltSetInformationFile routine. I single-step to
that
point and it never returns.
Yes, but FltSetInformationFile is not one instruction,
it does many things. We need to know
where exactly the thread who called. Break the target
operating system and list stack trace for the thread who
called FltSetInformation. Then tell us where is it hanging.
L.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com