<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Unfortunately it is impossible to say from the stack only what
exactly the BcmBusCtr is waiting for. <br>
Could you upload this dump to our ftp server so that I could have a
look into it?<br>
<br>
I will post you our ftp server details privately.<br>
<br>
Thanks,<br>
Mikhail<br>
<br>
On 14.03.2012 22:01, Ribhi Kamal wrote:
<blockquote
cite="mid:CACkSh6wYBK25EpdYt4Am8XaWzY15VBwj=aCPv-oQ9CnhzjHB4Q@mail.gmail.com"
type="cite">
<div>Thanks for the help! Below is the stack trace. I'm still
working on setting up windbg on another machine.</div>
<div><br>
</div>
<div>Note: BcmBusCtr is the USB hub that is causing the trouble.
It is possible that the device is not behaving correctly so I
starting to lean towards making the hubWalker skip the device
all together. But I would rather find a real solution since this
problem will happen with other devices as well.</div>
<div><br>
</div>
<div>
<div> [888152d8 VirtualBox.exe]</div>
<div><br>
</div>
<div> [853f7448 VBoxSVC.exe]</div>
<div>*** ERROR: Module load completed but symbols could not be
loaded for BcmBusCtr.sys</div>
<div> ea4.000eb8 8807d030 0003c0b Blocked
nt!KiSwapContext+0x26</div>
<div>
nt!KiSwapThread+0x266</div>
<div>
nt!KiCommitThreadWait+0x1df</div>
<div>
nt!KeWaitForSingleObject+0x393</div>
<div> BcmBusCtr+0x6127</div>
<div>
nt!IofCallDriver+0x63</div>
<div>
nt!IopParseDevice+0xed7</div>
<div>
nt!ObpLookupObjectName+0x4fa</div>
<div>
nt!ObOpenObjectByName+0x165</div>
<div>
nt!IopCreateFile+0x673</div>
<div> nt!NtOpenFile+0x2a</div>
<div>
nt!KiFastCallEntry+0x12a</div>
<div>
nt!ZwOpenFile+0x11</div>
<div>
nt!IoGetDeviceObjectPointer+0x59</div>
<div>
VBoxUSBMon!vboxUsbMonHubDevWalk+0x831</div>
<div>
VBoxUSBMon!VBoxUsbFltFilterCheck+0x4c2</div>
<div>
VBoxUSBMon!VBoxUsbMonRunFilters+0x16f</div>
<div>
VBoxUSBMon!vboxUsbMonIoctlDispatch+0x1374</div>
<div>
VBoxUSBMon!VBoxUsbMonDeviceControl+0xe38</div>
<div>
nt!IofCallDriver+0x63</div>
<div>
nt!IopSynchronousServiceTail+0x1f8</div>
<div>
nt!IopXxxControlFile+0x6aa</div>
<div>
nt!NtDeviceIoControlFile+0x2a</div>
<div>
nt!KiFastCallEntry+0x12a</div>
<div>
ntdll!KiFastSystemCallRet</div>
</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On Wed, Mar 14, 2012 at 6:52 AM, mikhail
sennikovsky <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mikhail.sennikovsky@oracle.com">mikhail.sennikovsky@oracle.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> One thing you might try
is to make your host system BSOD and generate a full or
kernel memory dump once you are sure
IoGetDeviceObjectPointer is deadlocked for you.<br>
You will be able then to open the crash dump and find and
analyze the deadlocked thread.<br>
<br>
See <a moz-do-not-send="true"
href="http://support.microsoft.com/kb/244139"
target="_blank">http://support.microsoft.com/kb/244139</a>
on how to make the system generate a dump for you.<br>
<br>
Note that you'd need a full dump or kernel memory dump, not
a minidump. My Computer -> properties -> advanced
system settings -> "Startup and recovery" settings.<br>
<br>
Once you have a dump and opened it with WinDbg, :<br>
in WinDbg cmd console: !stacks 2 VBoxUsbMon! -> will give
you a list of threads VBoxUsbMon is involved in<br>
select the deadlocked thread with .thread
<thread_address><br>
you can then do k, .frame, or whatever you need on that
thread. It would be great if you could post a stack trace
for that thread here.<span class="HOEnZb"><font
color="#888888"><br>
<br>
Mikhail</font></span>
<div>
<div class="h5"><br>
<br>
On 14.03.2012 1:43, Huihong Luo wrote:
<blockquote type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font:inherit" valign="top">sorry,
just realized that you are debugging host
drivers. Yes, you will have to use 2 physical
pcs.<br>
<br>
--- On <b>Tue, 3/13/12, Huihong Luo <i><a
moz-do-not-send="true"
href="mailto:huisinro@yahoo.com"
target="_blank"><huisinro@yahoo.com></a></i></b>
wrote:<br>
<blockquote style="BORDER-LEFT:rgb(16,16,255)
2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px"><br>
From: Huihong Luo <a moz-do-not-send="true"
href="mailto:huisinro@yahoo.com"
target="_blank"><huisinro@yahoo.com></a><br>
Subject: Re: [vbox-dev]
IoGetDeviceObjectPointer hangs vboxusbmon<br>
To: "Ribhi Kamal" <a moz-do-not-send="true"
href="mailto:rbhkamal@gmail.com"
target="_blank"><rbhkamal@gmail.com></a><br>
Cc: "vbox-dev" <a moz-do-not-send="true"
href="mailto:vbox-dev@virtualbox.org"
target="_blank"><vbox-dev@virtualbox.org></a><br>
Date: Tuesday, March 13, 2012, 2:41 PM<br>
<br>
<div>
<table border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td valign="top">
<div>do you mean you need 2 pcs to
debug?</div>
<div> </div>
<div>no, you can use same pc. Just
run vm on the same pc, and
configure COM1 as pipe. Then
start windbg this way:</div>
<div><br>
C:\WinDDK\7600.16385.0\Debuggers\windbg.exe
-b -k
com:pipe,port=\\.\pipe\com_1,resets=0</div>
<div><br>
--- On <b>Tue, 3/13/12, Ribhi
Kamal <i><a
moz-do-not-send="true"
href="mailto:rbhkamal@gmail.com"
target="_blank"><rbhkamal@gmail.com></a></i></b>
wrote:<br>
</div>
<blockquote
style="BORDER-LEFT:rgb(16,16,255)
2px
solid;PADDING-LEFT:5px;MARGIN-LEFT:5px"><br>
From: Ribhi Kamal <a
moz-do-not-send="true"
href="mailto:rbhkamal@gmail.com"
target="_blank"><rbhkamal@gmail.com></a><br>
Subject: Re: [vbox-dev]
IoGetDeviceObjectPointer hangs
vboxusbmon<br>
To: "Huihong Luo" <a
moz-do-not-send="true"
href="mailto:huisinro@yahoo.com"
target="_blank"><huisinro@yahoo.com></a><br>
Cc: "vbox-dev" <a
moz-do-not-send="true"
href="mailto:vbox-dev@virtualbox.org"
target="_blank"><vbox-dev@virtualbox.org></a><br>
Date: Tuesday, March 13, 2012,
2:38 PM<br>
<br>
<div>
<div>Thanks, that helped me
get started. Unfortunately I
can't set break points when
debugging locally so it
is going to take me a while
answer your questions. The
only dev machine that I use
is 100 miles away from me,
so it will be very hard to
attach a console/USB cable
for debugging. I need to go
hunt for a laptop somewhere,
put windows on it then run a
windbg in server mode. That
way I can connect via tcp
and set breakpoints.</div>
<div><br>
Thanks again</div>
<div><br>
</div>
<div>
<div>On Tue, Mar 13, 2012 at
3:30 PM, Huihong Luo <span
dir="ltr"><<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com"
rel="nofollow"
target="_blank">huisinro@yahoo.com</a>></span>
wrote:<br>
<blockquote
style="BORDER-LEFT:#ccc
1px solid;MARGIN:0px 0px
0px
0.8ex;PADDING-LEFT:1ex">
<table border="0"
cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td valign="top">inside
windbg, click
Disassembly
window, it will
display assembly
code, then you
can set a
breakpoint by
click the left
side of the code
line.
<div><br>
<br>
--- On <b>Tue,
3/13/12, Ribhi
Kamal <i><<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=rbhkamal@gmail.com"
rel="nofollow"
target="_blank">rbhkamal@gmail.com</a>></i></b> wrote:<br>
</div>
<blockquote
style="BORDER-LEFT:rgb(16,16,255)
2px
solid;PADDING-LEFT:5px;MARGIN-LEFT:5px">
<div><br>
From: Ribhi
Kamal <<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=rbhkamal@gmail.com"
rel="nofollow"
target="_blank">rbhkamal@gmail.com</a>><br>
Subject: Re:
[vbox-dev]
IoGetDeviceObjectPointer
hangs
vboxusbmon<br>
</div>
To: "Huihong
Luo" <<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com"
rel="nofollow"
target="_blank">huisinro@yahoo.com</a>><br>
Cc: "vbox-dev"
<<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org"
rel="nofollow"
target="_blank">vbox-dev@virtualbox.org</a>><br>
Date: Tuesday,
March 13,
2012, 12:29 PM
<div>
<div><br>
<br>
<div>The
\Device\USBPDO-11
physical
device is a
sprint hub
driver BcmBusCtr.SYS.
But I've seen
it happen with
other devices
as well (Apple
trackpad)
<div><br>
</div>
<div>Will
update you
once I get
windbg
working.</div>
<div><br>
Thanks</div>
<div><br>
<div>On Tue,
Mar 13, 2012
at 3:08 PM,
Ribhi Kamal <span
dir="ltr"><<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=rbhkamal@gmail.com"
rel="nofollow"
target="_blank">rbhkamal@gmail.com</a>></span> wrote:<br>
<blockquote
style="BORDER-LEFT:#ccc
1px
solid;MARGIN:0px
0px 0px
0.8ex;PADDING-LEFT:1ex">The
hubwalker
loops through
PDO devices
0-15 and it
hangs at
number 11. So
the device
name (hub
name) should
be "\Device\USBPDO-11".
Is that what
you wanted?<br>
<br>
I'm still
trying to
figure out how
to step
through
assembly code
in windbg. I
just started
windows in
debug mode and
connected
windbg.
<div><br>
</div>
<div>In the
mean time, I
found the link
below which
suggests
queuing a work
item to call
IoGetDeviceObjectPointer
using ioallocateworkitem
routine,
should I give
that a try?</div>
<div><a
moz-do-not-send="true"
href="http://www.osronline.com/article.cfm?id=24" rel="nofollow"
target="_blank">http://www.osronline.com/article.cfm?id=24</a><br>
</div>
<div><br>
</div>
<div>Here is a
little
snippet:</div>
<div
style="TEXT-ALIGN:center">
<p
style="MARGIN:0in
0in
0pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px"
align="center"><b>Figure
5 – The <u>wrong</u> way
to write a PnP
Notification
Callback</b></p>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p
style="MARGIN:0in
0in
0pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px"
align="center"><b> </b>
</p>
<p
style="TEXT-ALIGN:justify;MARGIN:0in
0in
0pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px">And,
while you’d be
partially
right, you <i>do</i> get
a pointer to a
device object
using its name
by calling <b>IoGetDeviceObject
Pointer</b>,
you’d also get
bitten by one
of the
conditions of
PnP
Notification
routines. As
it very
clearly states
in the
documentation:
</p>
<p
style="TEXT-ALIGN:justify;MARGIN:0in
0in
0pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px">
</p>
<p
style="TEXT-ALIGN:justify;MARGIN:0in
12.95pt 0pt
8.65pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px"><i>A
callback
routine must
not open the
device
directly. If
the provider
of the
interface
causes
blocking PnP
events, the
notification
callback
routine can
cause a
deadlock if it
tries to open
the device in
the callback
thread.</i> </p>
<p
style="TEXT-ALIGN:justify;MARGIN:0in
12.95pt 0pt
8.65pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px"><i> </i>
</p>
<p
style="TEXT-ALIGN:justify;MARGIN:0in
0in
0pt;FONT-FAMILY:Arial,Helvetica,sans-serif;COLOR:rgb(51,51,51);FONT-SIZE:13px">When
you call <b>IoGetDeviceObjectPointer, </b>you’re
actually
issuing an
open
(IRP_MJ_CREATE)
for the
specified
device. That’s
why you get
back a File
Object
pointer, in
addition to
the Device
Object pointer
that you
wanted. So,
the proper
thing to do is
queue a work
item that does
the call to <b>IoGetDeviceObjectPointer</b>,
as shown in <i>Figure
6</i>. </p>
<div><br>
</div>
<div>
<div>
<div><br>
<div>On Tue,
Mar 13, 2012
at 2:10 PM,
Huihong Luo <span
dir="ltr"><<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com"
rel="nofollow"
target="_blank">huisinro@yahoo.com</a>></span> wrote:<br>
<blockquote
style="BORDER-LEFT:#ccc
1px
solid;MARGIN:0px
0px 0px
0.8ex;PADDING-LEFT:1ex">
<table
border="0"
cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td
valign="top">
<div>This api
simply returns
a device
object from a
name, and
usually does
not block.
What is the <br>
device name?
you can
examine <font
size="-0">ObjectName
unicode
string.</font></div>
<div><font
size="-0"> </font></div>
<div>IoGetDeviceObjectPointer()
does the
following
thing:</div>
<div> </div>
<div>ZwOpenFile(ObjectName)
to get a
handle</div>
<font
size="-0">
<div>ObReferenceObjectByHandle(handle)
to get the
FileObject</div>
<font
size="-0">
<div>IoGetRelatedDeviceObject(FileObject)
to get the
device object</div>
<div> </div>
<div>you can
further step
into the
assembly code
to nail down
which function
call causes
the lock.</div>
<div> </div>
<div>you can
also list all
locks using
these commands
in windbg:</div>
<div> </div>
<div>!locks</div>
<div>!deadlock</div>
</font></font>
<div> <br>
--- On <b>Tue,
3/13/12, Ribhi
Kamal <i><<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=rbhkamal@gmail.com"
rel="nofollow"
target="_blank">rbhkamal@gmail.com</a>></i></b> wrote:<br>
</div>
<blockquote
style="BORDER-LEFT:rgb(16,16,255)
2px
solid;PADDING-LEFT:5px;MARGIN-LEFT:5px"><br>
From: Ribhi
Kamal <<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=rbhkamal@gmail.com"
rel="nofollow"
target="_blank">rbhkamal@gmail.com</a>><br>
Subject: Re:
[vbox-dev]
IoGetDeviceObjectPointer
hangs
vboxusbmon<br>
To: "vbox-dev"
<<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org"
rel="nofollow"
target="_blank">vbox-dev@virtualbox.org</a>><br>
Date: Tuesday,
March 13,
2012, 10:49 AM
<div>
<div><br>
<br>
<div>Sorry,
actually the
IRQL ==
PASSIVE_LEVEL
is okay. So
just ignore
that bit.<br>
<br>
<div>On Tue,
Mar 13, 2012
at 1:27 PM,
Ribhi Kamal <span
dir="ltr"><<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=rbhkamal@gmail.com"
rel="nofollow"
target="_blank">rbhkamal@gmail.com</a>></span> wrote:<br>
<blockquote
style="BORDER-LEFT:#ccc
1px
solid;MARGIN:0px
0px 0px
0.8ex;PADDING-LEFT:1ex">
<div>
<div>
<div>I've been
troubleshooting
an issue that
prevents vbox
from capturing
USB devices
when other
specific USB
devices are
plugged in
(i.e. Sprint
USB crap). I
finally
managed to
track down the
problem to
IoGetDeviceObjectPointer
in
VboxUsbMonHubDevWalk. IoGetDeviceObjectPointer
was getting
called,
however, it
never
returned.
<div><br>
</div>
<div>I'm not
an expert in
windows driver
development so
I'd like to
run things by
you before I
start fixing
it.</div>
<div><br>
</div>
<div>Firstly,
I'm not really
sure why it
hangs
(deadlocks?)
there for some
devices and
not others.
However, I
believe that
it may be due
to the fact
that some
driver
interfaces
cause blocking
PnP events.
Due to that,
vboxusbmon
runs into a
deadlock when
executing IoGetDeviceObjectPointer
because it is
being used
directly from
a callback
function,
VBoxUsbMonDeviceControl,
and
IRQL==PASSIVE_LEVEL.<br>
<div>
<div><br>
</div>
<div>What led
me to that
conclusion is
that right
after
IoGetDeviceObjectPointer
is executed, I
start seeing
lots of PnP
events.</div>
<div>
<div>USBMon::vboxUsbMonHubDevWalk:
</div>
<div>IoGetDeviceObjectPointer
- Starting
</div>
<div><br>
</div>
<div>USBMon::VBoxUsbMonPnPHook:
</div>
<div>VBoxUsbMonPnPHook
In </div>
<div><br>
</div>
<div>USBMon::VBoxUsbMonPnPHook:
</div>
<div>==>PnP:
Mn(IRP_MN_QUERY_DEVICE_RELATIONS),
PDO(0x8833d028),
IRP(0x882a71a8),
Status(0xc00000bb) </div>
<div><br>
</div>
<div>See
attached for
complete debug
view.</div>
<div><br>
</div>
<div>Are my
assumptions
correct? If so
how would you
go about
fixing the
problem.<br>
</div>
</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
</div>
</div>
<div><br>
</div>
-- <br>
-- Ribhi<br>
</div>
</div>
</blockquote>
</div>
<br>
<br
clear="all">
<div><br>
</div>
-- <br>
-- Ribhi<br>
</div>
<br>
</div>
</div>
-----Inline
Attachment
Follows-----<br>
<br>
<div>_______________________________________________<br>
vbox-dev
mailing list<br>
<a
moz-do-not-send="true"
href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org"
rel="nofollow"
target="_blank">vbox-dev@virtualbox.org</a><br>
<a
moz-do-not-send="true"
href="https://www.virtualbox.org/mailman/listinfo/vbox-dev"
rel="nofollow"
target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
</blockquote>
</div>
<br>
<br
clear="all">
<div><br>
</div>
</div>
</div>
<span><font
color="#888888">--
<br>
-- Ribhi<br>
</font></span></div>
<span><font
color="#888888"><br>
<br
clear="all">
<div><br>
</div>
-- <br>
-- Ribhi<br>
</font></span></td>
</tr>
</tbody>
</table>
</blockquote>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
-- Ribhi<br>
</div>
</div>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
vbox-dev mailing list
<a moz-do-not-send="true" href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a>
<a moz-do-not-send="true" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
-- Ribhi<br>
</blockquote>
</body>
</html>