On Fri, Dec 03, 2010 at 03:09:38PM +0100, MERIGHI Marcus wrote:
> [email protected] (Jacob Meuser), 2010.12.03 (Fri) 03:15 (CET):
> > On Thu, Dec 02, 2010 at 11:31:46PM +0000, Jacob Meuser wrote:
> > > On Sat, Nov 27, 2010 at 11:33:15AM +0100, MERIGHI Marcus wrote:
> > > > # unplug pcmcia uhub
> > > > uhci3: host system error
> > > > uhci3: host controller process error
> > > > uhci3: host controller halted
> > > > uhci4: host system error
> > > > uhci4: host controller process error
> > > > uhci4: host controller halted
> > > > ehci0: unrecoverable error, controller halted
> > > > ehci0: blocking intrs 0x10
> > > > uhub3 detached
> > > > usb3 detached
> > > > uhci3 detached
> > > > uhub4 detached
> > > > usb4 detached
> > > > uhci4 detached
> > > > uhub5 detached
> > > > uvm_fault(0xd0a1a040, 0x0, 0, 1) -> e
> > > > kernel: page fault trap, code=0
> > > > Stopped at      usbd_do_request_flags_pipe+0x18:        movl    
> > > > 0x258(%eax),%ec
> > > > x
> > > > ddb>
> > > 
> > > 1) it is impossible to ever fully close the race between when the device
> > > is physically detached and when the kernel will notice.
> > > 2) something odd is happening here.  why is it in uhub_explore() in the
> > > frst place?
> > > 
> > > I now have a cardbus card with the same chipset.  thanks to whoever sent
> > > that to me.  interestingly, it crashes one machine immediately when
> > > inserted (cardbus layer issues), attaches uhci/ehci but doesn't recognize
> > > USB devices and eventually freezes another machine (no crash, just totally
> > > unresponsive), and behaves exactly like what you see on another machine.
> > > so, at least now I can reproduce this to further investigate.
> > 
> > this stops the crash for me.
> 
> for me too, with and without using the uhub. thanks!

yay!

> there are two console logs at the end of my message, first one is just
> to show your code at work and that it is working. 
> second one is the console log when running usbdevs via hotplugd
> instantly after attaching pcmcia uhub (kernel panic). since I have no
> idea whether that is related I seek your advice on what to do with this. 


