Dial up doesn't close handle to USB modem on surprise removal

Hi,

I am debugging a KMDF driver for a USB modem.
When the device is surprise removed I see in debug view the following messages:

[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> lineClose()
[1184] lineClose(): looking for tspdev
[1184] lineClose(): found tspdev
*********** File handle is closed here **************
[1184] lineClose(): found tspdev

Usually everything is OK. Dial up detects a disconnection, closes the file handle to my driver where I marked it and offers to redial.
Every once in a while dial up doesn’t detect the disconnection and gets stuck.

The modem diagnostic log offers no help.

I tried to google for these messages but found very little.
Does anyone know where these messages come from? Can I make them more verbose?
Any other ideas?

Thanks,
Gur

Are you sure you are purging all io? Perhaps dial up is not seeing a particular io fail that it needs to see.

d

-----Original Message-----
From: xxxxx@gmail.com
Sent: Wednesday, December 02, 2009 4:44 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Dial up doesn’t close handle to USB modem on surprise removal

Hi,

I am debugging a KMDF driver for a USB modem.
When the device is surprise removed I see in debug view the following messages:

[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> lineClose()
[1184] lineClose(): looking for tspdev
[1184] lineClose(): found tspdev
File handle is closed here***
[1184] lineClose(): found tspdev

Usually everything is OK. Dial up detects a disconnection, closes the file handle to my driver where I marked it and offers to redial.
Every once in a while dial up doesn’t detect the disconnection and gets stuck.

The modem diagnostic log offers no help.

I tried to google for these messages but found very little.
Does anyone know where these messages come from? Can I make them more verbose?
Any other ideas?

Thanks,
Gur


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Based on my internal debug messages I think I do purge everything but I will try to validate it.
What is the best tool for the job? IrpTracker?

Thanks,
Gur

For a kmdf driver, you can run !wdfkd.wdfdevicequeues and it will show you all of your queues (and maybe all requests in the queue, subsequent calls to !wdfkd.wdfqueue on each queue definitely will give the list of all outstanding requests)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, December 02, 2009 11:12 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Dial up doesn’t close handle to USB modem on surprise removal

Based on my internal debug messages I think I do purge everything but I will try to validate it.
What is the best tool for the job? IrpTracker?

Thanks,
Gur


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Anymore ideas? Oh yeah, have you connected the kernel debugger and stepped
through your code? Have you stepped out of your code and into calling layers
and looked around? Have you searched surrounding memory? Have you set
breakpoints and checked the status’s of pending io requests, or executed an
!analyze or even !process dump? If using WDF, have you chased down various
and sundry WDF objects? Just doing a raw search of memory you most likely
can find those strings and then locate the near symbols using WinDbg.

Have you run DriverVerifier? Results?
Have you built the driver using Prefast? Results?
Have you built the driver using CUV? Results?

In other words, what have you done to help yourself, besides wring your
hands and look at DebugView?

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, December 02, 2009 6:43 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Dial up doesn’t close handle to USB modem on surprise
removal

Hi,

I am debugging a KMDF driver for a USB modem.
When the device is surprise removed I see in debug view the following
messages:

[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] call found
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> mfn_ProcessHardwareFailure
[1184] <== mfn_ProcessHardwareFailure
[1184] ==> lineClose()
[1184] lineClose(): looking for tspdev
[1184] lineClose(): found tspdev
*********** File handle is closed here **************
[1184] lineClose(): found tspdev

Usually everything is OK. Dial up detects a disconnection, closes the file
handle to my driver where I marked it and offers to redial.
Every once in a while dial up doesn’t detect the disconnection and gets
stuck.

The modem diagnostic log offers no help.

I tried to google for these messages but found very little.
Does anyone know where these messages come from? Can I make them more
verbose?
Any other ideas?

Thanks,
Gur


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

__________ Information from ESET Smart Security, version of virus signature
database 4655 (20091202) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature
database 4655 (20091202) __________

The message was checked by ESET Smart Security.

http://www.eset.com

No dude, the BEST tool for the job is WinDbg. Period. DbgView, DbgMonitor,
IrpTracker are all USEFUL adjuncts to the primary kernel development tool:
WinDbg, or one of it’s cousins, all of which come in
“Debugging tools for Windows”.

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, December 02, 2009 1:12 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Dial up doesn’t close handle to USB modem on surprise
removal

Based on my internal debug messages I think I do purge everything but I will
try to validate it.
What is the best tool for the job? IrpTracker?

Thanks,
Gur


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

__________ Information from ESET Smart Security, version of virus signature
database 4655 (20091202) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature
database 4655 (20091202) __________

The message was checked by ESET Smart Security.

http://www.eset.com