Tech Support > Microsoft Windows > Drivers > Hanging process...
Hanging process...
Posted by Nadav on October 31st, 2005


Hi,

- I have written a function driver that communicate with a user-mode
application, on some scenarios after unloading the function driver ( using
the ServiceManager ) the user-mode process hangs and cannot be terminated
using the task manager or procexp.
- The user-mode app communicate with the driver using a symbolic link and IO
completion mechanism, a CSQ accumulate user-mode Read IRPs and complete them
when it need to report messages to the user.
- Upon termination all of the IRPs in the CSQ are being canceled ( through
the DeviceClose handler or by the IO Manager upon thread termination ).

What may cause the user-mode app to hang?

Any help would be appreciated…

Naddav
http://www.sophin.com

Posted by Ivan Brugiolo [MSFT] on October 31st, 2005


One possibility:
there is user-mode thread blocked in a wait function with the Kernel-mode
flag set.
This prevents the thread from dispatching the KILL-APC
that is posted to the queue of that thread till the wait is statified.
If you could post `!process <EPROCESS> F` of the zombie process,
possibly more set of eyes can help.

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Nadav" <Nadav@discussions.microsoft.com> wrote in message
news:8EF068E5-845E-4EB6-A2B0-CD0DAD6C4704@microsoft.com...


Posted by Maxim S. Shatskih on October 31st, 2005


Do you forget to cancel all IRPs in the DriverUnload routine?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Nadav" <Nadav@discussions.microsoft.com> wrote in message
news:8EF068E5-845E-4EB6-A2B0-CD0DAD6C4704@microsoft.com...


Posted by Nadav on October 31st, 2005


Shouldn't this be done automatically by the IO Manager when the thread that
issued the IRP is being terminated?
--
Nadav
http://www.sophin.com


"Maxim S. Shatskih" wrote:

Posted by Don Burn on October 31st, 2005


No you should be doing it.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"Nadav" <Nadav@discussions.microsoft.com> wrote in message
news:88AEE69B-45A8-42EB-A1CB-6037B2B257C0@microsoft.com...


Posted by Ali on October 31st, 2005


Don! are you talking about IoDeleteSymbolicLink and IoDeleteDevice?

Regards.

Posted by Don Burn on October 31st, 2005


No, I am referring to the fact that every IRP that is queued needs to be
canceled or completed before the driver is unloaded. If a thread is killed,
there should be a cancel call for that IRP which has to be handled.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"Ali" <abdulrazaq@gmail.com> wrote in message
news:1130793424.268085.162930@z14g2000cwz.googlegr oups.com...



Similar Posts