Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Oct 2010 17:49:10 -0700
From:      David Wolfskill <david@catwhisker.org>
To:        Julian Elischer <julian@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: Hang near end of kernel probes since r213267 (likely earlier)
Message-ID:  <20101004004910.GD1410@albert.catwhisker.org>
In-Reply-To: <4CA906EB.5090305@freebsd.org>
References:  <20101001212038.GE1535@albert.catwhisker.org> <20101001233001.GG1535@albert.catwhisker.org> <20101002013344.GI1535@albert.catwhisker.org> <AANLkTiny8TxsT0jObNqF7Jnkp-wrPBSecp_Y3%2BnKazNg@mail.gmail.com> <20101002033859.GK1535@albert.catwhisker.org> <20101003112859.GW1535@albert.catwhisker.org> <4CA86E73.9080707@icyb.net.ua> <20101003131409.GX1535@albert.catwhisker.org> <4CA906EB.5090305@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--IDYEmSnFhs3mNXr+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
> 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=3D"YES"
dumpdev=3D"/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 - tra=
y 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=20
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 - t=
ray 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=20
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 =3D kdb_enter+0x3a:    movl    $0,0xc0e33574 =3D =
kdb_why
db> show locks
exclusive sleep mutex Giant (Giant) r =3D 1 (0xc0e21950) locked @ /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 =3D sched_switc=
h+0x3bc
mi_switch(104,0,c0cccb89,1f3,68,...) at 0xc08af3a0 =3D mi_switch+0x200
sleepq_switch(c91d6b40,0,c0cccb89,28b,0,...) at 0xc08e4b7b =3D sleepq_switc=
h+0x15f
sleepq_timedwait(c0e1fc24,69,c0cbe3e4,0,0,...) at 0xc08e4b7b =3D sleepq_tim=
edwait+0x6b
_sleep(c0e1fc24,c0e1fc28,68,c0cbe3e4,c8,...) at 0xc08af892 =3D _sleep+0x342
g_waitidle(c0e21950,0,c0cd59c7,a2,29e,...) at 0xc083ee90 =3D g_waitidle+0xc0
vfs_mountroot(c0e21950,4,c0cc12a9,2a0,0,...) at 0xc09378c8 =3D vfs_mountroo=
t+0x98
start_init(0,c6d76d28,c0cc3520,349,c91d3d48,...) at 0xc085f2b5 =3D start_in=
it+0x65
fork_exit(c085f250,0,c6d76d28) at 0xc087c3a8 =3D fork_exit+0xb8
fork_trampoline() at 0xc0bd5824 =3D fork_trampoline+0x8
--- trap 0, eip =3D 0, esp =3D 0xc6d76d60, ebp =3D 0 ---
db> bt 2
sched_switch(c922f000,0,104,191,d0c3a239,...) at 0xc08cccec =3D sched_switc=
h+0x3bc
mi_switch(104,0,c0cccb89,1f3,4c,...) at 0xc08af3a0 =3D mi_switch+0x200
sleepq_switch(c922f000,0,c0cccb89,268,0,...) at 0xc08e3f6f =3D sleepq_switc=
h+0x15f
sleepq_wait(c959e7bc,4c,c0c644ec,0,0,...) at 0xc08e4c73 =3D sleepq_wait+0x63
_sleep(c959e7bc,c9b31d74,4c,c0c644ec,0,...) at 0xc08af8c2 =3D _sleep+0x372
cam_periph_getccb(c959e780,480,80246,c91462e0,c922f0a4,480) at 0xc04860af =
=3D cam_periph_getccb+0xaf
cdgetccb(c0dc7914,c0c64915,c922f000,c0e00998,12d2,...) at 0xc0499e08 =3D cd=
getccb+0xd8
cdprevent(14c,c6d8db64,c04883ca,c0e00998,0,...) at 0xc049a602 =3D cdprevent=
+0c52
cdcheckmedia(c959e780,14c,c0c659d6,bc,0,...) at 0xc049a6a9 =3D cdcheckmedia=
+0x19
cdopen(c953aa00,4,c0cbdd7f,76,0,...) at 0xc049bb2d =3D cdopen+0xed
g_disk_access(ca8c5e80,1,0,0,ca8c5ed8,...) at 0xc083ddcd =3D g_disk_access+=
0x11d
g_access(ca8c5680,1,0,0,ca8c5ed8,...) at 0xc084365e =3D g_access+0x23e
g_part_taste(c0dbcca0,ca8c5e80,0,228,ca8c5d80,...) at 0xc084a0a6 =3D g_part=
_taste+0xc6
g_new_provider_event(ca8c5e80,0,c0cbe313,d9,c922f000,...) at 0xc0843316 =3D=
 g_new_provider_event+0xb6
g_run_events(c0e1fcd8,0,4c,c0ce99a5,64,...) at 0xc083f290 =3D g_run_events+=
0x3c0
g_event_procbody(0,c6d8dd28,c0cc3520,349,c91d3550,...) at 0xc0840d8a =3D g_=
event_procbody+0x8a
fork_exit(c0840d00,0,c6d8dd28) at 0xc087c3a8 =3D fork_exit+0xb8
fork_trampoline() at 0xc0bd5824 =3D fork_trampoline+0x8
--- trap 0, eip =3D 0, esp =3D 0xc6d8dd60, ebp =3D 0 ---
db>=20


Peace,
david
--=20
David H. Wolfskill				david@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.

--IDYEmSnFhs3mNXr+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAkypJIUACgkQmprOCmdXAD0qtACeP2UStN5sdWvloO/Ian6G/d6e
bdEAn37vWKaP85QlM2Of9vPqI44iKCLT
=RK7e
-----END PGP SIGNATURE-----

--IDYEmSnFhs3mNXr+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101004004910.GD1410>