NetBSD Problem Report #50972
From Manuel.Bouyer@lip6.fr Thu Mar 17 10:00:24 2016
Return-Path: <Manuel.Bouyer@lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 445BB7ABEE
for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Mar 2016 10:00:24 +0000 (UTC)
Message-Id: <20160317100017.2B844A882@armandeche.soc.lip6.fr>
Date: Thu, 17 Mar 2016 11:00:17 +0100 (MET)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@NetBSD.org
Subject: unpluging a in-use USB device hangs
X-Send-Pr-Version: 3.95
>Number: 50972
>Category: kern
>Synopsis: unpluging a in-use USB device hangs
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 17 10:05:00 +0000 2016
>Closed-Date: Sun Oct 20 08:51:55 +0000 2019
>Last-Modified: Sun Oct 20 08:51:55 +0000 2019
>Originator: Manuel Bouyer
>Release: NetBSD 7.0_STABLE
>Organization:
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
>Environment:
System: NetBSD armandeche.soc.lip6.fr 7.0_STABLE NetBSD 7.0_STABLE (GENERIC.201603102140Z) amd64
Architecture: x86_64
Machine: amd64
>Description:
Unpluging a in-use USB device hangs the system hard: no more network,
no more character echo from console. I can still enter ddb from a
serial console through.
The example below is with a umass, but I've also been hit by this with
usb to serial converter on occasion. This example is with Xen but I've
also seen this on base-metal GENERIC kernel.
[plug umass device]
borneo:/root#umass0 at uhub2 port 3 configuration 1 interface 0
umass0: Lexar USB Flash Drive, rev 2.00/11.00, addr 2
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Lexar, USB Flash Drive, 1100> disk removable
sd0: fabricating a geometry
sd0: 59904 MB, 59904 cyl, 64 head, 32 sec, 512 bytes/sect x 122683392 sectors
sd0: fabricating a geometry
borneo:/root#mount -r /dev/sd0e /mnt
borneo:/root#df
Filesystem 1K-blocks Used Avail %Cap Mounted on
/dev/wd0a 10321774 2770480 7035206 28% /
/dev/wd0g 103220710 2557542 95502134 2% /home
/dev/wd0h 524178708 205575020 292394756 41% /domains
kernfs 1 1 0 100% /kern
ptyfs 1 1 0 100% /dev/pts
tmpfs 131072 4 131068 0% /var/shm
/dev/sd0e 61326688 41801664 19525024 68% /mnt
[unplug umass device]
borneo:/root#umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
[hang]
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff801fbad5 cs e030 rflags 202 cr2 7f7ff7b06000 ilevel 8 rsp ffffa00019427900
curlwp 0xffffa00001532100 pid 0.42 lowest kstack 0xffffa000194242c0
Stopped in pid 0.42 (system) at netbsd:breakpoint+0x5: leave
breakpoint() at netbsd:breakpoint+0x5
xencons_tty_input() at netbsd:xencons_tty_input+0xb2
xencons_intr() at netbsd:xencons_intr+0x4c
evtchn_do_event() at netbsd:evtchn_do_event+0x298
do_hypervisor_callback() at netbsd:do_hypervisor_callback+0x176
hypervisor_callback() at netbsd:hypervisor_callback+0x9e
vrevoke() at netbsd:vrevoke+0x9e
genfs_revoke() at netbsd:genfs_revoke+0x13
VOP_REVOKE() at netbsd:VOP_REVOKE+0x53
vdevgone() at netbsd:vdevgone+0x4f
sddetach() at netbsd:sddetach+0xb4
config_detach() at netbsd:config_detach+0xf8
scsipi_target_detach() at netbsd:scsipi_target_detach+0xbc
scsibusdetach() at netbsd:scsibusdetach+0x35
config_detach() at netbsd:config_detach+0xf8
umass_detach() at netbsd:umass_detach+0xa0
config_detach() at netbsd:config_detach+0xf8
usb_disconnect_port() at netbsd:usb_disconnect_port+0xae
uhub_explore() at netbsd:uhub_explore+0x180
usb_discover.isra.2() at netbsd:usb_discover.isra.2+0x4e
usb_event_thread() at netbsd:usb_event_thread+0x74
ds 6fb0
es 7e49
fs 0
gs ec12
rdi ffffa00001027080
rsi ffffffff80e9eab0 rbuf.11823
rbp ffffa00019427900
rbx ffffffff80e9eab0 rbuf.11823
rdx 2b
rcx 2b
rax 1
r8 9
r9 2
r10 2
r11 ffffa000019f0638
r12 ffffa00001029388
r13 ffffffff80e9eab1 rbuf.11823+0x1
r14 ffffa00001027080
r15 ffffa00000e51a08
rip ffffffff801fbad5 breakpoint+0x5
cs e030
rflags 202
rsp ffffa00019427900
ss e02b
netbsd:breakpoint+0x5: leave
db> sh ev
evcnt type 0: bus_dma bounces = 128
evcnt type 0: bus_dma loads = 23587
evcnt type 0: bus_dma nbouncebufs = 641
evcnt type 0: vmcmd kills = 253
evcnt type 0: vmcmd extends = 49
evcnt type 0: vmcmd calls = 2189
evcnt type 0: vmem static_bt_inuse = 200
evcnt type 0: vmem static_bt_count = 200
evcnt type 0: softint net/0 = 899
evcnt type 0: softint bio/0 = 23201
evcnt type 0: softint clk/0 = 7631
evcnt type 0: softint ser/0 = 599
evcnt type 0: callout late/0 = 19
evcnt type 0: crosscall unicast = 4
evcnt type 0: namecache entries collected = 449
evcnt type 0: namecache under scan target = 345
evcnt type 1: vcpu0 xencons = 104
evcnt type 1: vcpu0 ioapic0 pin 18 = 25964
evcnt type 1: vcpu0 ioapic0 pin 17 = 35
evcnt type 1: vcpu0 ioapic0 pin 21 = 425
evcnt type 1: vcpu0 ioapic0 pin 16 = 3
evcnt type 1: vcpu0 ioapic0 pin 22 = 488
evcnt type 1: vcpu0 ioapic0 pin 23 = 3
evcnt type 1: vcpu0 hardclock = 36155
evcnt type 1: vcpu0 clock = 36099
evcnt type 1: vcpu0 xenbus = 57
db> ps
PID LID S CPU FLAGS STRUCT LWP * NAME WAIT
653 1 2 0 0 ffffa000016321c0 tcsh
719 1 3 0 80 ffffa00001a4f6c0 ksh pause
878 1 3 0 80 ffffa00001686a60 tcsh ttyraw
40 1 3 0 80 ffffa0000166a620 sshd select
916 1 3 0 80 ffffa0000166aa40 sshd select
851 1 3 0 80 ffffa00001ad96e0 getty ttyraw
952 1 3 0 80 ffffa000016571e0 getty ttyraw
731 1 3 0 80 ffffa00001657a20 getty ttyraw
953 1 3 0 80 ffffa00001539560 login wait
882 1 3 0 80 ffffa00001ad9b00 cron nanoslp
661 1 3 0 80 ffffa00001a4fae0 inetd kqueue
826 1 3 0 80 ffffa00001a37280 qmgr kqueue
860 1 3 0 80 ffffa00001ad92c0 pickup kqueue
615 1 3 0 80 ffffa000020e4b20 master kqueue
471 1 3 0 80 ffffa00001a4f2a0 sshd select
515 1 3 0 80 ffffa00001a376a0 powerd kqueue
342 2 3 0 80 ffffa00001938680 xenconsoled netio
342 1 3 0 80 ffffa0000166a200 xenconsoled select
460 1 3 0 80 ffffa00001a37ac0 xenstored select
221 1 2 0 0 ffffa00001938aa0 syslogd
158 4 3 0 80 ffffa00001720240 dhclient parked
158 3 3 0 80 ffffa00001686640 dhclient kqueue
158 2 3 0 80 ffffa00001720660 dhclient parked
158 1 3 0 80 ffffa00001720a80 dhclient parked
1 1 3 0 80 ffffa000015629c0 init wait
0 57 3 0 200 ffffa0000102b8e0 scsibus0 sccomp
0 56 3 0 200 ffffa00001686220 xen_balloon xen_balloon
0 55 3 0 200 ffffa000016045c0 physiod physiod
0 54 3 0 200 ffffa000016325e0 aiodoned aiodoned
0 53 3 0 200 ffffa00001632a00 ioflush syncer
0 52 3 0 200 ffffa000016041a0 pgdaemon pgdaemon
0 49 3 0 200 ffffa000016049e0 atapibus0 sccomp
0 46 3 0 200 ffffa00001539980 usb6 usbevt
0 45 3 0 200 ffffa00001538120 usb5 usbevt
0 44 3 0 200 ffffa00001538540 usb4 usbevt
0 43 3 0 200 ffffa00001538960 usb3 usbevt
0 > 42 7 0 200 ffffa00001532100 usb2
0 41 3 0 200 ffffa00001532520 usb1 usbevt
0 40 3 0 200 ffffa00001562180 usb0 usbevt
0 39 3 0 200 ffffa000015625a0 cryptoret crypto_w
0 38 3 0 200 ffffa0000153a160 unpgc unpgc
0 37 3 0 200 ffffa00001539140 vmem_rehash vmem_rehash
0 36 3 0 200 ffffa0000153a580 xenbus rdst
0 35 3 0 200 ffffa0000153a9a0 xenwatch evtsq
0 26 3 0 200 ffffa00001532940 atabus6 atath
0 25 3 0 200 ffffa000014e40e0 atabus5 atath
0 24 3 0 200 ffffa000014e4500 atabus4 atath
0 23 3 0 200 ffffa000014e4920 atabus3 atath
0 22 3 0 200 ffffa000011d00c0 atabus2 atath
0 21 3 0 200 ffffa000011d04e0 usbtask-dr usbtsk
0 20 3 0 200 ffffa000011d0900 usbtask-hc usbtsk
0 19 3 0 200 ffffa0000102b0a0 atabus1 atath
0 18 3 0 200 ffffa0000102b4c0 atabus0 atath
0 16 3 0 200 ffffa0000100a080 sysmon smtaskq
0 15 3 0 200 ffffa0000100a4a0 pmfsuspend pmfsuspend
0 14 3 0 200 ffffa0000100a8c0 pmfevent pmfevent
0 13 3 0 200 ffffa00000e6d060 sopendfree sopendfr
0 12 3 0 200 ffffa00000e6d480 nfssilly nfssilly
0 11 3 0 200 ffffa00000e6d8a0 cachegc cachegc
0 10 3 0 200 ffffa00000e6b040 vrele vrele
0 9 3 0 200 ffffa00000e6b460 vdrain vdrain
0 8 3 0 200 ffffa00000e6b880 modunload mod_unld
0 7 3 0 200 ffffa00000e62020 xcall/0 xcall
0 6 1 0 200 ffffa00000e62440 softser/0
0 5 1 0 200 ffffa00000e62860 softclk/0
0 4 1 0 200 ffffa00000e60000 softbio/0
0 3 1 0 200 ffffa00000e60420 softnet/0
0 2 1 0 201 ffffa00000e60840 idle/0
0 1 3 0 200 ffffffff80cecd20 swapper uvm
db> tr/a ffffa00001532100
trace: pid 0 lid 42 at 0xffffa00019427900
breakpoint() at netbsd:breakpoint+0x5
xencons_tty_input() at netbsd:xencons_tty_input+0xb2
xencons_intr() at netbsd:xencons_intr+0x4c
evtchn_do_event() at netbsd:evtchn_do_event+0x298
do_hypervisor_callback() at netbsd:do_hypervisor_callback+0x176
hypervisor_callback() at netbsd:hypervisor_callback+0x9e
vrevoke() at netbsd:vrevoke+0x9e
genfs_revoke() at netbsd:genfs_revoke+0x13
VOP_REVOKE() at netbsd:VOP_REVOKE+0x53
vdevgone() at netbsd:vdevgone+0x4f
sddetach() at netbsd:sddetach+0xb4
config_detach() at netbsd:config_detach+0xf8
scsipi_target_detach() at netbsd:scsipi_target_detach+0xbc
scsibusdetach() at netbsd:scsibusdetach+0x35
config_detach() at netbsd:config_detach+0xf8
umass_detach() at netbsd:umass_detach+0xa0
config_detach() at netbsd:config_detach+0xf8
usb_disconnect_port() at netbsd:usb_disconnect_port+0xae
uhub_explore() at netbsd:uhub_explore+0x180
usb_discover.isra.2() at netbsd:usb_discover.isra.2+0x4e
usb_event_thread() at netbsd:usb_event_thread+0x74
db> tr/a ffffa000016321c0
trace: pid 653 lid 1 at 0xffffa00019488be0
sleepq_block() at netbsd:sleepq_block+0x8e
cv_timedwait_sig() at netbsd:cv_timedwait_sig+0xfc
ttysleep() at netbsd:ttysleep+0x74
ttread() at netbsd:ttread+0x295
cnread() at netbsd:cnread+0x46
spec_read() at netbsd:spec_read+0x9b
VOP_READ() at netbsd:VOP_READ+0x55
vn_read() at netbsd:vn_read+0x94
dofileread() at netbsd:dofileread+0x90
sys_read() at netbsd:sys_read+0x5f
syscall() at netbsd:syscall+0x9a
--- syscall (number 3) ---
7f7ff6c3c3ba:
db> reboot
(gdb) l *(vrevoke+0x9e)
0xffffffff807199e6 is at /home/bouyer/src-7/src/sys/kern/vfs_vnode.c:1131.
1126 dev = vp->v_rdev;
1127 type = vp->v_type;
1128 mutex_exit(vp->v_interlock);
1129 }
1130
1131 while (spec_node_lookup_by_dev(type, dev, &vq) == 0) {
1132 vgone(vq);
1133 }
1134 }
1135
So I suspect it's stuck in the above while() loop.
>How-To-Repeat:
see above
>Fix:
unknown, but we really need one
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Sat, 19 Mar 2016 11:25:00 +0000
Responsible-Changed-Why:
Take
From: Nick Hudson <skrll@netbsd.org>
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: kern/50972: unpluging a in-use USB device hangs
Date: Sat, 16 Apr 2016 07:38:27 +0100
On 03/17/16 10:05, Manuel.Bouyer@lip6.fr wrote:
>> Number: 50972
>> Category: kern
>> Synopsis: unpluging a in-use USB device hangs
Does src/sys/miscfs/specfs/spec_vnops.c:1.162 help here?
Nick
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sat, 23 Apr 2016 12:59:17 +0000
State-Changed-Why:
Feedback requested.
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Nick Hudson <skrll@netbsd.org>
Cc: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: kern/50972: unpluging a in-use USB device hangs
Date: Mon, 25 Apr 2016 21:58:06 +0200
On Sat, Apr 16, 2016 at 07:38:27AM +0100, Nick Hudson wrote:
> On 03/17/16 10:05, Manuel.Bouyer@lip6.fr wrote:
> >>Number: 50972
> >>Category: kern
> >>Synopsis: unpluging a in-use USB device hangs
>
> Does src/sys/miscfs/specfs/spec_vnops.c:1.162 help here?
Do you mean only rev 1.162, or also previous revisions ?
1.161->1.162 doesn't apply to netbsd-7. I did the patch by hand,
but this didn't help (it hangs on a mutex in revoke).
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: Nick Hudson <skrll@netbsd.org>
To: Manuel Bouyer <bouyer@antioche.eu.org>, Nick Hudson <skrll@netbsd.org>
Cc: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/50972: unpluging a in-use USB device hangs
Date: Tue, 26 Apr 2016 11:49:29 +0100
On 04/25/16 20:58, Manuel Bouyer wrote:
> On Sat, Apr 16, 2016 at 07:38:27AM +0100, Nick Hudson wrote:
>> On 03/17/16 10:05, Manuel.Bouyer@lip6.fr wrote:
>>>> Number: 50972
>>>> Category: kern
>>>> Synopsis: unpluging a in-use USB device hangs
>> Does src/sys/miscfs/specfs/spec_vnops.c:1.162 help here?
> Do you mean only rev 1.162, or also previous revisions ?
> 1.161->1.162 doesn't apply to netbsd-7. I did the patch by hand,
> but this didn't help (it hangs on a mutex in revoke).
>
OH, you're on netbsd-7. spec_vnops.c has other changes that are
needed as well, I think
Nick
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@netbsd.org
Cc: skrll@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/50972: unpluging a in-use USB device hangs
Date: Tue, 26 Apr 2016 13:32:12 +0200
On Tue, Apr 26, 2016 at 11:25:00AM +0000, Nick Hudson wrote:
> The following reply was made to PR kern/50972; it has been noted by GNATS.
>
> From: Nick Hudson <skrll@netbsd.org>
> To: Manuel Bouyer <bouyer@antioche.eu.org>, Nick Hudson <skrll@netbsd.org>
> Cc: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
> gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
> Subject: Re: kern/50972: unpluging a in-use USB device hangs
> Date: Tue, 26 Apr 2016 11:49:29 +0100
>
> On 04/25/16 20:58, Manuel Bouyer wrote:
> > On Sat, Apr 16, 2016 at 07:38:27AM +0100, Nick Hudson wrote:
> >> On 03/17/16 10:05, Manuel.Bouyer@lip6.fr wrote:
> >>>> Number: 50972
> >>>> Category: kern
> >>>> Synopsis: unpluging a in-use USB device hangs
> >> Does src/sys/miscfs/specfs/spec_vnops.c:1.162 help here?
> > Do you mean only rev 1.162, or also previous revisions ?
> > 1.161->1.162 doesn't apply to netbsd-7. I did the patch by hand,
> > but this didn't help (it hangs on a mutex in revoke).
> >
> OH, you're on netbsd-7.
Yes, the PR is against netbsd-7.
> spec_vnops.c has other changes that are
> needed as well, I think
can you provide a patch ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: Nick Hudson <skrll@netbsd.org>
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
Manuel.Bouyer@lip6.fr
Cc:
Subject: Re: kern/50972: unpluging a in-use USB device hangs
Date: Fri, 13 May 2016 10:46:13 +0100
On 04/26/16 12:35, Manuel Bouyer wrote:
> > OH, you're on netbsd-7.
>
> Yes, the PR is against netbsd-7.
>
> > spec_vnops.c has other changes that are
> > needed as well, I think
>
> can you provide a patch ?
netbsd-7 now has the changes I was refering to
Nick
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 14 May 2016 18:42:56 +0000
State-Changed-Why:
feedback was received
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 14 May 2016 18:43:14 +0000
State-Changed-Why:
but a new question appears: please try latest -7...
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Nick Hudson <skrll@netbsd.org>
Cc: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/50972: unpluging a in-use USB device hangs
Date: Wed, 18 May 2016 12:56:21 +0200
On Fri, May 13, 2016 at 10:46:13AM +0100, Nick Hudson wrote:
> On 04/26/16 12:35, Manuel Bouyer wrote:
>
> > > OH, you're on netbsd-7.
> > Yes, the PR is against netbsd-7.
> > > spec_vnops.c has other changes that are
> > > needed as well, I think
> > can you provide a patch ?
>
>
> netbsd-7 now has the changes I was refering to
I tried a GENERIC.201605170540Z kernel, I still see the hard hang
after unplunging the umass device:
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Sony, Storage Media, 0100> disk removable
sd0: 1920 MB, 3936 cyl, 16 head, 63 sec, 512 bytes/sect x 3932160 sectors
[ mount, use and unplug without unmount]
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
[hard hang]
from there I get no reaction on (serial) console nor network.
But I can enter ddb:
~fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff8028258d cs 8 rflags 202 cr2 ffff80008e3d2781 ilevel 8 rsp fffffe810000bc50
curlwp 0xfffffe823773d860 pid 0.5 lowest kstack 0xfffffe81000092c0
Stopped in pid 0.5 (system) at netbsd:breakpoint+0x5: leave
db{0}> tr
breakpoint() at netbsd:breakpoint+0x5
comintr() at netbsd:comintr+0x524
Xintr_ioapic_edge8() at netbsd:Xintr_ioapic_edge8+0xea
--- interrupt ---
_kernel_lock() at netbsd:_kernel_lock+0x9b
intr_biglock_wrapper() at netbsd:intr_biglock_wrapper+0x12
Xintr_ioapic_level4() at netbsd:Xintr_ioapic_level4+0xf2
--- interrupt ---
x86_pause() at netbsd:x86_pause+0x2
callout_softclock() at netbsd:callout_softclock+0x242
softint_dispatch() at netbsd:softint_dispatch+0x79
DDB lost frame for netbsd:Xsoftintr+0x4f, trying 0xfffffe810000bff0
Xsoftintr() at netbsd:Xsoftintr+0x4f
--- interrupt
db{0}> mach cpu 1
using CPU 1
db{0}> tr
mutex_enter() at netbsd:mutex_enter+0x11
vrevoke() at netbsd:vrevoke+0x93
genfs_revoke() at netbsd:genfs_revoke+0xd
VOP_REVOKE() at netbsd:VOP_REVOKE+0x32
vdevgone() at netbsd:vdevgone+0x4f
sddetach() at netbsd:sddetach+0xb4
config_detach() at netbsd:config_detach+0x8b
scsipi_target_detach() at netbsd:scsipi_target_detach+0xbc
scsibusdetach() at netbsd:scsibusdetach+0x36
config_detach() at netbsd:config_detach+0x8b
umass_detach() at netbsd:umass_detach+0x8e
config_detach() at netbsd:config_detach+0x8b
usb_disconnect_port() at netbsd:usb_disconnect_port+0xaa
uhub_explore() at netbsd:uhub_explore+0x180
usb_discover.isra.0() at netbsd:usb_discover.isra.0+0x3e
usb_event_thread() at netbsd:usb_event_thread+0x74
db{0}> ps
PID LID S CPU FLAGS STRUCT LWP * NAME WAIT
66 1 3 0 80 fffffe8234129320 tcsh ttyraw
75 1 3 0 80 fffffe82322c4440 tcsh ttyraw
403 1 3 0 80 fffffe8232e8cb80 ksh pause
506 1 3 0 80 fffffe82357d9240 tcsh pause
41 1 3 1 80 fffffe82357d9a80 screen-4.3.1 select
42 1 3 0 80 fffffe8235868680 screen-4.3.1 pause
783 1 3 0 80 fffffe82357d9660 tcsh pause
583 1 3 1 80 fffffe82358f0ac0 sshd select
774 1 3 0 80 fffffe8235868260 sshd select
603 1 3 0 80 fffffe8232e8c760 getty ttyraw
632 1 3 1 80 fffffe822ffe4ba0 getty ttyraw
717 1 3 0 80 fffffe81005d05c0 getty ttyraw
823 1 3 1 80 fffffe8235a12220 getty ttyraw
780 1 3 0 80 fffffe8232a45000 cron nanoslp
665 1 3 1 80 fffffe822ffe4360 inetd kqueue
773 1 3 1 80 fffffe8232a45420 qmgr kqueue
686 1 3 0 80 fffffe82322c4860 pickup kqueue
721 1 3 0 80 fffffe822ffe4780 master kqueue
382 1 3 0 80 fffffe8232e8c340 sshd select
479 1 3 0 80 fffffe8234129740 powerd kqueue
196 > 1 7 0 0 fffffe823463f6e0 syslogd
149 4 3 1 80 fffffe823463fb00 dhclient parked
149 3 3 1 80 fffffe8234d292a0 dhclient kqueue
149 2 3 1 80 fffffe8234d29ae0 dhclient parked
149 1 3 0 80 fffffe82358f0280 dhclient parked
1 1 3 1 80 fffffe8100626a20 init wait
0 65 3 1 200 fffffe8235868aa0 scsibus0 sccomp
0 64 3 0 200 fffffe8235ab8620 physiod physiod
0 63 3 1 200 fffffe8235a12640 aiodoned aiodoned
0 62 2 1 200 fffffe8235a12a60 ioflush
0 61 3 1 200 fffffe8235ab8200 pgdaemon pgdaemon
0 58 3 1 200 fffffe8235ab8a40 atapibus0 sccomp
0 55 2 0 200 fffffe81005d09e0 usb6
0 54 2 0 200 fffffe81005cf180 usb5
0 53 2 0 200 fffffe81005cf5a0 usb4
0 52 2 0 200 fffffe81005cf9c0 usb3
0 > 51 7 1 200 fffffe810059d580 usb2
0 50 2 0 200 fffffe810059d160 usb0
0 49 2 0 200 fffffe81006261e0 usb1
0 48 3 1 200 fffffe8100626600 cryptoret crypto_w
0 47 3 1 200 fffffe81006521c0 unpgc unpgc
0 46 3 0 200 fffffe81005d01a0 vmem_rehash vmem_rehash
0 45 3 1 200 fffffe81006525e0 coretemp1 coretemp1
0 44 3 1 200 fffffe8100652a00 coretemp0 coretemp0
0 35 2 0 200 fffffe810059d9a0 iic0
0 34 3 0 200 fffffe8100507140 atabus6 atath
0 33 3 1 200 fffffe8100507560 atabus5 atath
0 32 3 1 200 fffffe8100507980 atabus4 atath
0 31 3 1 200 fffffe81003bb120 atabus3 atath
0 30 3 0 200 fffffe81003bb540 atabus2 atath
0 29 3 0 200 fffffe81003bb960 usbtask-dr usbtsk
0 28 3 1 200 fffffe810029d100 usbtask-hc usbtsk
0 27 3 0 200 fffffe810029d520 atabus1 atath
0 26 3 1 200 fffffe810029d940 atabus0 atath
0 25 3 0 200 fffffe81000810e0 intelfb intelfb
0 24 3 0 200 fffffe8100081500 i915 i915
0 23 3 0 200 fffffe8100081920 lnxsyswq lnxsyswq
0 22 3 1 200 fffffe81000970c0 xcall/1 xcall
0 21 1 1 200 fffffe81000974e0 softser/1
0 20 1 1 200 fffffe8100097900 softclk/1
0 19 1 1 200 fffffe81000590a0 softbio/1
0 18 1 1 200 fffffe81000594c0 softnet/1
0 17 1 1 201 fffffe81000598e0 idle/1
0 16 3 0 200 fffffe8235b0d080 sysmon smtaskq
0 15 3 0 200 fffffe8235b0d4a0 pmfsuspend pmfsuspend
0 14 3 0 200 fffffe8235b0d8c0 pmfevent pmfevent
0 13 3 0 200 fffffe8236b29060 sopendfree sopendfr
0 12 3 0 200 fffffe8236b29480 nfssilly nfssilly
0 11 3 0 200 fffffe8236b298a0 cachegc cachegc
0 10 2 1 200 fffffe8237731040 vrele
0 9 2 1 200 fffffe8237731460 vdrain
0 8 3 0 200 fffffe8237731880 modunload mod_unld
0 7 3 0 200 fffffe823773d020 xcall/0 xcall
0 6 1 0 200 fffffe823773d440 softser/0
0 > 5 7 0 200 fffffe823773d860 softclk/0
0 4 1 0 200 fffffe8237743000 softbio/0
0 3 1 0 200 fffffe8237743420 softnet/0
0 2 1 0 201 fffffe8237743840 idle/0
0 1 2 1 200 ffffffff81005540 swapper
db{0}> tr/a fffffe823773d860
trace: pid 0 lid 5 at 0xfffffe810052db30
mutex_enter() at netbsd:mutex_enter+0x11
vrevoke() at netbsd:vrevoke+0x93
genfs_revoke() at netbsd:genfs_revoke+0xd
VOP_REVOKE() at netbsd:VOP_REVOKE+0x32
vdevgone() at netbsd:vdevgone+0x4f
sddetach() at netbsd:sddetach+0xb4
config_detach() at netbsd:config_detach+0x8b
scsipi_target_detach() at netbsd:scsipi_target_detach+0xbc
scsibusdetach() at netbsd:scsibusdetach+0x36
config_detach() at netbsd:config_detach+0x8b
umass_detach() at netbsd:umass_detach+0x8e
config_detach() at netbsd:config_detach+0x8b
usb_disconnect_port() at netbsd:usb_disconnect_port+0xaa
uhub_explore() at netbsd:uhub_explore+0x180
usb_discover.isra.0() at netbsd:usb_discover.isra.0+0x3e
usb_event_thread() at netbsd:usb_event_thread+0x74
db{0}> tr/a fffffe810059d580
trace: pid 0 lid 51 at 0xfffffe810052db60
vrevoke() at netbsd:vrevoke+0x93
genfs_revoke() at netbsd:genfs_revoke+0xd
VOP_REVOKE() at netbsd:VOP_REVOKE+0x32
vdevgone() at netbsd:vdevgone+0x4f
sddetach() at netbsd:sddetach+0xb4
config_detach() at netbsd:config_detach+0x8b
scsipi_target_detach() at netbsd:scsipi_target_detach+0xbc
scsibusdetach() at netbsd:scsibusdetach+0x36
config_detach() at netbsd:config_detach+0x8b
umass_detach() at netbsd:umass_detach+0x8e
config_detach() at netbsd:config_detach+0x8b
usb_disconnect_port() at netbsd:usb_disconnect_port+0xaa
uhub_explore() at netbsd:uhub_explore+0x180
usb_discover.isra.0() at netbsd:usb_discover.isra.0+0x3e
usb_event_thread() at netbsd:usb_event_thread+0x74
db{0}> tr/a fffffe823463f6e0
trace: pid 196 lid 1 at 0xfffffe81006ece80
kevent1() at netbsd:kevent1+0x58d
sys___kevent50() at netbsd:sys___kevent50+0x33
syscall() at netbsd:syscall+0x9a
--- syscall (number 435) ---
I'm not sure why we have the same stack trace for LID 5 and 51.
This may be a ddb issue.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
State-Changed-From-To: feedback->open
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Wed, 05 Oct 2016 07:24:06 +0000
State-Changed-Why:
Feedback has been provided.
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Thu, 05 Sep 2019 05:11:02 +0000
State-Changed-Why:
Does the problem exist in HEAD. I seem to remember some changes there that help.
From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: gnats-bugs@netbsd.org
Cc: skrll@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: kern/50972 (unpluging a in-use USB device hangs)
Date: Mon, 23 Sep 2019 20:14:02 +0200
On Thu, Sep 05, 2019 at 05:11:03AM +0000, skrll@NetBSD.org wrote:
> Synopsis: unpluging a in-use USB device hangs
>
> State-Changed-From-To: open->feedback
> State-Changed-By: skrll@NetBSD.org
> State-Changed-When: Thu, 05 Sep 2019 05:11:02 +0000
> State-Changed-Why:
> Does the problem exist in HEAD. I seem to remember some changes there that help.
I've not seen this with netbsd-9, so indeed it may have been fixed.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--
State-Changed-From-To: feedback->closed
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Sun, 20 Oct 2019 08:51:55 +0000
State-Changed-Why:
Seems to be fixed in HEAD and netbsd-9
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.