From nobody@FreeBSD.org  Sat Aug 30 13:07:00 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 077241065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Aug 2008 13:07:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E403E8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Aug 2008 13:06:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7UD6xll028681
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Aug 2008 13:06:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m7UD6xQN028680;
	Sat, 30 Aug 2008 13:06:59 GMT
	(envelope-from nobody)
Message-Id: <200808301306.m7UD6xQN028680@www.freebsd.org>
Date: Sat, 30 Aug 2008 13:06:59 GMT
From: David Naylor <naylor.b.david@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: System hand with unionfs and init chroot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         126973
>Category:       kern
>Synopsis:       [unionfs] [hang] System hang with unionfs and init chroot [regression]
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 30 13:10:02 UTC 2008
>Closed-Date:    
>Last-Modified:  Wed Jul 03 00:59:06 UTC 2013
>Originator:     David Naylor
>Release:        8-Current
>Organization:
Private
>Environment:
FreeBSD dragonmini.dg 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Aug 26 20:30:23 SAST 2008     root@dragonmini.dg:/tmp/usr/src/sys/GENERIC  i386
>Description:
The system hangs when init chroot to a unionfs directory.  This is a
regression as 7-Beta did not have this problem
>How-To-Repeat:
Add the following to loader.conf:
init_script="chroot"
init_chroot="/base"

Have the chroot script do the following:
# mount -t unionfs -o noatime -o copymode=transparent /tmpfs /base
{where /tmpfs is a suitable unionable filesystem, such as ufs}

(please see attached for the output [via serial] of the boot [with the
chroot file content])
>Fix:


Patch attached with submission follows:

OK more chroot
*** FILE chroot BEGIN ***
#!/rescue/sh
PATH=/rescue
trap 'echo Recovery console: ; PATH=/rescue /rescue/csh -i ; exit' 1 2 3 6 15

echo -n "Mounting compressed base:"
mount -t cd9660 -o ro /dev/$(mdconfig -a -t vnode -f /base.uzip).uzip /base
echo .

echo -n "Allocating temporary filesystem:"
mdmfs -s 32m md /tmpfs
echo .

echo -n "Overlaying temporary filesystem over base:"
mount -t unionfs -o noatime -o copymode=transparent /tmpfs /base
echo .

umount /dev

echo "Chroot to base..."
*** FILE chroot END ***
OK boot
/boot/kernel/acpi.ko text=0x521cc data=0x2640+0x182c syms=[0x4+0x8b80+0x4+0xbe19]
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
1048576K of memory above 4GB ignored
Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-CURRENT #0: Wed Aug 27 23:13:13 SAST 2008
    root@dragonmini.dg:/tmp/usr/src/sys/GENERIC
WARNING: WITNESS option enabled, expect reduced performance.
module_register: module g_label already exists!
Module g_label failed to register: 17
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 Quad CPU           @ 2.40GHz (2400.00-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6f7  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe3bd<SSE3,RSVD2,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 4
real memory  = 3221159936 (3071 MB)
avail memory = 3149418496 (3003 MB)
ACPI APIC Table: <GBT    NVDAACPI>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
ioapic0: Changing APIC ID to 2
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <GBT NVDAACPI> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, bfef0000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfeff0000-0xfeff03ff on acpi0
Timecounter "HPET" frequency 25000000 Hz quality 900
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.1 (no driver attached)
pci0: <memory, RAM> at device 0.2 (no driver attached)
pci0: <memory, RAM> at device 0.3 (no driver attached)
pci0: <memory, RAM> at device 0.4 (no driver attached)
pci0: <memory, RAM> at device 0.5 (no driver attached)
pci0: <memory, RAM> at device 0.6 (no driver attached)
pci0: <memory, RAM> at device 0.7 (no driver attached)
pci0: <memory, RAM> at device 1.0 (no driver attached)
pci0: <memory, RAM> at device 1.1 (no driver attached)
pci0: <memory, RAM> at device 1.2 (no driver attached)
pci0: <memory, RAM> at device 1.3 (no driver attached)
pci0: <memory, RAM> at device 1.4 (no driver attached)
pci0: <memory, RAM> at device 1.5 (no driver attached)
pci0: <memory, RAM> at device 1.6 (no driver attached)
pci0: <memory, RAM> at device 2.0 (no driver attached)
pci0: <memory, RAM> at device 2.1 (no driver attached)
pci0: <memory, RAM> at device 2.2 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 3.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc000-0xc07f mem 0xe5000000-0xe5ffffff,0xc0000000-0xcfffffff,0xe6000000-0xe6ffffff irq 16 at device 0.0 on pci1
pcib2: <ACPI PCI-PCI bridge> at device 5.0 on pci0
pci2: <ACPI PCI bus> on pcib2
vgapci1: <VGA-compatible display> port 0xd000-0xd07f mem 0xe2000000-0xe2ffffff,0xd0000000-0xdfffffff,0xe3000000-0xe3ffffff irq 16 at device 0.0 on pci2
pci0: <memory, RAM> at device 9.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 10.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 10.1 (no driver attached)
pci0: <memory, RAM> at device 10.2 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xe8106000-0xe8106fff irq 21 at device 11.0 on pci0
ohci0: [GIANT-LOCKED]
ohci0: [ITHREAD]
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 8 ports with 8 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xe8107000-0xe81070ff irq 22 at device 11.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 8 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 8 ports with 8 removable, self powered
umass0: <vendor 0x3538 USB Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on uhub1
atapci0: <nVidia nForce MCP51 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 13.0 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
atapci1: <nVidia nForce MCP51 SATA300 controller> port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xe600-0xe60f mem 0xe8104000-0xe8104fff irq 23 at device 14.0 on pci0
atapci1: [ITHREAD]
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]
atapci2: <nVidia nForce MCP51 SATA300 controller> port 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xeb00-0xeb0f mem 0xe8105000-0xe8105fff irq 20 at device 15.0 on pci0
atapci2: [ITHREAD]
ata4: <ATA channel 0> on atapci2
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci2
ata5: [ITHREAD]
pcib3: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci3: <ACPI PCI bus> on pcib3
ral0: <Ralink Technology RT2561S> mem 0xe8000000-0xe8007fff irq 17 at device 7.0 on pci3
ral0: MAC/BBP RT2561C, RF RT2527
ral0: [ITHREAD]
pci0: <multimedia> at device 16.1 (no driver attached)
nfe0: <NVIDIA nForce 430 MCP13 Networking Adapter> port 0xec00-0xec07 mem 0xe8108000-0xe8108fff irq 22 at device 20.0 on pci0
miibus0: <MII bus> on nfe0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
nfe0: Ethernet address: 00:1d:7d:00:6e:1a
nfe0: [FILTER]
atrtc0: <AT realtime clock> port 0x70-0x73 on acpi0
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
cpu0: <ACPI CPU> on acpi0
acpi_perf0: <ACPI CPU Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
est1: Guessed bus clock (high) of 266 MHz
est1: Guessed bus clock (low) of 266 MHz
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 925092506000925
device_attach: est1 attach returned 6
p4tcc1: <CPU Frequency Thermal Control> on cpu1
cpu2: <ACPI CPU> on acpi0
est2: <Enhanced SpeedStep Frequency Control> on cpu2
est2: Guessed bus clock (high) of 266 MHz
est2: Guessed bus clock (low) of 266 MHz
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 925092506000925
device_attach: est2 attach returned 6
p4tcc2: <CPU Frequency Thermal Control> on cpu2
cpu3: <ACPI CPU> on acpi0
est3: <Enhanced SpeedStep Frequency Control> on cpu3
est3: Guessed bus clock (high) of 266 MHz
est3: Guessed bus clock (low) of 266 MHz
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 925092506000925
device_attach: est3 attach returned 6
p4tcc3: <CPU Frequency Thermal Control> on cpu3
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xd0000-0xd3fff pnpid ORM0000 on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
plip0: <PLIP network interface> on ppbus0
plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
uart0: [FILTER]
uart0: console (9600,n,8,1)
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
The GEOM class LABEL is already loaded.
acd0: DMA limited to UDMA33, device found non-ATA66 cable
acd0: DVDR <ASUS DRW-1814BL/1.13> at ata0-slave UDMA33
ad4: 305244MB <Seagate ST3320620AS 3.AAK> at ata2-master SATA150
ad8: 238474MB <Seagate ST3250310AS 3.AAA> at ata4-master SATA150
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #2 Launched!
WARNING: WITNESS option enabled, expect reduced performance.
cd0 at ata0 bus 0 target 1 lun 0
cd0: <ASUS DRW-1814BL 1.13> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Generic USB Flash Disk 0.00> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 984MB (2015232 512 byte sectors: 64H 32S/T 984C)
GEOM_LABEL: Label for provider da0s1a is ufs/DragonBSD.
lock order reversal: (sleepable after non-sleepable)
 1st 0xc658601c struct mount mtx (struct mount mtx) @ /usr/src/sys/kern/vfs_subr.c:346
 2nd 0xc6586000 vfslock (vfslock) @ /usr/src/sys/kern/vfs_subr.c:373
KDB: stack backtrace:
db_trace_self_wrapper(c0b228e2,c5fbab14,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
kdb_backtrace(4,c0b1e285,c0d9c830,c6076048,c5fbab6c,...) at kdb_backtrace+0x29
_witness_debugger(c0b251ac,c6586000,c0b2b960,c6076048,c0b2bf05,...) at _witness_debugger+0x1e
witness_checkorder(c6586000,1,c0b2bf05,175,c0d9c844,...) at witness_checkorder+0x7ad
__lockmgr_args(c6586000,200100,c658601c,0,0,...) at __lockmgr_args+0x21b
vfs_busy(c6586000,200,0,c60cad20,1,...) at vfs_busy+0x1b4
vfs_mount_alloc(0,c0bf1420,c0b2bcab,c60cad20,c080e703,...) at vfs_mount_alloc+0x78
vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x253
start_init(0,c5fbad38,c0b1bbd2,322,c60c8d0c,...) at start_init+0x65
fork_exit(c075e345,0,c5fbad38) at fork_exit+0xb8
fork_trampoline() at fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xc5fbad70, ebp = 0 ---
lock order reversal: (sleepable after non-sleepable)
 1st 0xc6453e10 vnode interlock (vnode interlock) @ /usr/src/sys/fs/devfs/devfs_vnops.c:286
 2nd 0xc6453df4 devfs (devfs) @ /usr/src/sys/kern/vfs_subr.c:2044
KDB: stack backtrace:
db_trace_self_wrapper(c0b228e2,c5fbaa3c,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
kdb_backtrace(4,c0b1e285,c0d9c830,c6076180,c5fbaa94,...) at kdb_backtrace+0x29
_witness_debugger(c0b251ac,c6453df4,c0b15b17,c6076180,c0b2bf05,...) at _witness_debugger+0x1e
witness_checkorder(c6453df4,9,c0b2bf05,7fc,c0b15ccd,...) at witness_checkorder+0x7ad
__lockmgr_args(c6453df4,80100,c6453e10,0,0,0,c0b2bf05,7fc) at __lockmgr_args+0x75b
vop_stdlock(c5fbab8c,c0b15ccd,c0b18ea8,80100,c6453d9c,...) at vop_stdlock+0x5c
VOP_LOCK1_APV(c0bf1500,c5fbab8c,c0c2f4a0,c6453d9c,80100,...) at VOP_LOCK1_APV+0xab
_vn_lock(c6453d9c,80100,c0b2bf05,7fc,8,...) at _vn_lock+0x5e
vget(c6453d9c,80100,c60cad20,11f,c0b15c6a,...) at vget+0xc1
devfs_allocv(c651d400,c6586000,c5fbac24,c60cad20,c0d9c830,...) at devfs_allocv+0x10e
devfs_root(c6586000,80000,c0dc8354,c60cad20,4,...) at devfs_root+0x51
set_rootvnode(c0dc8340,0,c0b2b862,5fa,c080e703,...) at set_rootvnode+0x2d
vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x331
start_init(0,c5fbad38,c0b1bbd2,322,c60c8d0c,...) at start_init+0x65
fork_exit(c075e345,0,c5fbad38) at fork_exit+0xb8
fork_trampoline() at fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xc5fbad70, ebp = 0 ---
Trying to mount root from ufs:/dev/ufs/DragonBSD
lock order reversal: (sleepable after non-sleepable)
 1st 0xc659e28c vnode interlock (vnode interlock) @ /usr/src/sys/kern/vfs_hash.c:79
 2nd 0xc659e270 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2044
KDB: stack backtrace:
db_trace_self_wrapper(c0b228e2,c5fba914,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
kdb_backtrace(4,c0b1e285,c0d9bb20,c6076250,c5fba96c,...) at kdb_backtrace+0x29
_witness_debugger(c0b251ac,c659e270,c0b19792,c6076250,c0b2bf05,...) at _witness_debugger+0x1e
witness_checkorder(c659e270,9,c0b2bf05,7fc,c5fba9c0,...) at witness_checkorder+0x7ad
__lockmgr_args(c659e270,80100,c659e28c,0,0,...) at __lockmgr_args+0x75b
ffs_lock(c5fbaa70,c0b2b4f4,c0b18ea8,80100,c659e218,...) at ffs_lock+0x7d
VOP_LOCK1_APV(c0c175c0,c5fbaa70,c0c2f4a0,c659e218,80100,...) at VOP_LOCK1_APV+0xab
_vn_lock(c659e218,80100,c0b2bf05,7fc,4,...) at _vn_lock+0x5e
vget(c659e218,80100,c60cad20,50,0,...) at vget+0xc1
vfs_hash_get(c6585d20,2,80000,c60cad20,c5fbab68,...) at vfs_hash_get+0xdf
ffs_vget(c6585d20,2,80000,c5fbab68,c0b2b862,...) at ffs_vget+0x43
ufs_root(c6585d20,80000,c0dc8354,c60cad20,4,...) at ufs_root+0x28
set_rootvnode(c6453e10,0,c0b2b862,619,c0b18eaa,...) at set_rootvnode+0x2d
vfs_mountroot_try(c0b2be61,c0b18eaa,c0b10f43,1,c080e703,...) at vfs_mountroot_try+0x2c0
vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x3f1
start_init(0,c5fbad38,c0b1bbd2,322,c60c8d0c,...) at start_init+0x65
fork_exit(c075e345,0,c5fbad38) at fork_exit+0xb8
fork_trampoline() at fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xc5fbad70, ebp = 0 ---
lock order reversal: (sleepable after non-sleepable)
 1st 0xc659e2c0 bufobj interlock (bufobj interlock) @ /usr/src/sys/kern/vfs_bio.c:2429
 2nd 0xe60e5c80 bufwait (bufwait) @ /usr/src/sys/kern/vfs_bio.c:2443
KDB: stack backtrace:
db_trace_self_wrapper(c0b228e2,c5fba740,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
kdb_backtrace(4,c0b1e285,c0d9bbd0,c6073670,c5fba798,...) at kdb_backtrace+0x29
_witness_debugger(c0b251ac,e60e5c80,c0b2a82b,c6073670,c0b29dda,...) at _witness_debugger+0x1e
witness_checkorder(e60e5c80,9,c0b29dda,98b,c0ab205a,...) at witness_checkorder+0x7ad
__lockmgr_args(e60e5c80,81900,c659e2c0,c0b2a787,50,...) at __lockmgr_args+0x75b
getblk(c659e218,0,0,800,0,...) at getblk+0x144
breadn(c659e218,0,0,800,0,...) at breadn+0x44
bread(c659e218,0,0,800,0,...) at bread+0x4c
ffs_blkatoff(c659e218,0,0,0,c5fba9ac,...) at ffs_blkatoff+0xc6
ufs_lookup(c5fba9ec,c659e218,c5fbab3c,c659e218,c5fbaa0c,...) at ufs_lookup+0x2f2
VOP_CACHEDLOOKUP_APV(c0c175c0,c5fba9ec,c5fbab3c,c5fbab28,c0c2f140,...) at VOP_CACHEDLOOKUP_APV+0xa0
vfs_cache_lookup(c5fbaa6c,c5fbaa6c,0,80000,c659e218,...) at vfs_cache_lookup+0xc3
VOP_LOOKUP_APV(c0c175c0,c5fbaa6c,c0b2b610,1b0,c5fbab28,...) at VOP_LOOKUP_APV+0xaa
lookup(c5fbab10,c0b2b610,d8,c0,c608cc2c,...) at lookup+0x567
namei(c5fbab10,c5fbab28,c07d1539,c0d9bbd0,c0b2bca7,...) at namei+0x430
kern_unlinkat(c60cad20,ffffff9c,c0b2bca7,1,c5fbac60,...) at kern_unlinkat+0x3f
kern_unlink(c60cad20,c0b2bca7,1,635,0,...) at kern_unlink+0x27
vfs_mountroot_try(c0b2be61,c0b18eaa,c0b10f43,1,c080e703,...) at vfs_mountroot_try+0x475
vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x3f1
start_init(0,c5fbad38,c0b1bbd2,322,c60c8d0c,...) at start_init+0x65
fork_exit(c075e345,0,c5fbad38) at fork_exit+0xb8
fork_trampoline() at fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xc5fbad70, ebp = 0 ---
Mounting compreslocsed base:k order reversal: (sleepable after non-sleepable)
 1st 0xc6453180 vnode interlock (vnode interlock) @ /usr/src/sys/ufs/ufs/ufs_dirhash.c:167
 2nd 0xc654d200 dirhash (dirhash) @ /usr/src/sys/ufs/ufs/ufs_dirhash.c:178
KDB: stack backtrace:
db_trace_self_wrapper(c0b228e2,f52a37dc,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
kdb_backtrace(4,c0b1e285,c0d9bbd0,c60762b8,f52a3834,...) at kdb_backtrace+0x29
_witness_debugger(c0b251ac,c654d200,c0b43137,c60762b8,c0b42dd0,...) at _witness_debugger+0x1e
witness_checkorder(c654d200,1,c0b42dd0,b2,c0ab205a,...) at witness_checkorder+0x7ad
__lockmgr_args(c654d200,200100,c6453180,0,0,...) at __lockmgr_args+0x21b
ufsdirhash_build(c659de0c,a00,0,c65abd20,3,...) at ufsdirhash_build+0x1d0
ufs_lookup(f52a39fc,c645310c,f52a3bb4,c645310c,f52a3a1c,...) at ufs_lookup+0xf0
VOP_CACHEDLOOKUP_APV(c0c175c0,f52a39fc,f52a3bb4,f52a3ba0,c0c2f140,...) at VOP_CACHEDLOOKUP_APV+0xa0
vfs_cache_lookup(f52a3a7c,f52a3a7c,0,80000,c645310c,...) at vfs_cache_lookup+0xc3
VOP_LOOKUP_APV(c0c175c0,f52a3a7c,c0b2b610,1b0,f52a3ba0,...) at VOP_LOOKUP_APV+0xaa
lookup(f52a3b88,c0b2b610,d8,c0,c656b52c,...) at lookup+0x567
namei(f52a3b88,0,f52a3c4b,f52a3c44,c0b18ea8,...) at namei+0x430
kern_statat(c65abd20,0,ffffff9c,8604434,0,...) at kern_statat+0x5f
kern_stat(c65abd20,8604434,0,f52a3c1c,c65abd20,...) at kern_stat+0x36
stat(c65abd20,f52a3cf8,8,f52a3d2c,c0bf5c60,...) at stat+0x2b
syscall(f52a3d38) at syscall+0x27b
Xint0x80_syscall() at Xint0x80_syscall+0x20
--- syscall (188, FreeBSD ELF32, stat), eip = 0x830916b, esp = 0xbfbfe97c, ebp = 0xbfbfea18 ---
WARNING: opening backing store: /base.uzip readonly
md0.uzip: 26993 x 8192 blocks
GEOM_LABEL: Label for provider md0.uzip is iso9660/DragonBSD.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->daichi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Aug 30 15:43:54 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126973 

From: David Naylor <naylor.b.david@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/126973: [unionfs] [hang] System hang with unionfs and init chroot [regression]
Date: Mon, 1 Sep 2008 22:47:28 +0200

 --Boundary-00=_jTFvIZjZdb41fhF
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 For some strange reason some of the log got cut of when posting, where is the 
 rest if it, also having changed the chroot script a bit I get the attached 
 log (this time the kernel is booting off a md based iso9660 image vs 
 previously CD base iso9660 image):
 
 WARNING: opening backing store: /base.uzip readonly
 md0.uzip: 26993 x 8192 blocks
 GEOM_LABEL: Label for provider md0.uzip is iso9660/DragonBSD.
 .
 Allocating temporary filesystem:lock order reversal: (sleepable after 
 non-sleepable)
  1st 0xc6454e10 vnode interlock (vnode interlock) 
 @ /usr/src/sys/kern/vfs_hash.c:79
  2nd 0xc6454df4 isofs (isofs) @ /usr/src/sys/kern/vfs_subr.c:2044
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,f52b67ec,c07d16c8,4,c0b1e285,...) at 
 db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9b9c0,c60763f0,f52b6844,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,c6454df4,c0b19f3b,c60763f0,c0b2bf05,...) at 
 _witness_debugger+0x1e
 witness_checkorder(c6454df4,9,c0b2bf05,7fc,1,...) at witness_checkorder+0x7ad
 __lockmgr_args(c6454df4,80100,c6454e10,0,0,0,c0b2bf05,7fc) at 
 __lockmgr_args+0x75b
 vop_stdlock(f52b693c,c0b2b4f4,c0b18ea8,80100,c6454d9c,...) at vop_stdlock+0x5c
 VOP_LOCK1_APV(c0bf3d40,f52b693c,c0c2f4a0,c6454d9c,80100,...) at 
 VOP_LOCK1_APV+0xab
 _vn_lock(c6454d9c,80100,c0b2bf05,7fc,4,...) at _vn_lock+0x5e
 vget(c6454d9c,80100,c6612af0,50,0,...) at vget+0xc1
 vfs_hash_get(c6585a80,12800,80000,c6612af0,f52b6a8c,...) at vfs_hash_get+0xdf
 cd9660_vget_internal(c6585a80,12800,80000,f52b6a8c,1,c658a8a8) at 
 cd9660_vget_internal+0x44
 cd9660_root(c6585a80,80000,f52b6a8c,c6612af0,f52b6ba0,...) at cd9660_root+0x4e
 lookup(f52b6b88,c0b2b610,d8,c0,c656cd2c,...) at lookup+0x89f
 namei(f52b6b88,0,f52b6c4b,f52b6c44,c0b20389,...) at namei+0x430
 kern_statat(c6612af0,200,ffffff9c,bfbfe3d0,0,...) at kern_statat+0x5f
 kern_lstat(c6612af0,bfbfe3d0,0,f52b6c1c,c0d9b9c0,...) at kern_lstat+0x36
 lstat(c6612af0,f52b6cf8,8,f52b6d2c,c0bf5c90,...) at lstat+0x2b
 syscall(f52b6d38) at syscall+0x27b
 Xint0x80_syscall() at Xint0x80_syscall+0x20
 --- syscall (190, FreeBSD ELF32, lstat), eip = 0x8309157, esp = 0xbfbfd4cc, 
 ebp = 0xbfbfe178 ---
 .
 Overlaying temporary filesystem over base:.
 umount: unmount of /dev failed: Device busy
 Chroot to base...
 lock order reversal:
  1st 0xc66368b8 isofs (isofs) 
 @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1709
  2nd 0xc65d2164 ufs (ufs) @ /usr/src/sys/kern/vfs_lookup.c:852
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,c5fba5cc,c07d16c8,4,c0b1e285,...) at 
 db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9b9c0,c6076250,c5fba624,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,c65d2164,c0b19792,c6076250,c0b2b610,...) at 
 _witness_debugger+0x1e
 witness_checkorder(c65d2164,9,c0b2b610,354,c5fba654,...) at 
 witness_checkorder+0x7ad
 __lockmgr_args(c65d2164,80400,c65d2180,0,0,...) at __lockmgr_args+0x75b
 ffs_lock(c5fba728,c60710a8,c60cadc4,80400,c65d210c,...) at ffs_lock+0x7d
 VOP_LOCK1_APV(c0c175c0,c5fba728,c0c2f4a0,c65d210c,80400,...) at 
 VOP_LOCK1_APV+0xab
 _vn_lock(c65d210c,80400,c0b2b610,354,13f,...) at _vn_lock+0x5e
 relookup(c65d210c,c5fba8e4,c5fba8a8,c656db00,c5fba8e4,...) at relookup+0x64
 unionfs_relookup(c5fba8a8,c60cad20,c6616001,3,1,...) at unionfs_relookup+0xd6
 unionfs_mkshadowdir(c6545620,c65d210c,c656db00,c5fbabb4,c60cad20,...) at 
 unionfs_mkshadowdir+0x18b
 unionfs_lookup(c5fba9fc,c659ed9c,c5fbabb4,c659ed9c,c5fbaa1c,...) at 
 unionfs_lookup+0x930
 VOP_CACHEDLOOKUP_APV(c0f2cd60,c5fba9fc,c5fbabb4,c5fbaba0,c0c2f140,...) at 
 VOP_CACHEDLOOKUP_APV+0xa0
 vfs_cache_lookup(c5fbaa7c,c5fbaa7c,0,80000,c659ed9c,...) at 
 vfs_cache_lookup+0xc3
 VOP_LOOKUP_APV(c0f2cd60,c5fbaa7c,c0b2b610,1b0,c5fbaba0,...) at 
 VOP_LOOKUP_APV+0xaa
 lookup(c5fbab88,0,c0b2b610,e9,c608cc2c,...) at lookup+0x567
 namei(c5fbab88,c5fbab28,60,921,c60cad20,...) at namei+0x430
 kern_statat(c60cad20,0,ffffff9c,834fd7a,0,...) at kern_statat+0x5f
 kern_stat(c60cad20,834fd7a,0,c5fbac1c,100ff01,...) at kern_stat+0x36
 stat(c60cad20,c5fbacf8,8,c0b25d4c,c0bf5c60,...) at stat+0x2b
 syscall(c5fbad38) at syscall+0x27b
 Xint0x80_syscall() at Xint0x80_syscall+0x20
 --- syscall (188, FreeBSD ELF32, stat), eip = 0x830916b, esp = 0xbfbfe98c, ebp 
 = 0xbfbfee98 ---
 lock order reversal: (sleepable after non-sleepable)
  1st 0xc66367c8 vnode interlock (vnode interlock) 
 @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_subr.c:362
  2nd 0xc66367ac unionfs (unionfs) 
 @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_subr.c:371
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,c5fba8a8,c07d16c8,4,c0b1e285,...) at 
 db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9c620,c60764c0,c5fba900,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,c66367ac,c0f2b791,c60764c0,c0f2b688,...) at 
 _witness_debugger+0x1e
 witness_checkorder(c66367ac,9,c0f2b688,173,c60cad20,...) at 
 witness_checkorder+0x7ad
 __lockmgr_args(c66367ac,80100,c66367c8,0,0,...) at __lockmgr_args+0x75b
 unionfs_noderem(c6636754,c60cad20,c5fbaa0c,c0a94966,c5fbaa30,...) at 
 unionfs_noderem+0xa2
 unionfs_reclaim(c5fbaa30,c60cad20,0,c6636754,c5fbaa54,...) at 
 unionfs_reclaim+0x1b
 VOP_RECLAIM_APV(c0f2cd60,c5fbaa30,c60cad20,0,0,...) at VOP_RECLAIM_APV+0x9f
 vgonel(c66367c8,0,c0b2bf05,98a,c5fbaab4,...) at vgonel+0x1b1
 vrecycle(c6636754,c60cad20,c5fbaa9c,c0a94a36,c5fbaab4,...) at vrecycle+0x45
 unionfs_inactive(c5fbaab4,c66367c8,c6636754,c66367c8,c5fbaacc,...) at 
 unionfs_inactive+0x28
 VOP_INACTIVE_APV(c0f2cd60,c5fbaab4,c0b2bf05,8f1,c0c2f460,...) at 
 VOP_INACTIVE_APV+0xa0
 vinactive(c0f2cd60,c5fbaae8,c0b2bf05,87d,c5fbab08,...) at vinactive+0x82
 vput(c6636754,ffffffdf,c608cb00,0,c60cad20,...) at vput+0x1c9
 kern_statat(c60cad20,0,ffffff9c,834fd7a,0,...) at kern_statat+0xc0
 kern_stat(c60cad20,834fd7a,0,c5fbac1c,100ff01,...) at kern_stat+0x36
 stat(c60cad20,c5fbacf8,8,c0b25d4c,c0bf5c60,...) at stat+0x2b
 syscall(c5fbad38) at syscall+0x27b
 Xint0x80_syscall() at Xint0x80_syscall+0x20
 --- syscall (188, FreeBSD ELF32, stat), eip = 0x830916b, esp = 0xbfbfe98c, ebp 
 = 0xbfbfee98 ---
 
 --Boundary-00=_jTFvIZjZdb41fhF
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="dmesg"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="dmesg"
 
 *** FILE chroot BEGIN ***
 #!/rescue/sh
 PATH=/rescue
 trap 'echo Recovery console: ; PATH=/rescue /rescue/csh -i ; exit' 1 2 3 6 15
 
 echo "Mounting compressed base:"
 mount -t cd9660 -o ro /dev/$(mdconfig -a -t vnode -o readonly -f /base.uzip).uzip /base
 
 echo -n "Overlay mdmfs [yes/no] (no): "
 read answer
 case $answer in
   [Yy][Ee][Ss]|[Yy][Ee]|[Yy])
     echo "Allocating temporary filesystem:"
     mdmfs -s 32m md /tmpfs
 
     echo "Overlaying temporary filesystem:"
     mount -t unionfs -o noatime -o copymode=transparent /tmpfs /base
     ;;
 esac
 
 echo "Chroot to base..."
 
 CD_DEV=$(dmesg | sed -n -e 's|.*a\(cd[0-9]*\).*iso9660/DragonBSD.*|\1|p' | sed '1 q')
 if [ -n "$CD_DEV" ]
 then
   echo "Ejecting CD-ROM..."
   camcontrol eject $CD_DEV
 fi
 *** FILE chroot END ***
 OK boot
 /boot/kernel/acpi.ko text=0x521cc data=0x2640+0x182c syms=[0x4+0x8b80+0x4+0xbe19]
 GDB: no debug ports present
 KDB: debugger backends: ddb
 KDB: current backend: ddb
 1048576K of memory above 4GB ignored
 Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation.
 FreeBSD 8.0-CURRENT #0: Mon Sep  1 16:56:41 SAST 2008
     root@dragonmini.dg:/tmp/usr/src/sys/GENERIC
 WARNING: WITNESS option enabled, expect reduced performance.
 module_register: module g_label already exists!
 Module g_label failed to register: 17
 Timecounter "i8254" frequency 1193182 Hz quality 0
 CPU: Intel(R) Core(TM)2 Quad CPU           @ 2.40GHz (2400.00-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0x6f7  Stepping = 7
   Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
   Features2=0xe3bd<SSE3,RSVD2,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
   AMD Features=0x20100000<NX,LM>
   AMD Features2=0x1<LAHF>
   Cores per package: 4
 real memory  = 3221159936 (3071 MB)
 avail memory = 3048861696 (2907 MB)
 ACPI APIC Table: <GBT    NVDAACPI>
 FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
  cpu0 (BSP): APIC ID:  0
  cpu1 (AP): APIC ID:  1
  cpu2 (AP): APIC ID:  2
  cpu3 (AP): APIC ID:  3
 ioapic0: Changing APIC ID to 2
 ioapic0 <Version 1.1> irqs 0-23 on motherboard
 kbd1 at kbdmux0
 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
 acpi0: <GBT NVDAACPI> on motherboard
 acpi0: [ITHREAD]
 acpi0: Power Button (fixed)
 acpi0: reservation of 0, a0000 (3) failed
 acpi0: reservation of 100000, bfef0000 (3) failed
 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
 acpi_hpet0: <High Precision Event Timer> iomem 0xfeff0000-0xfeff03ff on acpi0
 Timecounter "HPET" frequency 25000000 Hz quality 900
 acpi_button0: <Power Button> on acpi0
 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
 pci0: <ACPI PCI bus> on pcib0
 pci0: <memory, RAM> at device 0.1 (no driver attached)
 pci0: <memory, RAM> at device 0.2 (no driver attached)
 pci0: <memory, RAM> at device 0.3 (no driver attached)
 pci0: <memory, RAM> at device 0.4 (no driver attached)
 pci0: <memory, RAM> at device 0.5 (no driver attached)
 pci0: <memory, RAM> at device 0.6 (no driver attached)
 pci0: <memory, RAM> at device 0.7 (no driver attached)
 pci0: <memory, RAM> at device 1.0 (no driver attached)
 pci0: <memory, RAM> at device 1.1 (no driver attached)
 pci0: <memory, RAM> at device 1.2 (no driver attached)
 pci0: <memory, RAM> at device 1.3 (no driver attached)
 pci0: <memory, RAM> at device 1.4 (no driver attached)
 pci0: <memory, RAM> at device 1.5 (no driver attached)
 pci0: <memory, RAM> at device 1.6 (no driver attached)
 pci0: <memory, RAM> at device 2.0 (no driver attached)
 pci0: <memory, RAM> at device 2.1 (no driver attached)
 pci0: <memory, RAM> at device 2.2 (no driver attached)
 pcib1: <ACPI PCI-PCI bridge> at device 3.0 on pci0
 pci1: <ACPI PCI bus> on pcib1
 vgapci0: <VGA-compatible display> port 0xc000-0xc07f mem 0xe5000000-0xe5ffffff,0xc0000000-0xcfffffff,0xe6000000-0xe6ffffff irq 16 at device 0.0 on pci1
 pcib2: <ACPI PCI-PCI bridge> at device 5.0 on pci0
 pci2: <ACPI PCI bus> on pcib2
 vgapci1: <VGA-compatible display> port 0xd000-0xd07f mem 0xe2000000-0xe2ffffff,0xd0000000-0xdfffffff,0xe3000000-0xe3ffffff irq 16 at device 0.0 on pci2
 pci0: <memory, RAM> at device 9.0 (no driver attached)
 isab0: <PCI-ISA bridge> at device 10.0 on pci0
 isa0: <ISA bus> on isab0
 pci0: <serial bus, SMBus> at device 10.1 (no driver attached)
 pci0: <memory, RAM> at device 10.2 (no driver attached)
 ohci0: <OHCI (generic) USB controller> mem 0xe8106000-0xe8106fff irq 21 at device 11.0 on pci0
 ohci0: [GIANT-LOCKED]
 ohci0: [ITHREAD]
 usb0: OHCI version 1.0, legacy support
 usb0: <OHCI (generic) USB controller> on ohci0
 usb0: USB revision 1.0
 uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
 uhub0: 8 ports with 8 removable, self powered
 ehci0: <EHCI (generic) USB 2.0 controller> mem 0xe8107000-0xe81070ff irq 22 at device 11.1 on pci0
 ehci0: [GIANT-LOCKED]
 ehci0: [ITHREAD]
 usb1: EHCI version 1.0
 usb1: companion controller, 8 ports each: usb0
 usb1: <EHCI (generic) USB 2.0 controller> on ehci0
 usb1: USB revision 2.0
 uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
 uhub1: 8 ports with 8 removable, self powered
 umass0: <vendor 0x3538 USB Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on uhub1
 atapci0: <nVidia nForce MCP51 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 13.0 on pci0
 ata0: <ATA channel 0> on atapci0
 ata0: [ITHREAD]
 ata1: <ATA channel 1> on atapci0
 ata1: [ITHREAD]
 atapci1: <nVidia nForce MCP51 SATA300 controller> port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xe600-0xe60f mem 0xe8104000-0xe8104fff irq 23 at device 14.0 on pci0
 atapci1: [ITHREAD]
 ata2: <ATA channel 0> on atapci1
 ata2: [ITHREAD]
 ata3: <ATA channel 1> on atapci1
 ata3: [ITHREAD]
 atapci2: <nVidia nForce MCP51 SATA300 controller> port 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xeb00-0xeb0f mem 0xe8105000-0xe8105fff irq 20 at device 15.0 on pci0
 atapci2: [ITHREAD]
 ata4: <ATA channel 0> on atapci2
 ata4: [ITHREAD]
 ata5: <ATA channel 1> on atapci2
 ata5: [ITHREAD]
 pcib3: <ACPI PCI-PCI bridge> at device 16.0 on pci0
 pci3: <ACPI PCI bus> on pcib3
 ral0: <Ralink Technology RT2561S> mem 0xe8000000-0xe8007fff irq 17 at device 7.0 on pci3
 ral0: MAC/BBP RT2561C, RF RT2527
 ral0: [ITHREAD]
 pci0: <multimedia> at device 16.1 (no driver attached)
 nfe0: <NVIDIA nForce 430 MCP13 Networking Adapter> port 0xec00-0xec07 mem 0xe8108000-0xe8108fff irq 22 at device 20.0 on pci0
 miibus0: <MII bus> on nfe0
 rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
 rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
 nfe0: Ethernet address: 00:1d:7d:00:6e:1a
 nfe0: [FILTER]
 atrtc0: <AT realtime clock> port 0x70-0x73 on acpi0
 fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
 fdc0: [FILTER]
 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
 atkbd0: <AT Keyboard> irq 1 on atkbdc0
 kbd0 at atkbd0
 atkbd0: [GIANT-LOCKED]
 atkbd0: [ITHREAD]
 psm0: <PS/2 Mouse> irq 12 on atkbdc0
 psm0: [GIANT-LOCKED]
 psm0: [ITHREAD]
 psm0: model IntelliMouse, device ID 3
 cpu0: <ACPI CPU> on acpi0
 acpi_perf0: <ACPI CPU Frequency Control> on cpu0
 p4tcc0: <CPU Frequency Thermal Control> on cpu0
 cpu1: <ACPI CPU> on acpi0
 est1: <Enhanced SpeedStep Frequency Control> on cpu1
 est1: Guessed bus clock (high) of 266 MHz
 est1: Guessed bus clock (low) of 266 MHz
 est: CPU supports Enhanced Speedstep, but is not recognized.
 est: cpu_vendor GenuineIntel, msr 925092506000925
 device_attach: est1 attach returned 6
 p4tcc1: <CPU Frequency Thermal Control> on cpu1
 cpu2: <ACPI CPU> on acpi0
 est2: <Enhanced SpeedStep Frequency Control> on cpu2
 est2: Guessed bus clock (high) of 266 MHz
 est2: Guessed bus clock (low) of 266 MHz
 est: CPU supports Enhanced Speedstep, but is not recognized.
 est: cpu_vendor GenuineIntel, msr 925092506000925
 device_attach: est2 attach returned 6
 p4tcc2: <CPU Frequency Thermal Control> on cpu2
 cpu3: <ACPI CPU> on acpi0
 est3: <Enhanced SpeedStep Frequency Control> on cpu3
 est3: Guessed bus clock (high) of 266 MHz
 est3: Guessed bus clock (low) of 266 MHz
 est: CPU supports Enhanced Speedstep, but is not recognized.
 est: cpu_vendor GenuineIntel, msr 925092506000925
 device_attach: est3 attach returned 6
 p4tcc3: <CPU Frequency Thermal Control> on cpu3
 pmtimer0 on isa0
 orm0: <ISA Option ROM> at iomem 0xd0000-0xd3fff pnpid ORM0000 on isa0
 ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
 ppbus0: <Parallel port bus> on ppc0
 ppbus0: [ITHREAD]
 plip0: <PLIP network interface> on ppbus0
 plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 ppc0: [GIANT-LOCKED]
 ppc0: [ITHREAD]
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
 uart0: [FILTER]
 uart0: console (9600,n,8,1)
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 Timecounters tick every 1.000 msec
 The GEOM class LABEL is already loaded.
 md0: Preloaded image </boot/dragonroot> 97984512 bytes at 0xc0f4c044
 GEOM_LABEL: Label for provider md0 is iso9660/CDROM.
 acd0: DVDR <ASUS DRW-1608P3S/1.24> at ata0-master UDMA66
 acd1: DMA limited to UDMA33, device found non-ATA66 cable
 acd1: DVDR <ASUS DRW-1814BL/1.13> at ata0-slave UDMA33
 ad4: 305244MB <Seagate ST3320620AS 3.AAK> at ata2-master SATA150
 ad8: 238474MB <Seagate ST3250310AS 3.AAA> at ata4-master SATA150
 GEOM_LABEL: Label for provider acd1 is iso9660/DragonBSD.
 acd1: FAILURE - READ_BIG HARDWARE ERROR asc=0x3e ascq=0x02
 acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 sks=0x48 0x00 0x01
 acd1: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
 acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 sks=0x48 0x00 0x01
 acd1: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
 da0 at umass-sim0 bus 0 target 0 lun 0
 da0: <Generic USB Flash Disk 0.00> Removable Direct Access SCSI-2 device
 da0: 40.000MB/s transfers
 da0: 984MB (2015232 512 byte sectors: 64H 32S/T 984C)
 cd0 SaMtP :a tAaP0  CbPuUs  #01  tLaarugnecth e0d !l
 :nS M0P
   cAdP0 :C P<UA S#U3S  LDaRuWn-c1h6e0d8!P
 3SS M1P.:2 4A>P  RCePmUo v#a2b lLea uCnDc-hReOdM!
 SWCASRIN-I0N Gd:e vWiIcTeN E
 eSc do0p:t i6o6n. 0e0n0aMbBl/esd ,t reaxnpsefcetr sr
 edcudc0e:d  Aptetrefmoprtm atnoc eq.u
  ry device size failed: NOT READY, Medium not present
 cd1 at ata0 bus 0 target 1 lun 0
 cd1: <ASUS DRW-1814BL 1.13> Removable CD-ROM SCSI-0 device
 cd1: 33.000MB/s transfers
 cd1: cd present [49120 x 2048 byte records]
 GEOM_LABEL: Label for provider da0s1a is ufs/DragonBSD.
 lock order reversal: (sleepable after non-sleepable)
  1st 0xcc5b201c struct mount mtx (struct mount mtx) @ /usr/src/sys/kern/vfs_subr.c:346
  2nd 0xcc5b2000 vfslock (vfslock) @ /usr/src/sys/kern/vfs_subr.c:373
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,cbfbab14,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9bee8,cc0760b0,cbfbab6c,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,cc5b2000,c0b2b960,cc0760b0,c0b2bf05,...) at _witness_debugger+0x1e
 witness_checkorder(cc5b2000,1,c0b2bf05,175,c0d9befc,...) at witness_checkorder+0x7ad
 __lockmgr_args(cc5b2000,200100,cc5b201c,0,0,...) at __lockmgr_args+0x21b
 vfs_busy(cc5b2000,200,0,cc0cad20,1,...) at vfs_busy+0x1b4
 vfs_mount_alloc(0,c0bf1420,c0b2bcab,cc0cad20,c080e703,...) at vfs_mount_alloc+0x78
 vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x253
 start_init(0,cbfbad38,c0b1bbd2,322,cc0c8d0c,...) at start_init+0x65
 fork_exit(c075e345,0,cbfbad38) at fork_exit+0xb8
 fork_trampoline() at fork_trampoline+0x8
 --- trap 0, eip = 0, esp = 0xcbfbad70, ebp = 0 ---
 lock order reversal: (sleepable after non-sleepable)
  1st 0xcc453e10 vnode interlock (vnode interlock) @ /usr/src/sys/fs/devfs/devfs_vnops.c:286
  2nd 0xcc453df4 devfs (devfs) @ /usr/src/sys/kern/vfs_subr.c:2044
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,cbfbaa3c,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9bb78,cc0761e8,cbfbaa94,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,cc453df4,c0b15b17,cc0761e8,c0b2bf05,...) at _witness_debugger+0x1e
 witness_checkorder(cc453df4,9,c0b2bf05,7fc,c0b15ccd,...) at witness_checkorder+0x7ad
 __lockmgr_args(cc453df4,80100,cc453e10,0,0,0,c0b2bf05,7fc) at __lockmgr_args+0x75b
 vop_stdlock(cbfbab8c,c0b15ccd,c0b18ea8,80100,cc453d9c,...) at vop_stdlock+0x5c
 VOP_LOCK1_APV(c0bf1500,cbfbab8c,c0c2f4a0,cc453d9c,80100,...) at VOP_LOCK1_APV+0xab
 _vn_lock(cc453d9c,80100,c0b2bf05,7fc,8,...) at _vn_lock+0x5e
 vget(cc453d9c,80100,cc0cad20,11f,c0b15c6a,...) at vget+0xc1
 devfs_allocv(cc522d00,cc5b2000,cbfbac24,cc0cad20,c0d9bb78,...) at devfs_allocv+0x10e
 devfs_root(cc5b2000,80000,c0dc8354,cc0cad20,4,...) at devfs_root+0x51
 set_rootvnode(c0dc8340,0,c0b2b862,5fa,c080e703,...) at set_rootvnode+0x2d
 vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x331
 start_init(0,cbfbad38,c0b1bbd2,322,cc0c8d0c,...) at start_init+0x65
 fork_exit(c075e345,0,cbfbad38) at fork_exit+0xb8
 fork_trampoline() at fork_trampoline+0x8
 --- trap 0, eip = 0, esp = 0xcbfbad70, ebp = 0 ---
 Trying to mount root from cd9660:/dev/md0
 lock order reversal: (sleepable after non-sleepable)
  1st 0xcc453aec vnode interlock (vnode interlock) @ /usr/src/sys/kern/vfs_hash.c:79
  2nd 0xcc453ad0 isofs (isofs) @ /usr/src/sys/kern/vfs_subr.c:2044
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,cbfba920,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9bac8,cc076250,cbfba978,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,cc453ad0,c0b19f3b,cc076250,c0b2bf05,...) at _witness_debugger+0x1e
 witness_checkorder(cc453ad0,9,c0b2bf05,7fc,c07884ed,...) at witness_checkorder+0x7ad
 __lockmgr_args(cc453ad0,80100,cc453aec,0,0,0,c0b2bf05,7fc) at __lockmgr_args+0x75b
 vop_stdlock(cbfbaa70,c0b2b4f4,c0b18ea8,80100,cc453a78,...) at vop_stdlock+0x5c
 VOP_LOCK1_APV(c0bf3d40,cbfbaa70,c0c2f4a0,cc453a78,80100,...) at VOP_LOCK1_APV+0xab
 _vn_lock(cc453a78,80100,c0b2bf05,7fc,4,...) at _vn_lock+0x5e
 vget(cc453a78,80100,cc0cad20,50,0,...) at vget+0xc1
 vfs_hash_get(cc5b1d20,c000,80000,cc0cad20,c0dc8354,...) at vfs_hash_get+0xdf
 cd9660_vget_internal(cc5b1d20,c000,80000,c0dc8354,1,cc5b8928) at cd9660_vget_internal+0x44
 cd9660_root(cc5b1d20,80000,c0dc8354,cc0cad20,4,...) at cd9660_root+0x4e
 set_rootvnode(cc453e10,0,c0b2b862,619,c0b18eaa,...) at set_rootvnode+0x2d
 vfs_mountroot_try(c0b2be61,c0b18eaa,c0b10f43,1,c080e703,...) at vfs_mountroot_try+0x2c0
 vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x3f1
 start_init(0,cbfbad38,c0b1bbd2,322,cc0c8d0c,...) at start_init+0x65
 fork_exit(c075e345,0,cbfbad38) at fork_exit+0xb8
 fork_trampoline() at fork_trampoline+0x8
 --- trap 0, eip = 0, esp = 0xcbfbad70, ebp = 0 ---
 lock order reversal: (sleepable after non-sleepable)
  1st 0xcc453b20 bufobj interlock (bufobj interlock) @ /usr/src/sys/kern/vfs_bio.c:2429
  2nd 0xe00e6070 bufwait (bufwait) @ /usr/src/sys/kern/vfs_bio.c:2443
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,cbfba6dc,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9bac8,cc073670,cbfba734,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,e00e6070,c0b2a82b,cc073670,c0b29dda,...) at _witness_debugger+0x1e
 witness_checkorder(e00e6070,9,c0b29dda,98b,c0ab205a,...) at witness_checkorder+0x7ad
 __lockmgr_args(e00e6070,81900,cc453b20,c0b2a787,50,...) at __lockmgr_args+0x75b
 getblk(cc453a78,0,0,800,0,...) at getblk+0x144
 breadn(cc453a78,0,0,800,0,...) at breadn+0x44
 bread(cc453a78,0,0,800,0,...) at bread+0x4c
 cd9660_blkatoff(cc453a78,0,0,0,cbfba948,...) at cd9660_blkatoff+0x5a
 cd9660_lookup(cbfbaa90,cc453a78,cbfbabfc,cc453a78,cbfbaab0,...) at cd9660_lookup+0x1d5
 VOP_CACHEDLOOKUP_APV(c0bf3d40,cbfbaa90,cbfbabfc,cbfbabe8,c0c2f140,...) at VOP_CACHEDLOOKUP_APV+0xa0
 vfs_cache_lookup(cbfbab10,cbfbab10,0,80000,cc453a78,...) at vfs_cache_lookup+0xc3
 VOP_LOOKUP_APV(c0bf3d40,cbfbab10,c0b2b610,1b0,cbfbabe8,...) at VOP_LOOKUP_APV+0xaa
 lookup(cbfbabd0,0,c0b2b610,e9,cc08cc2c,...) at lookup+0x567
 namei(cbfbabd0,0,c0b2b862,619,c0b18eaa,...) at namei+0x430
 vfs_mountroot_try(c0b2be61,c0b18eaa,c0b10f43,1,c080e703,...) at vfs_mountroot_try+0x310
 vfs_mountroot(c0c621b0,4,c0b1a1ef,264,0,...) at vfs_mountroot+0x3f1
 start_init(0,cbfbad38,c0b1bbd2,322,cc0c8d0c,...) at start_init+0x65
 fork_exit(c075e345,0,cbfbad38) at fork_exit+0xb8
 fork_trampoline() at fork_trampoline+0x8
 --- trap 0, eip = 0, esp = 0xcbfbad70, ebp = 0 ---
 lock order reversal:
  1st 0xcc4537ac isofs (isofs) @ /usr/src/sys/fs/cd9660/cd9660_vfsops.c:687
  2nd 0xe00e5890 bufwait (bufwait) @ /usr/src/sys/vm/vm_pager.c:313
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,cbfba7bc,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9bb20,cc073670,cbfba814,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,e00e5890,c0b2a82b,cc073670,c0b46537,...) at _witness_debugger+0x1e
 witness_checkorder(e00e5890,9,c0b46537,139,80246,...) at witness_checkorder+0x7ad
 __lockmgr_args(e00e5890,80000,0,0,0,0,c0b46537,139) at __lockmgr_args+0x75b
 initpbuf(c0dd4880,0,c0b46537,164,0,...) at initpbuf+0xeb
 getpbuf(c0dd4c3c,0,c0b47075,228,cc0cad20,...) at getpbuf+0x125
 vnode_pager_generic_getpages(cc453754,cbfbaaa0,10000,0,cbfbaa38,...) at vnode_pager_generic_getpages+0x777
 vop_stdgetpages(cbfbaa50,cc453754,c74602e8,cc453754,cbfbaa78,...) at vop_stdgetpages+0x29
 VOP_GETPAGES_APV(c0bf3d40,cbfbaa50,c0b47075,29d,c0c2f5e0,...) at VOP_GETPAGES_APV+0xa5
 vnode_pager_getpages(c74602e8,cbfbaaa0,10,0,10,...) at vnode_pager_getpages+0xb6
 exec_map_first_page(cbfbabec,0,c0b1ba00,169,cc0c8d0c,...) at exec_map_first_page+0x19f
 kern_execve(cc0cad20,cbfbac74,0,bfbfffe4,0,e9417000,e9417000,e941700e,e941700e,e9457000,3fff2,2,0,0) at kern_execve+0x3d3
 execve(cc0cad20,cbfbacdc,0,0,cbfbace8,...) at execve+0x4c
 start_init(0,cbfbad38,c0b1bbd2,322,cc0c8d0c,...) at start_init+0x27e
 fork_exit(c075e345,0,cbfbad38) at fork_exit+0xb8
 fork_trampoline() at fork_trampoline+0x8
 --- trap 0, eip = 0, esp = 0xcbfbad70, ebp = 0 ---
 Mounting compressed base:
 md1.uzip: 26993 x 8192 blocks
 Overlay mdmfs [yes/no] (no): yes
 Allocating temporary filesystem:loc
 Overlaying temk ordeporary filesyster rem:
 versal: (sleepable after non-sleepable)
  1st 0xcc45328c vnode interlock (vnode interlock) @ /usr/src/sys/kern/vfs_hash.c:79
  2nd 0xcc453270 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2044
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,ee9347e0,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9b910,cc076388,ee934838,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,cc453270,c0b19792,cc076388,c0b2bf05,...) at _witness_debugger+0x1e
 witness_checkorder(cc453270,9,c0b2bf05,7fc,0,...) at witness_checkorder+0x7ad
 __lockmgr_args(cc453270,80100,cc45328c,0,0,...) at __lockmgr_args+0x75b
 ffs_lock(ee93493c,ee934940,c07887d0,80100,cc453218,...) at ffs_lock+0x7d
 VOP_LOCK1_APV(c0c175c0,ee93493c,c0c2f4a0,cc453218,80100,...) at VOP_LOCK1_APV+0xab
 _vn_lock(cc453218,80100,c0b2bf05,7fc,4,...) at _vn_lock+0x5e
 vget(cc453218,80100,cc525230,50,0,...) at vget+0xc1
 vfs_hash_get(cc5b1a80,2,80000,cc525230,ee934a34,...) at vfs_hash_get+0xdf
 ffs_vget(cc5b1a80,2,80000,ee934a34,cc453324,...) at ffs_vget+0x43
 ufs_root(cc5b1a80,80000,ee934a8c,cc525230,ee934ba0,...) at ufs_root+0x28
 lookup(ee934b88,0,c0b2b610,e9,cc60692c,...) at lookup+0x89f
 namei(ee934b88,0,ee934c4b,ee934c44,379000,...) at namei+0x430
 kern_statat(cc525230,200,ffffff9c,bfbfe505,0,...) at kern_statat+0x5f
 kern_lstat(cc525230,bfbfe505,0,ee934c1c,cc525230,...) at kern_lstat+0x36
 lstat(cc525230,ee934cf8,8,ee934d2c,c0bf5c90,...) at lstat+0x2b
 syscall(ee934d38) at syscall+0x27b
 Xint0x80_syscall() at Xint0x80_syscall+0x20
 --- syscall (190, FreeBSD ELF32, lstat), eip = 0x8309157, esp = 0xbfbfd79c, ebp = 0xbfbfe448 ---
 Chroot to base...
 Ejecting CD-ROM...
 Unit stopped successfully, Media ejected
 lock order reversal: (sleepable after non-sleepable)
  1st 0xcc66e9e0 vnode interlock (vnode interlock) @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_subr.c:362
  2nd 0xcc66e9c4 unionfs (unionfs) @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_subr.c:371
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,cbfba8a8,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9b9c0,cc076458,cbfba900,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251ac,cc66e9c4,c0f2b791,cc076458,c0f2b688,...) at _witness_debugger+0x1e
 witness_checkorder(cc66e9c4,9,c0f2b688,173,cc0cad20,...) at witness_checkorder+0x7ad
 __lockmgr_args(cc66e9c4,80100,cc66e9e0,0,0,...) at __lockmgr_args+0x75b
 unionfs_noderem(cc66e96c,cc0cad20,cbfbaa0c,c0a94966,cbfbaa30,...) at unionfs_noderem+0xa2
 unionfs_reclaim(cbfbaa30,cc0cad20,0,cc66e96c,cbfbaa54,...) at unionfs_reclaim+0x1b
 VOP_RECLAIM_APV(c0f2cd60,cbfbaa30,cc0cad20,0,0,...) at VOP_RECLAIM_APV+0x9f
 vgonel(cc66e9e0,0,c0b2bf05,98a,cbfbaab4,...) at vgonel+0x1b1
 vrecycle(cc66e96c,cc0cad20,cbfbaa9c,c0a94a36,cbfbaab4,...) at vrecycle+0x45
 unionfs_inactive(cbfbaab4,cc66e9e0,cc66e96c,cc66e9e0,cbfbaacc,...) at unionfs_inactive+0x28
 VOP_INACTIVE_APV(c0f2cd60,cbfbaab4,c0b2bf05,8f1,c0c2f460,...) at VOP_INACTIVE_APV+0xa0
 vinactive(c0f2cd60,cbfbaae8,c0b2bf05,87d,cbfbab08,...) at vinactive+0x82
 vput(cc66e96c,ffffffdf,cc08cb00,0,cc0cad20,...) at vput+0x1c9
 kern_statat(cc0cad20,0,ffffff9c,834fd7a,0,...) at kern_statat+0xc0
 kern_stat(cc0cad20,834fd7a,0,cbfbac1c,100ff01,...) at kern_stat+0x36
 stat(cc0cad20,cbfbacf8,8,c0b25d4c,c0bf5c60,...) at stat+0x2b
 syscall(cbfbad38) at syscall+0x27b
 Xint0x80_syscall() at Xint0x80_syscall+0x20
 --- syscall (188, FreeBSD ELF32, stat), eip = 0x830916b, esp = 0xbfbfe98c, ebp = 0xbfbfee98 ---
 lock order reversal:
  1st 0xcc66e37c isofs (isofs) @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1709
  2nd 0xcc66e164 ufs (ufs) @ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1370
  3rd 0xcc66e058 isofs (isofs) @ /usr/src/sys/fs/cd9660/cd9660_vfsops.c:687
 KDB: stack backtrace:
 db_trace_self_wrapper(c0b228e2,ee94c648,c07d16c8,4,c0b1e285,...) at db_trace_self_wrapper+0x26
 kdb_backtrace(4,c0b1e285,c0d9bac8,cc076250,ee94c6a0,...) at kdb_backtrace+0x29
 _witness_debugger(c0b251c5,cc66e058,c0b19f3b,cc076250,c0b19f41,...) at _witness_debugger+0x1e
 witness_checkorder(cc66e058,9,c0b19f41,2af,c746d048,...) at witness_checkorder+0x7ad
 __lockmgr_args(cc66e058,80000,0,0,0,...) at __lockmgr_args+0x75b
 cd9660_vget_internal(cc659540,2b102,80000,ee94c818,0,...) at cd9660_vget_internal+0x112
 cd9660_lookup(ee94c964,cc66e324,ee94cc08,cc66e324,ee94c984,...) at cd9660_lookup+0x737
 VOP_CACHEDLOOKUP_APV(c0bf3d40,ee94c964,ee94cc08,ee94ca60,c0c2f140,...) at VOP_CACHEDLOOKUP_APV+0xa0
 vfs_cache_lookup(ee94ca4c,ee94ca4c,ee94caa8,2,ee94cc08,...) at vfs_cache_lookup+0xc3
 VOP_LOOKUP_APV(c0bf3d40,ee94ca4c,cc66e10c,ee94ca78,c0f28609,...) at VOP_LOOKUP_APV+0xaa
 unionfs_lookup(ee94caa8,cc66e218,ee94cc08,cc66e218,ee94cac8,...) at unionfs_lookup+0x69c
 VOP_CACHEDLOOKUP_APV(c0f2cd60,ee94caa8,ee94cc08,ee94cbf4,c0c2f140,...) at VOP_CACHEDLOOKUP_APV+0xa0
 vfs_cache_lookup(ee94cb28,ee94cb28,0,80000,cc66e218,...) at vfs_cache_lookup+0xc3
 VOP_LOOKUP_APV(c0f2cd60,ee94cb28,c0b2b610,2fd,ee94cbf4,...) at VOP_LOOKUP_APV+0xaa
 lookup(ee94cbdc,0,c0b2b610,e9,cc60612c,...) at lookup+0x567
 namei(ee94cbdc,ee94cbd8,c07d14a7,c0b53011,0,...) at namei+0x430
 kern_accessat(cc356690,ffffff9c,83bd656,0,0,...) at kern_accessat+0x86
 kern_access(cc356690,83bd656,0,4,ee94cd2c,...) at kern_access+0x36
 access(cc356690,ee94ccf8,8,ee94cd2c,c0bf4dd8,...) at access+0x29
 syscall(ee94cd38) at syscall+0x27b
 Xint0x80_syscall() at Xint0x80_syscall+0x20
 --- syscall (33, FreeBSD ELF32, access), eip = 0x82ffee3, esp = 0xbfbfb79c, ebp = 0xbfbfdb48 ---
 
 --Boundary-00=_jTFvIZjZdb41fhF--