> Session2 is incomplete but the relevant (I think) parts are there:
> I have a script that is called by hotplugd that runs /usr/sbin/usbdevs
> -v -d and causes a kernel panic. If I put a "sleep 1" ahead of usbdevs
> everything is fine.
> 
> 
> # note: without hotplugd running
> uhci3 at cardbus0 dev 0 function 0 "VIA VT83C572 USB" rev 0x62: irq 11
> usb3 at uhci3: USB revision 1.0
> uhub3 at usb3 "VIA UHCI root hub" rev 1.00/1.00 addr 1
> uhci4 at cardbus0 dev 0 function 1 "VIA VT83C572 USB" rev 0x62: irq 11
> usb4 at uhci4: USB revision 1.0
> uhub4 at usb4 "VIA UHCI root hub" rev 1.00/1.00 addr 1
> ehci0 at cardbus0 dev 0 function 2 "VIA VT6202 USB" rev 0x65: irq 11
> usb5 at ehci0: USB revision 2.0
> uhub5 at usb5 "VIA EHCI root hub" rev 2.00/1.00 addr 1
> uhci3: host system error
> uhci3: host controller process error
> uhci3: host controller halted
> uhci4: host system error
> uhci4: host controller process error
> uhci4: host controller halted
> ehci0: unrecoverable error, controller halted
> uhub3 detached
> usb3 detached
> uhci3 detached
> uhub4 detached
> usb4 detached
> uhci4 detached
> uhub5 detached
> usb5 detached
> ehci0 detached
> # note: now hotplugd is running
> uhci3 at cardbus0 dev 0 function 0 "VIA VT83C572 USB" rev 0x62: irq 11
> usb3 at uhci3: USB revision 1.0
> uhub3 at usb3 "VIA UHCI root hub" rev 1.00/1.00 addr 1
> uhci4 at cardbus0 dev 0 function 1 "VIA VT83C572 USB" rev 0x62: irq 11
> usb4 at uhci4: USB revision 1.0
> uhub4 at usb4 "VIA UHCI root hub" rev 1.00/1.00 addr 1
> uvm_fault(0xd09f7ee0, 0xefffe000, 0, 1) -> d
> kernel: page fault trap, code=0
> Stopped at      usbd_fill_deviceinfo+0x186:     movzbl  0x8(%eax),%eax
> ddb> trace
> usbd_fill_deviceinfo(d1f0d480,d1f31600,1,d041df93,d6a8ced4) at 
> usbd_fill_device
> info+0x186
> usbioctl(3d04,c1745504,d1f31600,3,d6a07b2c,3,d6d8a9b0,d6a07b2c) at 
> usbioctl+0x2
> 18
> spec_ioctl(dc2aeda0,d0a19fa0,d69228f0,d09afc10,d6a8ced4) at spec_ioctl+0x8c
> VOP_IOCTL(d6a8ced4,c1745504,d1f31600,3,d6d8a9b0) at VOP_IOCTL+0x42
> vn_ioctl(d69228f0,c1745504,d1f31600,d6a07b2c,174) at vn_ioctl+0x61
> sys_ioctl(d6a07b2c,dc2aef64,dc2aef84,d0736fae,d6a07b2c) at sys_ioctl+0x1b8
> syscall() at syscall+0x2f0
> --- syscall (number 0) ---
> 0x2:
> ddb> ps
>    PID   PPID   PGRP    UID  S       FLAGS  WAIT          COMMAND
>    638  13472  25772      0  2           0                sh
>   2869  13472  25772      0  2           0                sh
>  10305  13472  25772      0  2           0                sh
>  30027  13472  25772      0  2           0                sh
>   3113  13472  25772      0  2           0                sh
> * 4364  13472  25772      0  7      0x4000                usbdevs
>  26777      1  25772      0  3      0x4080  piperd        logger
>  13472      1  25772      0  3        0x80  piperd        sh
>  25772      1  25772      0  3        0x80  htplev        hotplugd
>  25062  14343  29858    515  3      0x4080  piperd        unlinkd
>  29250  14343  29858    515  3      0x4080  poll          ncsa_auth
>  20254  14343  29858    515  3      0x4080  poll          ncsa_auth
>  20193      1  20193      0  3      0x4080  ttyin         getty
>   2981      1   2981      0  3      0x4080  ttyin         getty
>  24730      1  24730      0  3      0x4080  ttyin         getty
>  10892      1  10892      0  3      0x4080  ttyin         getty
>   7036      1   7036      0  3      0x4080  ttyin         ksh
>  22999      1  22999      0  3        0x80  select        cron
>  31261      1  31261      0  3     0x80080  nanosleep     sensorsd
>   1808      1   1808      0  3        0x80  kqread        apmd
>  14343  29858  29858    515  3      0x4180  poll          squid
>  29858      1  29858      0  3        0x80  poll          squid
>  25020      1  32267      0  3        0x80  nanosleep     smartd
>  20035   2725  20035    510  3      0x4080  piperd        logger
>   2725  10873  10873      0  3      0x4080  select        supervise
>    213   5390    213    510  3      0x4180  poll          pdnsd
>   5390  10873  10873      0  3      0x4080  select        supervise
>  10873      1  10873      0  3      0x4080  nanosleep     svscan
>  17258      1  17258     99  3       0x180  poll          aucat
>  27225      1  27225      0  3       0x180  select        inetd
>  24707  20641  20641     95  3       0x180  kqread        smtpd
>  12254  20641  20641     95  3       0x180  kqread        smtpd
>  29208  20641  20641     95  3       0x180  kqread        smtpd
>   6635  20641  20641     95  3       0x180  kqread        smtpd
>   1612  20641  20641     95  3       0x180  kqread        smtpd
>   2933  20641  20641     95  3       0x180  kqread        smtpd
>   1257  20641  20641     95  3       0x180  kqread        smtpd
>  18569  20641  20641     95  3       0x180  kqread        smtpd
>  20641      1  20641      0  3        0x80  kqread        smtpd
>  18987  21534  21534    100  3       0x180  kqread        ldapd
>  21534      1  21534      0  3        0x80  kqread        ldapd
>  18542      1  18542      0  3     0x40180  select        lpd
>  11121      1  11121      0  3        0x80  kqread        ifstated
>  20109      1  20109      0  3        0x80  select        sshd
>  26766      0      0      0  3    0x100200  acct          acct
>  18930  27485  15203     83  3       0x180  poll          ntpd
>  27485  15203  15203     83  3       0x180  poll          ntpd
>  15203      1  15203      0  3        0x80  poll          ntpd
>   7450      0      0      0  3    0x100280  nfsidl        nfsio
>  11134      0      0      0  3    0x100280  nfsidl        nfsio
>   8112      0      0      0  3    0x100280  nfsidl        nfsio
>   5583      0      0      0  3    0x100280  nfsidl        nfsio
>  31285      1   8391      0  3        0x80  select        amd
>   4091      1   4091     28  3       0x180  poll          portmap
>   4947  14243  14243     74  3       0x180  bpf           pflogd
>  14243      1  14243      0  3        0x80  netio         pflogd
>  16073  14745  14745     73  2       0x180                syslogd
>  14745      1  14745      0  3        0x88  netio         syslogd
>     14      0      0      0  3    0x100200  aiodoned      aiodoned
>     13      0      0      0  2    0x100200                update
>     12      0      0      0  3    0x100200  cleaner       cleaner
>     11      0      0      0  3    0x100200  reaper        reaper
>     10      0      0      0  3    0x100200  pgdaemon      pagedaemon
>      9      0      0      0  3    0x100200  bored         crypto
>      8      0      0      0  3    0x100200  pftm          pfpurge
>      7      0      0      0  3    0x100200  usbtsk        usbtask
>      6      0      0      0  3    0x100200  usbatsk       usbatsk
>      5      0      0      0  3    0x100200  acpi0         acpi0
>      4      0      0      0  3    0x100200  usbdly        syswq
>      3      0      0      0  3  0x40100200                idle0
>      2      0      0      0  3    0x100200  kmalloc       kmthread
>      1      0      1      0  3      0x4080  wait          init
>      0     -1      0      0  3     0x80200  scheduler     swapper
> ddb> boot sync
> syncing disks... ehci0 at cardbus0 dev 0 function 2 "VIA VT6202 USB" rev 
> 0x65: i
> rq 11
> usb5 at ehci0: USB revision 2.0
> uhub5 at usb5 "VIA EHCI root hub" rev 2.00/1.00 addr 1
> done
> WARNING: not updating battery clock
> rebooting...

hmm.  well, leave the sleep in there for now.  I'll add this to the list
of things to investigate.

-- 
[email protected]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to