Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Aug 2004 11:04:44 +0200 (MEST)
From:      Michiel Boland <Michiel.Boland@internl.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/71070: Install hangs in g_waitidle
Message-ID:  <200408280904.i7S94ifH000608@brakkenstein.nijmegen.internl.net>
Resent-Message-ID: <200408280910.i7S9AOXj047249@freefall.freebsd.org>

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

>Number:         71070
>Category:       kern
>Synopsis:       Install hangs in g_waitidle
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 28 09:10:24 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michiel Boland
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD leefnet.office.internl.net 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Fri Aug 27 11:02:41 CEST 2004 root@leefnet.office.internl.net:/usr/obj/usr/src/sys/LEEFNET i386


	
>Description:
Booting from CD-ROM hangs in g_waitidle.
The problem is that mdinit() calls g_waitidle.
But since it is called from within g_run_events() the wait never returns,
and all other posted g_events remain in the queue forever.

A typescript follows.

OK boot -d
/boot/kernel/acpi.ko text=0x40864 data=0x1be4+0x110c syms=[0x4+0x7300+0x4+0x9789]
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
KDB: enter: Boot flags requested debugger
[thread 0]
Stopped at      kdb_enter+0x2b: nop
db> write g_debugflags 0xffffffff
g_debugflags                   0        =       0xffffffff
db> c
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 6.0-20040827-SNAP #0: Fri Aug 27 12:32:57 UTC 2004
    root@leefnet.office.internl.net:/usr/obj/usr/src/sys/GENERIC
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel Pentium III (666.69-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x683  Stepping = 3
  Features=0x387f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,PN,MMX,FXSR,SSE>
real memory  = 536805376 (511 MB)
avail memory = 511553536 (487 MB)
g_ignition
g_modevent(FD, LOAD)
g_post_event_x(0xc05d2290, 0xc1d48910, 2, -1067425940)
g_modevent(MD, LOAD)
g_post_event_x(0xc05d2290, 0xc1d48900, 2, -1067425940)
g_modevent(BSD, LOAD)
g_post_event_x(0xc05d2290, 0xc1d488f0, 2, -1067425940)
g_modevent(MBR, LOAD)
g_post_event_x(0xc05d2290, 0xc1d488e0, 2, -1067425940)
g_modevent(MBREXT, LOAD)
g_post_event_x(0xc05d2290, 0xc1d488d0, 2, -1067425940)
g_modevent(ACD, LOAD)
g_post_event_x(0xc05d2290, 0xc1d488c0, 2, -1067425940)
g_modevent(DEV, LOAD)
g_post_event_x(0xc05d2290, 0xc1d488b0, 2, -1067425940)
g_modevent(DISK, LOAD)
g_post_event_x(0xc05d2290, 0xc1d488a0, 2, -1067425940)
g_modevent(SWAP, LOAD)
g_post_event_x(0xc05d2290, 0xc1d48890, 2, -1067425940)
g_modevent(GPT, LOAD)
g_post_event_x(0xc05d2290, 0xc1d48880, 2, -1067425940)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <IntelR AWRDACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
cpu0: <ACPI CPU (3 Cx states)> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz0: _CRT value is absurd, ignored (200.0C)
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0x5000-0x500f,0x4000-0x4041,0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <Intel 82443BX (440 BX) host to PCI bridge> mem 0xe0000000-0xe3ffffff at device 0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pci1: <display> at device 0.1 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 7.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xe000-0xe01f irq 12 at device 7.2 on pci0
uhci0: [GIANT-LOCKED]
usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ums0: Microsoft Microsoft IntelliMouse. Explorer, rev 1.10/1.14, addr 2, iclass 3/1
ums0: 5 buttons and Z dir.
pci0: <bridge, PCI-unknown> at device 7.3 (no driver attached)
pci0: <multimedia, video> at device 11.0 (no driver attached)
pci0: <multimedia, audio> at device 13.0 (no driver attached)
pci0: <input device> at device 13.1 (no driver attached)
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xec00-0xec3f mem 0xe7000000-0xe70fffff,0xe7101000-0xe7101fff irq 11 at device 15.0 on pci0
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:d0:b7:70:12:7f
fxp0: [GIANT-LOCKED]
fdc0: <floppy drive controller> port 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0
fdc0: ic_type 90 part_id 80
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
g_post_event_x(0xc075a0e0, 0xc1db0b00, 2, -1067425940)
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A, console
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0 port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
orm0: <ISA Option ROMs> at iomem 0xcc000-0xccfff,0xc0000-0xcbfff on isa0
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x100>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 666693718 Hz quality 800
Timecounters tick every 10.000 msec
g_load_class(FD)
g_load_class(MD)
md0: Preloaded image </boot/mfsroot> 4423680 bytes at 0xc09d57c4
g_post_event_x(0xc05d2b24, 0xc1efdc00, 2, -1067425940)
  ref 0xc1efdc00
  ref 0xc1efdc80
acpi_cpu: throttling enabled, 2 steps (100% to 50.0%), currently 100.0%
acpi_tz0: _CRT value is absurd, ignored (200.0C)
acpi_tz0: _CRT value is absurd, ignored (200.0C)
g_post_event_x(0xc05cf3c8, 0xc2028780, 2, -1067425940)
  ref 0xc2028780
ad0: 8056MB <ST38421A/8.01> [16368/16/63] at ata0-master UDMA33
ATAPI_RESET time = 20us
g_post_event_x(0xc04ca3b4, 0xc1e46000, 2, -1067425940)
acd0: DVDR <PLEXTOR DVDR PX-708A/1.02> at ata1-master UDMA33

[at this point, the machine hangs]

KDB: enter: manual escape to debugger
[thread 100006]
Stopped at      kdb_enter+0x2b: nop
db> ps
  pid   proc     uarea   uid  ppid  pgrp  flag   stat  wmesg    wchan  cmd
   52 c2029000 d986c000    0     0     0 0000204 [SLPQ - 0xc08e9eac][SLP] nfsiod 3
   51 c20291c0 d98af000    0     0     0 0000204 [SLPQ - 0xc08e9ea8][SLP] nfsiod 2
   50 c2029380 d98b0000    0     0     0 0000204 [SLPQ - 0xc08e9ea4][SLP] nfsiod 1
   49 c2029540 d98b1000    0     0     0 0000204 [SLPQ - 0xc08e9ea0][SLP] nfsiod 0
   48 c2029700 d98b2000    0     0     0 0000204 [SLPQ syncer 0xc08b37ac][SLP] syncer
   47 c20298c0 d98b3000    0     0     0 0000204 [SLPQ vlruwt 0xc20298c0][SLP] vnlru
   46 c1db2a80 d5618000    0     0     0 0000204 [SLPQ psleep 0xc08e29ec][SLP] bufdaemon
   45 c1db2c40 d5619000    0     0     0 000020c [SLPQ pgzero 0xc08f080c][SLP] pagezero
   44 c1db2e00 d561a000    0     0     0 0000204 [SLPQ psleep 0xc08f0860][SLP] vmdaemon
   43 c1e67000 d561f000    0     0     0 0000204 [SLPQ psleep 0xc08f081c][SLP] pagedaemon
   42 c1e671c0 d5620000    0     0     0 0000204 [SLPQ mdwait 0xc1f1ed00][SLP] md0
   41 c1e67380 d5621000    0     0     0 0000204 [IWAIT] swi0: sio
   40 c1e67540 d5622000    0     0     0 0000204 [SLPQ - 0xc1db0c40][SLP] fdc0
   39 c1e67700 d5644000    0     0     0 0000204 [SLPQ usbtsk 0xc08ab658][SLP] usbtask
   38 c1e678c0 d5645000    0     0     0 0000204 [SLPQ usbevt 0xc1e82210][SLP] usb0
   37 c1e67a80 d5646000    0     0     0 0000204 [SLPQ tzpoll 0xc0e51674][SLP] acpi_thermal
    9 c1e67c40 d5647000    0     0     0 0000204 [SLPQ actask 0xc0e51a0c][SLP] acpi_task2
    8 c1e67e00 d5648000    0     0     0 0000204 [SLPQ actask 0xc0e51a0c][SLP] acpi_task1
    7 c1e69000 d5649000    0     0     0 0000204 [SLPQ actask 0xc0e51a0c][SLP] acpi_task0
   36 c1da1540 d55eb000    0     0     0 0000204 [IWAIT] swi3: cambio
   35 c1da1700 d55ec000    0     0     0 0000204 [IWAIT] swi2: camnet
   34 c1da18c0 d55ed000    0     0     0 0000204 [IWAIT] swi6:+
   33 c1da1a80 d55ee000    0     0     0 0000204 [IWAIT] swi6: acpitaskq
    6 c1da1c40 d55ef000    0     0     0 0000204 [SLPQ - 0xc1dfdac0][SLP] thread taskq
   32 c1da1e00 d5611000    0     0     0 0000204 [IWAIT] swi6:+
   31 c1db2000 d5612000    0     0     0 0000204 [IWAIT] swi6: task queue
    5 c1db21c0 d5613000    0     0     0 0000204 [SLPQ - 0xc1dfdc00][SLP] kqueue taskq
   30 c1db2380 d5614000    0     0     0 0000204 [SLPQ - 0xc08a92c0][SLP] yarrow
    4 c1db2540 d5615000    0     0     0 0000204 [SLPQ - 0xc08ae048][SLP] g_down
    3 c1db2700 d5616000    0     0     0 0000204 [SLPQ - 0xc08ae044][SLP] g_up
    2 c1db28c0 d5617000    0     0     0 0000204 [SLPQ g_waitidle 0xc08adec0][SLP] g_event
   29 c1d6f1c0 d4415000    0     0     0 0000204 [IWAIT] swi1: net
   28 c1d6f380 d4416000    0     0     0 0000204 [IWAIT] swi4: vm
   27 c1d6f540 d4417000    0     0     0 000020c [RUNQ] swi5: clock sio
   26 c1d6f700 d4439000    0     0     0 0000204 [IWAIT] irq15: ata1
   25 c1d6f8c0 d443a000    0     0     0 0000204 [IWAIT] irq14: ata0
   24 c1d6fa80 d443b000    0     0     0 0000204 [IWAIT] irq13:
   23 c1d6fc40 d443c000    0     0     0 0000204 [IWAIT] irq12: uhci0
   22 c1d6fe00 d443d000    0     0     0 0000204 [IWAIT] irq11: fxp0
   21 c1da1000 d55e8000    0     0     0 0000204 [IWAIT] irq10:
   20 c1da11c0 d55e9000    0     0     0 0000204 [IWAIT] irq9: acpi0
   19 c1da1380 d55ea000    0     0     0 0000204 [IWAIT] irq8: rtc
   18 c1d64000 d43c9000    0     0     0 0000204 [IWAIT] irq7: ppc0
   17 c1d641c0 d440c000    0     0     0 0000204 [IWAIT] irq6: fdc0
   16 c1d64380 d440d000    0     0     0 0000204 [IWAIT] irq5:
   15 c1d64540 d440e000    0     0     0 0000204 [IWAIT] irq4: sio0
   14 c1d64700 d440f000    0     0     0 0000204 [IWAIT] irq3: sio1
   13 c1d648c0 d4410000    0     0     0 0000204 [CPU 0] irq1: atkbd0
   12 c1d64a80 d4411000    0     0     0 0000204 [IWAIT] irq0: clk
   11 c1d64c40 d4412000    0     0     0 000020c [Can run] idle: cpu0
    1 c1d64e00 d4413000    0     0     0 0000200 [SLPQ g_waitidle 0xc08adec0][SLP] swapper
   10 c1d6f000 d4414000    0     0     0 0000204 [SLPQ ktrace 0xc08b19b8][SLP] ktrace
    0 c08ae140 c101f000    0     0     0 0000200 [SLPQ sched 0xc08ae140][SLP] swapper
db> tr 1
sched_switch(c1d65420,0) at sched_switch+0x15b
mi_switch(1,0) at mi_switch+0x24d
sleepq_switch(c08adec0,1,d43d5c90,c0605e5e,c08adec0) at sleepq_switch+0xe0
sleepq_timedwait(c08adec0,0,0,c1d5c1a0,0) at sleepq_timedwait+0x34
msleep(c08adec0,0,68,c07ec039,14) at msleep+0x2ca
g_waitidle(c1d64e00,c05dd7bc,0,d43d5d1c,c05dd80e) at g_waitidle+0x48
vfs_mountroot(0,c1d64e00,c1d65420,0,0) at vfs_mountroot+0x10
start_init(0,d43d5d48,0,c05dd7bc,0) at start_init+0x52
fork_exit(c05dd7bc,0,d43d5d48) at fork_exit+0xa4
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xd43d5d7c, ebp = 0 ---
db> tr 2
sched_switch(c1d70c60,0) at sched_switch+0x15b
mi_switch(1,0) at mi_switch+0x24d
sleepq_switch(c08adec0,0,d4435c48,c0605e5e,c08adec0) at sleepq_switch+0xe0
sleepq_timedwait(c08adec0,0,0,c1d5c1a0,1) at sleepq_timedwait+0x34
msleep(c08adec0,0,68,c07ec039,14) at msleep+0x2ca
g_waitidle(0,c07bd0fa,c1efdc00,c1f1ed68,c07d58be) at g_waitidle+0x48
mdinit(c1f1ed00,438000,d4435ccc,c053f259,c09d57c4) at mdinit+0x119
md_preloaded(c09d57c4,438000) at md_preloaded+0x51
g_md_init(c082b060) at g_md_init+0xad
g_load_class(c1d48900,0,66666667,d4435d04,c05d0075) at g_load_class+0xf4
one_event(d4435d1c,c05d1435,c05f8201,c1db28c0,c1db28c0) at one_event+0x14f
g_run_events(c05f8201,c1db28c0,c1db28c0,c05d13f8,d4435d34) at g_run_events+0x9
g_event_procbody(0,d4435d48,0,c05d13f8,0) at g_event_procbody+0x3d
fork_exit(c05d13f8,0,d4435d48) at fork_exit+0xa4
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xd4435d7c, ebp = 0 ---
	
>How-To-Repeat:
Make a bootable cdrom image with 'make release'.
Boot from it.
	
>Fix:
I believe rev 1.128 of sys/dev/md/md.c,v is bogus and should be backed out
and replaced with something else.
	



>Release-Note:
>Audit-Trail:
>Unformatted:



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