Window Error Code 38.

I have several customers complaining that get an Error code 38 when they disconnect our remote USB hub try to reconnect it. This is because one of the PnP drivers does not get unloaded because its driver object’s reference count is non-zero. I see this from customer crashdumps. I checked that its device objects were removed so I don’t think the driver mishandles device removals.

One of the customers seeing this problem believes it has something to do with VmWare’s vSphere client. He claims that the problem goes away if he uninstalls it. The customer ran an object trace on driver objects and generated a crashdump which showed two outstanding references against the driver object but obtrace doesn’t show anything remarkable other than the excess references.

I cannot reproduce this in my lab, however customers can easily repro it. How can I pinpoint the culprit? Is it possible for an application / service to reference a driver object? Or should I be looking for a rogue driver?

I should mention that the customer has turned on driver verifier and does not flag anything.

Can you describe in more detail how they disconnect and reconnect your device? Also what do yo mean by ?remote? USB hub?

Sent from Mailhttps: for Windows 10

From: xxxxx@digi.commailto:xxxxx
Sent: January 13, 2017 7:21 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Window Error Code 38.

I have several customers complaining that get an Error code 38 when they disconnect our remote USB hub try to reconnect it. This is because one of the PnP drivers does not get unloaded because its driver object’s reference count is non-zero. I see this from customer crashdumps. I checked that its device objects were removed so I don’t think the driver mishandles device removals.

One of the customers seeing this problem believes it has something to do with VmWare’s vSphere client. He claims that the problem goes away if he uninstalls it. The customer ran an object trace on driver objects and generated a crashdump which showed two outstanding references against the driver object but obtrace doesn’t show anything remarkable other than the excess references.

I cannot reproduce this in my lab, however customers can easily repro it. How can I pinpoint the culprit? Is it possible for an application / service to reference a driver object? Or should I be looking for a rogue driver?

I should mention that the customer has turned on driver verifier and does not flag anything.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx></https:>

It is a remote USB hub, basically USB over IP. It has a virtual host controller driver awvusbd.sys and a hub driver. You connect to the remote hub with a TCP connection (actually multiple TCP connections).

When you connect (TCP connection) to the remote USB hub, awvusbd.sys creates several virtual HC device objects (AWUSBHC). When you disconnect from the remote USB hub, it removes them. It is logically (well almost) the same as if you yanked the cable on an external USB hub. But when this customer disconnects from the remote hub and reconnects, the AWUSBHC devices won’t reenumerate because the driver (awvusbd.sys) did not unload.

There is an option to turn on Ob ref tracking which should give you stack dumps for each ref and deref

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@digi.com
Sent: Friday, January 13, 2017 4:20:22 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Window Error Code 38.

I have several customers complaining that get an Error code 38 when they disconnect our remote USB hub try to reconnect it. This is because one of the PnP drivers does not get unloaded because its driver object’s reference count is non-zero. I see this from customer crashdumps. I checked that its device objects were removed so I don’t think the driver mishandles device removals.

One of the customers seeing this problem believes it has something to do with VmWare’s vSphere client. He claims that the problem goes away if he uninstalls it. The customer ran an object trace on driver objects and generated a crashdump which showed two outstanding references against the driver object but obtrace doesn’t show anything remarkable other than the excess references.

I cannot reproduce this in my lab, however customers can easily repro it. How can I pinpoint the culprit? Is it possible for an application / service to reference a driver object? Or should I be looking for a rogue driver?

I should mention that the customer has turned on driver verifier and does not flag anything.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

Do you register device interfaces for your PDOs (for example, generic USB device interface GUID)?
Do you disable device interface state when you handle SURPRISE_REMOVAL?