Re: Hang near end of kernel probes since r213267 (likely earlier)

From: David Wolfskill <david_at_catwhisker.org>
Date: Sun, 3 Oct 2010 17:49:10 -0700
On Sun, Oct 03, 2010 at 03:42:51PM -0700, Julian Elischer wrote:
>  ...
> well you got the stacktrace of the keyboard handler since you got into 
> ddb via the keyboard..

OK....

> you need to see what ELSE is running.. especially the initial threads.
> and look at THOSE stacks

Ah.  My lack of practice is showing.  :-}

> I think "bt [thread-ID]" works or maybe
> "thread [ID]"  (it's bee a year).

OK.  Armed with that, I tried to re-create the problem a few more times.

First, I used loader.conf to:
boot_verbose="YES"
dumpdev="/dev/ada0s4b"

And then just tried rebooting to single-user.

I noticed, then, that for *successful* boots, I got

start_init: trying /sbin/init
Enter full pathname of shell or RETURN for bin/sh:

*before* I saw

ugen2.2: <Broadcom Corp> at usbus2


This, together with the observation that DDB's "ps" output showed just
about everything other than interrupt threads in state "D" or "DL"
encouraged me to check the backtraces for PID 1 (init) and PID 2
[g_event].

Hmm... actually going to single user on a successfull boot & issuing "ps
axwwl" shows most things in stat "D" or "DL" normally, so maybe I'm
chasing a "red herring."  But at least in this case, init is not in a D
state -- it's "ILs".

Well, maybe this will be of some use anywya:

battery0: battery initialization done, tried 1 times
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub4: 2 ports with 2 removable, self powered
uhub5: 2 ports with 2 removable, self powered
uhub6: 2 ports with 2 removable, self powered
(probe0:abp0:0:0:0): Error 22, Unretryable error
(probe2:abp0:0:0:0): Error 22, Unretryable error
(probe4:abp0:0:0:0): Error 22, Unretryable error
(probe5:abp0:0:0:0): Error 22, Unretryable error
(probe1:abp0:0:0:0): Error 22, Unretryable error
(probe3:abp0:0:0:0): Error 22, Unretryable error
(probe6:abp0:0:0:0): Error 22, Unretryable error
GEOM: new disk cd0
(cd0:ata3:0:0:0): SCSI status error
(cd0:ata3:0:0:0): Requesting SCSI sense data
(cd0:ata3:0:0:0): SCSI status error
(cd0:ata3:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(cd0:ata3:0:0:0): CAM status: SCSI Status Error
(cd0:ata3:0:0:0): SCSI status: Check Condition
(cd0:ata3:0:0:0): SCSI sense: NOT READY asc:3a, 1 (Medium not present - tray closed)
(cd0:ata3:0:0:0): Error 6, Unretryable error
cd0 at ata3 bus 0 scbus2 target 0 lun 0
cd0: <TSSTcorp DVD+-RW TS-U633A D200> Removable CD-ROM SCSI-0 device 
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
ada0 at ata2 bus 0 scbus1 target 0 lun 0
ada0: <ST9250421ASG DE16>  ATA-8 SATA 2.x device
ada0: Serial Number 5TH0BAZX
ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada0: 238475MB (488397168 512 byte sectors: 16H 63S/T 16383C)
pass0 at ata2 bus 0 scbus2 target 0 lun 0
pass0: <ST9250421ASG DE16>  ATA-8 SATA 2.x device
pass0: Serial Number 5TH0BAZX
pass0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
pass1 at ata3 bus 0 scbus2 target 0 lun 0
pass1: <TSSTcorp DVD+-RW TS-U633A D200> Removable CD-ROM SCSI-0 device 
pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
SMP: AP CPU #1 Launched!
cpu1 AP:
     ID: 0x01000000   VER: 0x00050014 LDR: 0x00000000 DFR: 0xffffffff
  lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
  timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400
   cmci: 0x00000000
CPU1: local APIC error 0x80
ooapic0: routing intpin 1 (ISA IRQ 1) to lapic 1 vector 48f
 wtable ciloeaapniecr0 :s troaurttiendg
 intpin 12 (ISA IRQ 12) to lapic 1 vector 49
ioapic0: routing intpin 15 (ISA IRQ 15) to lapic 1 vector 50
ioapic0: routing intpin 19 (PCI IRQ 19) to lapic 1 vector 51
ioapic0: routing intpin 22 (PCI IRQ 22) to lapic 1 vector 52
msi: Assigning MSI IRQ 257 to local APIC 1 vector 53
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
uhub3: 6 ports with 6 removable, self powered
uhub7: 6 ports with 6 removable, self powered
ugen2.2: <Broadcom Corp> at usbus2
  <hang for a while -- keybaord mostly unresponsive>
battery1: battery initialization failed, giving up
  <hang continues; I enter Ctl+Atl+Esc>
KDB: enter: manual escape to debugger
[ thread pid 12 tid 100017 ]
Stopped at     0xc08d992a = kdb_enter+0x3a:    movl    $0,0xc0e33574 = kdb_why
db> show locks
exclusive sleep mutex Giant (Giant) r = 1 (0xc0e21950) locked _at_ /usr/src/sys/dev/syscons/syscons.c:673
db> bt 1
Tracing pid 1 tid 100002 td 0xc91d6b40
sched_switch(c91d6b40,0,104,191,a4bfdaac,...) at 0xc08cccec = sched_switch+0x3bc
mi_switch(104,0,c0cccb89,1f3,68,...) at 0xc08af3a0 = mi_switch+0x200
sleepq_switch(c91d6b40,0,c0cccb89,28b,0,...) at 0xc08e4b7b = sleepq_switch+0x15f
sleepq_timedwait(c0e1fc24,69,c0cbe3e4,0,0,...) at 0xc08e4b7b = sleepq_timedwait+0x6b
_sleep(c0e1fc24,c0e1fc28,68,c0cbe3e4,c8,...) at 0xc08af892 = _sleep+0x342
g_waitidle(c0e21950,0,c0cd59c7,a2,29e,...) at 0xc083ee90 = g_waitidle+0xc0
vfs_mountroot(c0e21950,4,c0cc12a9,2a0,0,...) at 0xc09378c8 = vfs_mountroot+0x98
start_init(0,c6d76d28,c0cc3520,349,c91d3d48,...) at 0xc085f2b5 = start_init+0x65
fork_exit(c085f250,0,c6d76d28) at 0xc087c3a8 = fork_exit+0xb8
fork_trampoline() at 0xc0bd5824 = fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xc6d76d60, ebp = 0 ---
db> bt 2
sched_switch(c922f000,0,104,191,d0c3a239,...) at 0xc08cccec = sched_switch+0x3bc
mi_switch(104,0,c0cccb89,1f3,4c,...) at 0xc08af3a0 = mi_switch+0x200
sleepq_switch(c922f000,0,c0cccb89,268,0,...) at 0xc08e3f6f = sleepq_switch+0x15f
sleepq_wait(c959e7bc,4c,c0c644ec,0,0,...) at 0xc08e4c73 = sleepq_wait+0x63
_sleep(c959e7bc,c9b31d74,4c,c0c644ec,0,...) at 0xc08af8c2 = _sleep+0x372
cam_periph_getccb(c959e780,480,80246,c91462e0,c922f0a4,480) at 0xc04860af = cam_periph_getccb+0xaf
cdgetccb(c0dc7914,c0c64915,c922f000,c0e00998,12d2,...) at 0xc0499e08 = cdgetccb+0xd8
cdprevent(14c,c6d8db64,c04883ca,c0e00998,0,...) at 0xc049a602 = cdprevent+0c52
cdcheckmedia(c959e780,14c,c0c659d6,bc,0,...) at 0xc049a6a9 = cdcheckmedia+0x19
cdopen(c953aa00,4,c0cbdd7f,76,0,...) at 0xc049bb2d = cdopen+0xed
g_disk_access(ca8c5e80,1,0,0,ca8c5ed8,...) at 0xc083ddcd = g_disk_access+0x11d
g_access(ca8c5680,1,0,0,ca8c5ed8,...) at 0xc084365e = g_access+0x23e
g_part_taste(c0dbcca0,ca8c5e80,0,228,ca8c5d80,...) at 0xc084a0a6 = g_part_taste+0xc6
g_new_provider_event(ca8c5e80,0,c0cbe313,d9,c922f000,...) at 0xc0843316 = g_new_provider_event+0xb6
g_run_events(c0e1fcd8,0,4c,c0ce99a5,64,...) at 0xc083f290 = g_run_events+0x3c0
g_event_procbody(0,c6d8dd28,c0cc3520,349,c91d3550,...) at 0xc0840d8a = g_event_procbody+0x8a
fork_exit(c0840d00,0,c6d8dd28) at 0xc087c3a8 = fork_exit+0xb8
fork_trampoline() at 0xc0bd5824 = fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xc6d8dd60, ebp = 0 ---
db> 


Peace,
david
-- 
David H. Wolfskill				david_at_catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

Received on Sun Oct 03 2010 - 22:49:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC