NetBSD Problem Report #22218
Received: (qmail 7185 invoked by uid 605); 22 Jul 2003 08:04:17 -0000
Message-Id: <200307220804.h6M84CZ11954@localhost>
Date: Tue, 22 Jul 2003 10:04:13 +0200 (CEST)
From: coto@marsrakete.de
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: coto@marsrakete.de
To: gnats-bugs@gnats.netbsd.org
Subject: USB isoc locks
X-Send-Pr-Version: 3.95
>Number: 22218
>Category: kern
>Synopsis: using a USB isochronous endpoint freezes kernel
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 22 08:05:00 +0000 2003
>Closed-Date:
>Last-Modified: Thu Oct 09 11:45:01 +0000 2008
>Originator: Thomas Runge
>Release: NetBSD 1.6U, snapshot from 07/20/03
>Organization:
>Environment:
Architecture: i386
Machine: i386
>Description:
Using bktr2jpeg (version 2.0a9) with a USB webcam the kernel
freezes hard whenever the app reads from the isochronous endpoint. This
happens on 1.6.1_STABLE too.
>How-To-Repeat:
Using said application available here:
http://core.de/~coto/projects/bktr2jpeg/ with a supported webcam
(ov511 based) or probably any other application reading from any isoc.
>Fix:
There once was a suggestion to comment out the last line in
src/sys/dev/usb/ohci.c:ohci_device_isoc_done (remove xfer->hcpriv = NULL;)
as a workaround. This works (on -stable and -current), but seems to just
hide the bug.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 18 Sep 2008 04:53:01 +0000
State-Changed-Why:
Is this still an issue nowadays?
From: Thomas Runge <coto@marsrakete.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
Date: Tue, 30 Sep 2008 11:19:50 +0200 (CEST)
On Thu, 18 Sep 2008, dholland@NetBSD.org wrote:
> Date: Thu, 18 Sep 2008 04:53:03 +0000 (UTC)
> From: dholland@NetBSD.org
> Reply-To: gnats-bugs@NetBSD.org
> To: kern-bug-people@NetBSD.org, netbsd-bugs@NetBSD.org,
> gnats-admin@NetBSD.org, dholland@NetBSD.org, coto@core.de
> Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
>
> Synopsis: using a USB isochronous endpoint freezes kernel
>
> State-Changed-From-To: open->feedback
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Thu, 18 Sep 2008 04:53:01 +0000
> State-Changed-Why:
> Is this still an issue nowadays?
Sorry for answering late. I grabbed the old laptop out of the basement
and installed -current. My test scenario (old webcam, cambevao-software)
works. Today I'll try to find some time to set it up to serve 24 hours
a day. But even then we'll have to see it survive a few days or weeks.
--
Tom
From: Thomas Runge <coto@marsrakete.de>
To: gnats-bugs@NetBSD.org
Cc: dholland@NetBSD.org
Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
Date: Wed, 8 Oct 2008 18:52:32 +0200 (CEST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--0-1917849325-1223484752=:21239
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Thu, 18 Sep 2008, dholland@NetBSD.org wrote:
> Synopsis: using a USB isochronous endpoint freezes kernel
> State-Changed-Why:
> Is this still an issue nowadays?
I kept the app running for a few days. This works quite nicely, as long,
as there is no activity on this system. When I start a cvs update, the
kernel will panic soon. This is my latest stacktrace:
ugen_isoc_rintr(c1079100,c6e41374,0,1,0,e500,15c0,4,3c1,4) at netbsd:ugen_isoc_rintr+0x56
usb_transfer_complete(c1079100,15c0,20,a,3,c6e41380,c6509520,0,0,0) at netbsd:usb_transfer_complete+0xba
ohci_softintr(c6509524,0,30,c63b0010,c63c0010,0,1fc7be0,c0e9f080,0,c63bbda0) at netbsd:ohci_softintr+0x543
softint_dispatch(c74adae0,4,0,0,0,0,c63bbd90,c63bbbd8,c63bbc30,28) at netbsd:softint_dispatch+0x7c
DDB lost frame for netbsd:Xsoftintr+0x3d, trying 0xc63bbd88
Xsoftintr() at netbsd:Xsoftintr+0x3d
--- interrupt ---
fatal page fault in supervisor mode
trap type 6 code 0 eip c052f6f7 cs 8 eflags 10202 cr2 3c ilevel 8
kernel: supervisor trap page fault, code=0
Faulted in DDB; continuing...
db{0}>
This happens, when I use pkgsrc/graphics/cambevao with an ov511+ based
camera.
I tried making a short test code. You'll find it attached. This one crashes
the kernel as well, but with a different stack trace. The same happens,
when I start cambevao twice. In earlier NetBSD versions I just got an
error when I tried opening the control device twice, now I can do this
and get the panic after a few usb commands (the USB_SET_ALTINTERFACE
fails and then I close the control device. POFF!):
http://coto.marsrakete.de/IMG_1514.JPG (71 KB)
http://coto.marsrakete.de/IMG_1515.JPG (95 KB)
This shows, that we do have serious problems with isochronous USB
transfers, still.
I'm willing to do more testing and debug code as good as my expertise
goes. I can give remote access to my machine, if that would help.
--
Tom
(ex-coto@core.de)
--0-1917849325-1223484752=:21239
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=usb_iso_crash.c
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.64.0810081852320.21239@beaver.marsrakete.de>
Content-Description:
Content-Disposition: attachment; filename=usb_iso_crash.c
I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RkbGliLmg+DQojaW5j
bHVkZSA8ZmNudGwuaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KI2luY2x1ZGUg
PGRldi91c2IvdXNiLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5j
bHVkZSA8c3lzL2lvY3RsLmg+DQoNCmludCBtYWluKGludCBhcmdjLCBjaGFy
ICoqYXJndikNCnsNCglvcGVuX2RldigwKTsNCglvcGVuX2RldigxKTsNCglv
cGVuX2RldigyKTsNCn0NCg0Kdm9pZCBlcnJvcihjaGFyICptc2cpDQp7DQoJ
ZnByaW50ZihzdGRlcnIsICIgICAgICBGYWlsZWQhICVzOiAlc1xuIiwgbXNn
LCBzdHJlcnJvcihlcnJubykpOw0KfQ0KDQppbn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llcnJvcigib3BlbiBpc29jZGV2Iik7DQoJCWNsb3NlKGN0cmxm
ZCk7DQoJfQ0KDQoJLyoNCglmcHJpbnRmKHN0ZGVyciwgIiAgIGNsb3Npbmcg
aXNvY2RldmljZVxuIik7DQoJY2xvc2UoaXNvY2ZkKTsNCglmcHJpbnRmKHN0
ZGVyciwgIiAgIGNsb3NpbmcgY3RybGRldmljZVxuIik7DQoJY2xvc2UoY3Ry
bGZkKTsNCgkqLw0KfQ0KDQo=
--0-1917849325-1223484752=:21239--
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 08 Oct 2008 17:36:21 +0000
State-Changed-Why:
Feedback received.
From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
coto@core.de
Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
Date: Wed, 8 Oct 2008 14:18:58 -0400 (EDT)
On Wed, 8 Oct 2008, Thomas Runge wrote:
> I kept the app running for a few days. This works quite nicely, as long,
> as there is no activity on this system. When I start a cvs update, the
> kernel will panic soon. This is my latest stacktrace:
>
> ugen_isoc_rintr(c1079100,c6e41374,0,1,0,e500,15c0,4,3c1,4) at netbsd:ugen_isoc_rintr+0x56
> usb_transfer_complete(c1079100,15c0,20,a,3,c6e41380,c6509520,0,0,0) at netbsd:usb_transfer_complete+0xba
> ohci_softintr(c6509524,0,30,c63b0010,c63c0010,0,1fc7be0,c0e9f080,0,c63bbda0) at netbsd:ohci_softintr+0x543
> softint_dispatch(c74adae0,4,0,0,0,0,c63bbd90,c63bbbd8,c63bbc30,28) at netbsd:softint_dispatch+0x7c
> DDB lost frame for netbsd:Xsoftintr+0x3d, trying 0xc63bbd88
> Xsoftintr() at netbsd:Xsoftintr+0x3d
> --- interrupt ---
> fatal page fault in supervisor mode
> trap type 6 code 0 eip c052f6f7 cs 8 eflags 10202 cr2 3c ilevel 8
> kernel: supervisor trap page fault, code=0
> Faulted in DDB; continuing...
> db{0}>
This looks identical to an issue I'm seeing with a USB ATSC tuner and
ehci(4). I suspect the ehci isoc code was based on the ohci and uhci
implementations.. are you able to try this camera on a uhci to see if you
can reproduce the same crash there?
Cheers,
Jared
From: Thomas Runge <coto@marsrakete.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
Date: Thu, 9 Oct 2008 08:25:00 +0200 (CEST)
On Wed, 8 Oct 2008, Jared D. McNeill wrote:
> Date: Wed, 8 Oct 2008 18:20:04 +0000 (UTC)
> From: Jared D. McNeill <jmcneill@invisible.ca>
> Reply-To: gnats-bugs@NetBSD.org
> To: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
> netbsd-bugs@NetBSD.org, coto@marsrakete.de
> Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
>
> The following reply was made to PR kern/22218; it has been noted by GNATS.
>
> From: "Jared D. McNeill" <jmcneill@invisible.ca>
> To: gnats-bugs@NetBSD.org
> Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
> coto@core.de
> Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
> Date: Wed, 8 Oct 2008 14:18:58 -0400 (EDT)
>
> On Wed, 8 Oct 2008, Thomas Runge wrote:
> > I kept the app running for a few days. This works quite nicely, as long,
> > as there is no activity on this system. When I start a cvs update, the
> > kernel will panic soon. This is my latest stacktrace:
> >
> > ugen_isoc_rintr(c1079100,c6e41374,0,1,0,e500,15c0,4,3c1,4) at netbsd:ugen_isoc_rintr+0x56
> > usb_transfer_complete(c1079100,15c0,20,a,3,c6e41380,c6509520,0,0,0) at netbsd:usb_transfer_complete+0xba
> > ohci_softintr(c6509524,0,30,c63b0010,c63c0010,0,1fc7be0,c0e9f080,0,c63bbda0) at netbsd:ohci_softintr+0x543
> > softint_dispatch(c74adae0,4,0,0,0,0,c63bbd90,c63bbbd8,c63bbc30,28) at netbsd:softint_dispatch+0x7c
> > DDB lost frame for netbsd:Xsoftintr+0x3d, trying 0xc63bbd88
> > Xsoftintr() at netbsd:Xsoftintr+0x3d
> > --- interrupt ---
> > fatal page fault in supervisor mode
> > trap type 6 code 0 eip c052f6f7 cs 8 eflags 10202 cr2 3c ilevel 8
> > kernel: supervisor trap page fault, code=0
> > Faulted in DDB; continuing...
> > db{0}>
>
> This looks identical to an issue I'm seeing with a USB ATSC tuner and
> ehci(4). I suspect the ehci isoc code was based on the ohci and uhci
> implementations.. are you able to try this camera on a uhci to see if you
> can reproduce the same crash there?
I'm afraid, I can't. I do not own any uhci hardware. This old laptop has
ohci built-in, but I tried (on the same hardware) a USB2-PC-CARD. This
one procides ehci and ohci. Same results.
Do you know any hardware that is known to have uhci? Maybe I could
try on a friends laptop.
--
Tom
From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Thomas Runge <coto@marsrakete.de>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org,
gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/22218 (using a USB isochronous endpoint freezes kernel)
Date: Thu, 09 Oct 2008 07:41:57 -0400
Thomas Runge wrote:
> Do you know any hardware that is known to have uhci? Maybe I could
> try on a friends laptop.
Anything with an Intel or VIA chipset should do.
Cheers,
Jared
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.