Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2006 15:19:30 GMT
From:      mdff <nospam@mgedv.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/99256: kernel panic/freeze with geli and ufs [maybe related to PR: kern/98093]
Message-ID:  <200606211519.k5LFJUpp050915@www.freebsd.org>
Resent-Message-ID: <200606211520.k5LFKDiK073651@freefall.freebsd.org>

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

>Number:         99256
>Category:       misc
>Synopsis:       kernel panic/freeze with geli and ufs [maybe related to PR: kern/98093]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 21 15:20:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     mdff
>Release:        6.1-RELEASE
>Organization:
>Environment:
>Description:
the problem:
---------------------------------------------------------
the system panics or freezes when accessing a ffs_fs
on missing geli-providers or missing geli-consumers (usb-
drive in my case).

if i unplug the usb-drive before umount/detach, geli
logs read/write-errors to the console (that's fine),
except for umount -f, that causes the system to freeze.

if i "geli detach -f" the geli-disk (sometimes needed
at shutdown, processes don't die and don't release fs-locks),
a chdir() to the mp will cause a panic, and a umount
(with or without -f) will cause the system to freeze 

another problem with the panic: pressing any key to
interrupt auto reboot does not work - the keyboard locks up.

pulling an active usb-drive should not - but can - happen.
---------------------------------------------------------


finally, a dmesg:
--------------------------------------------------------------------------------
Copyright (c) 1992-2006 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.1-RELEASE #0: Sun May  7 04:32:43 UTC 2006
    root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
ACPI APIC Table: <VIA694 MSI ACPI>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) XP 1800+ (1527.23-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0480800<SYSCALL,MP,MMX+,3DNow+,3DNow>
real memory  = 536805376 (511 MB)
avail memory = 515932160 (492 MB)
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <VIA694 MSI ACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff,0x4000-0x407f,0x4080-0x40ff,0x5000-0x500f,0x6000-0x607f on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA 82C8363 (Apollo KT133x/KM133) host to PCI bridge> mem 0xd0000000-0xd3ffffff 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)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686B UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xa000-0xa00f at device 7.1 on pci0
atapci0: Correcting VIA config for southbridge data corruption bug
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
uhci0: <VIA 83C572 USB controller> port 0xa400-0xa41f irq 5 at device 7.2 on pci0
uhci0: [GIANT-LOCKED]
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xa800-0xa81f irq 5 at device 7.3 on pci0
uhci1: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
atapci1: <HighPoint HighPoint  UDMA133 controller> port 0xac00-0xac07,0xb000-0xb003,0xb400-0xb407,0xb800-0xb803,0xbc00-0xbcff irq 18 at device 9.0 on pci0
ata2: <ATA channel 0> on atapci1
ata3: <ATA channel 1> on atapci1
xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xc000-0xc07f mem 0xd8000000-0xd800007f irq 17 at device 12.0 on pci0
miibus0: <MII bus> on xl0
xlphy0: <3c905C 10/100 internal PHY> on miibus0
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: Ethernet address: 00:04:76:95:d8:c0
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0: <ECP parallel printer port> port 0x378-0x37f,0x778-0x77b irq 7 drq 3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse, device ID 3
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xc97ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 1527227117 Hz quality 800
Timecounters tick every 1.000 msec
acd0: DVDROM <LITEON DVD-ROM LTD163/GH5K> at ata0-master UDMA33
ad4: 38166MB <WDC WD400BB-60DGA0 05.03E05> at ata2-master UDMA100
ad6: 38146MB <WDC WD400BB-75DEA0 05.03E05> at ata3-master UDMA100
ar0: 38146MB <HighPoint v2 RocketRAID RAID1> status: READY
ar0: disk0 READY (master) using ad4 at ata2-master
ar0: disk1 READY (mirror) using ad6 at ata3-master
Trying to mount root from ufs:/dev/ar0s1a
--------------------------------------------------------------------------------

>How-To-Repeat:

1st, create and mount an geli-encrypted usb-drive:
----------------------------------------------------
plug in a usb stick
  (kingston data traveler 256MB)
create a drive-key
  (dd if=/dev/random of=/tmp/usb.key bs=1024 count=256)
init encryption
  (geli init -v -P  -a AES -l 256 -K /tmp/usb.key -s 512 /dev/da0)
attach the encrypted drive
  (geli attach -p -k /tmp/usb.key /dev/da0)
newfs it
  (newfs -o space -m 0 -n /dev/da0.eli)
mount it
  (mount -o rw,noatime /dev/da0.eli /tmp/usb)
we want to auto-detach it on umount
  (geli detach -l /dev/da0.eli)
-------------------------------------------------------

then either:
a)
pull the usb-drive
try a umount -f of the mounted drive
or b)
issue "geli detach -f " on the geli-disk before umount
and try to chdir() to or umount the mounted partition.

>Fix:

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



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