From: David Naylor <naylor.b.david@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/126973: [unionfs] [hang] System hang with unionfs and init chroot [regression]
Date: Mon, 22 Sep 2008 20:13:48 +0200

 Hi,
 
 After some investigation I have isolated the commit that results in the 
 breakage.  Please see: http://www.freshbsd.org/2007/10/14/13/46
 
 If I have a unionfs.ko built from before this commit then the system does not 
 hang at chroot but after this commit it does hang.  
 
 Regards
 
 David

From: David Naylor <naylor.b.david@gmail.com>
To: bug-followup@freebsd.org
Cc: Daichi GOTO <daichi@freebsd.org>,
 Masanori OZAWA <ozawa@ongs.co.jp>
Subject: Re: kern/126973: [unionfs] [hang] System hang with unionfs and init chroot [regression]
Date: Sun, 25 Jan 2009 15:44:42 +0200

 --Boundary-00=_NzGfJ5pob1WlSRs
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Hi,
 
 I have found a work-a-round for this problem (see "However if" below):
 
 I would also like to clarify the problem (the following steps are the ones I 
 take to prepare my environment, some probably are not required):
 
 (Create a compressed image of 'world')
 # cd /usr/src
 # make buildworld buildkernel
 # mkdir /tmp/world && make installworld distribution DESTDIR=/tmp/world
 # cat << _EOF > /tmp/world/etc/rc.conf
 hostname="dragonbsd"
 root_rw_mount="NO"
 _EOF
 # cat << _EOF > /tmp/world/etc/fstab
 tmpfs			/tmp			tmpfs	rw		0	0
 _EOF
 # makefs /tmp/world.ufs /tmp/world
 # mkuzip -o /tmp/world.uzip /tmp/world.ufs
 
 (Prepare a USB UMASS device: da0)
 # fdisk -BI /dev/da0
 # cat << _EOF > /tmp/bsdlabel
 8 partitions:
 a: 256m * 4.2BSD
 b: * * 4.2BSD
 c: * * unused
 _EOF
 # bsdlabel -BR /dev/da0s1 /tmp/bsdlabel
 # newfs -L DragonBSDBase /dev/da0s1a
 # newfs -UL DragonBSD /dev/da0s1b
 
 (Install FreeBSD onto USB UMASS device: da0)
 # mount /dev/da0s1a /mnt
 # mkdir -p /mnt/base /mnt/dev /mnt/tmp /mnt/usr/lib
 # cp -rp /tmp/world/boot /mnt/
 # cp /tmp/world/usr/lib/kgzldr.o /mnt/usr/lib
 # cd /usr/src && make installkernel DESTDIR=/mnt
 # mkdir /mnt/rescue && cd /usr/src/rescue && make install DESTDIR=/mnt
 # cp /tmp/world.uzip /mnt/base.uzip
 # cat << _EOF > /mnt/boot/loader.conf
 geom_uzip_load="YES"
 unionfs_load="YES"
 zlib_load="YES"
 init_script="/chroot"
 init_chroot="/base"
 vfs.root.mountfrom="ufs:/dev/ufs/DragonBSDBase"
 _EOF
 
 (The chroot script)
 # cat << _EOF > /mnt/chroot
 #!/rescue/sh
 PATH=/rescue
 mount -o ro /dev/\$(mdconfig -a -t vnode -o readonly -f /base.uzip).uzip /base
 mount /dev/ufs/DragonBSD /tmp
 mount -t unionfs -o noatime /tmp /base
 echo "Chroot to /base..."
 _EOF
 # chmod a+x /mnt/chroot
 
 If you boot from da0 then after "Chroot to /base..." is displayed some lock 
 order reversal debug messages will be displayed and then nothing.  ^t does 
 work but says something about not a controlling terminal.  Ctrl-Alt-Esc works 
 and hitting the power button causes the system to shutdown.  
 
 However if:
 # echo mount -t devfs devfs /base/dev >> /mnt/chroot
 is done then da0 will boot without a problem...
 
 Thus it is my suspicion that the system gets into a dead-lock when trying to 
 mount /dev after the chroot.  
 
 Hope this clarifies the issue and provides some insight?  Attached, for your 
 convenience, is a script that will create the bootable umass (assuming it is 
 da0).  
 
 Regards,
 
 David
 
 --Boundary-00=_NzGfJ5pob1WlSRs
 Content-Type: application/x-shellscript;
   name="makeusb.sh"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="makeusb.sh"
 
 #!/bin/sh
 cd /usr/src
 make buildworld buildkernel
 mkdir /tmp/world && make installworld distribution DESTDIR=/tmp/world
 cat << _EOF > /tmp/world/etc/rc.conf
 hostname="dragonbsd"
 root_rw_mount="NO"
 _EOF
 cat << _EOF > /tmp/world/etc/fstab
 tmpfs			/tmp			tmpfs	rw		0 0
 _EOF
 makefs /tmp/world.ufs /tmp/world
 mkuzip -o /tmp/world.uzip /tmp/world.ufs
 fdisk -BI /dev/da0
 cat << _EOF > /tmp/bsdlabel
 8 partitions:
 a: 256m * 4.2BSD
 b: * * 4.2BSD
 c: * * unused
 _EOF
 bsdlabel -BR /dev/da0s1 /tmp/bsdlabel
 newfs -L DragonBSDBase /dev/da0s1a
 newfs -UL DragonBSD /dev/da0s1b
 mount /dev/da0s1a /mnt
 mkdir -p /mnt/base /mnt/dev /mnt/tmp /mnt/usr/lib
 cp -rp /tmp/world/boot /mnt/
 cp /tmp/world/usr/lib/kgzldr.o /mnt/usr/lib
 cd /usr/src && make installkernel DESTDIR=/mnt
 mkdir /mnt/rescue && cd /usr/src/rescue && make install DESTDIR=/mnt
 cp /tmp/world.uzip /mnt/base.uzip
 cat << _EOF > /mnt/boot/loader.conf
 geom_uzip_load="YES"
 unionfs_load="YES"
 zlib_load="YES"
 init_script="/chroot"
 init_chroot="/base"
 vfs.root.mountfrom="ufs:/dev/ufs/DragonBSDBase"
 _EOF
 cat << _EOF > /mnt/chroot
 #!/rescue/sh
 PATH=/rescue
 mount -o ro /dev/\$(mdconfig -a -t vnode -o readonly -f /base.uzip).uzip /base
 mount /dev/ufs/DragonBSD /tmp
 mount -t unionfs -o noatime /tmp /base
 echo "Chroot to /base..."
 _EOF
 chmod a+x /mnt/chroot
 --Boundary-00=_NzGfJ5pob1WlSRs--

From: David Naylor <naylor.b.david@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/126973: [unionfs] [hang] System hang with unionfs and init chroot [regression]
Date: Tue, 19 Jan 2010 11:41:05 +0200

 I will be happy for this bug to be closed if the work-around was documented.  
 Unfortunately I do not speak groff.  The document may be as follows:
 
 BUGS
 If one is using unionfs over a directory that is the target for init_chroot  
 then make sure devfs is explicitly mounted otherwise the system will freeze 
 when init(8) attempts to chroot.  
State-Changed-From-To: open->open 
State-Changed-By: linimon 
State-Changed-When: Wed Jul 3 00:50:32 UTC 2013 
State-Changed-Why:  
commit bit has been taken in for safekeeping. 


Responsible-Changed-From-To: daichi->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jul 3 00:50:32 UTC 2013 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=126973 
>Unformatted:
