Bug #1653
closedvinum: page fault panic in vn_strategy
0%
Description
I have 2 disks that I was preparing for a vinum based raid1 mount and some time
ago were mountable (just not as root mounts :) ), but now when I start vinum,
the mentioned panic occurs. Not quite sure, but I think the vinum config I
used for the disks is the one at http://www.rumko.net/dragonfly/config and the
disks are labelled like http://www.rumko.net/dragonfly/disklabel
The dump is at leaf:~rumko/crash/vinum/*
Unread portion of the kernel message buffer:
<6>vinum: loaded
Fatal trap 12: page fault while in kernel mode
mp_lock = 00000000; cpuid = 0; lapic.id = 00000000
fault virtual address = 0x34
fault code = supervisor write, page not present
instruction pointer = 0x8:0xc02454a6
stack pointer = 0x10:0xde7b0afc
frame pointer = 0x10:0xde7b0afc
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 981 (vinum)
current thread = pri 10
<- SMP: XXX
trap number = 12
panic: page fault
mp_lock = 00000000; cpuid = 0
Trace beginning at frame 0xde7b0a00
panic(de7b0a24,10,de7b0ab4,c,de7b0a44) at panic+0x14d
panic(c0410230,c04277da,2,0,fffff) at panic+0x14d
trap_fatal(34,0,de7b0ab4,d99e0330,d99e0210) at trap_fatal+0x31d
trap_pfault(a,c01ff30f,c04f8ba0,d99e0210,d97c6a98) at trap_pfault+0x12e
trap(de7b0ab4) at trap+0x776
calltrap() at calltrap+0xd
--- trap 0, eip = 0x2, esp = 0xde7b0af8, ebp = 0x200 ---
boot() called on cpu#0
Uptime: 1m21s
Physical memory: 1785 MB
Dumping 149 MB: 134 118 102 86 70 54 38 22 6
Reading symbols from /boot/modules/acpi.ko...done.
Loaded symbols for /boot/modules/acpi.ko
Reading symbols from /boot/modules/null.ko...done.
Loaded symbols for /boot/modules/null.ko
Reading symbols from /boot/modules/vinum.ko...done.
Loaded symbols for /boot/modules/vinum.ko
get_mycpu (di=0xc04a1f00) at ./machine/thread.h:83
83 __asm ("movl %%fs:globaldata,%0" : "=r"
(gd) : "m"(_mycpu__dummy));
(kgdb) bt
#0 _get_mycpu (di=0xc04a1f00) at ./machine/thread.h:83
#1 md_dumpsys (di=0xc04a1f00)
at /usr/src/sys/platform/pc32/i386/dump_machdep.c:264
#2 0xc0200b36 in dumpsys () at /usr/src/sys/kern/kern_shutdown.c:838
#3 0xc0201108 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:387
#4 0xc0201666 in panic (fmt=0xc0410230 "%s")
at /usr/src/sys/kern/kern_shutdown.c:744
#5 0xc03ddf1d in trap_fatal (frame=0xde7b0ab4, eva=<value optimized out>)
at /usr/src/sys/platform/pc32/i386/trap.c:1127
#6 0xc03de05d in trap_pfault (frame=0xde7b0ab4, usermode=0, eva=52)
at /usr/src/sys/platform/pc32/i386/trap.c:1028
#7 0xc03dedad in trap (frame=0xde7b0ab4)
at /usr/src/sys/platform/pc32/i386/trap.c:707
#8 0xc03c7c97 in calltrap ()
at /usr/src/sys/platform/pc32/i386/exception.s:785
#9 0xc02454a6 in vn_strategy (vp=0x0, bio=0xc3dff8a0)
at /usr/src/sys/kern/vfs_bio.c:3366
#10 0xde7bdc1b in driveio (drive=0xda0f68c0,
buf=0xd2767000 "\377\377\377\377\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336",
length=512,
offset=4096, cmd=BUF_CMD_READ) at /usr/src/sys/dev/raid/vinum/vinumio.c:293
#11 0xde7bdf79 in read_drive_label (drive=0xda0f68c0, verbose=0)
at /usr/src/sys/dev/raid/vinum/vinumio.c:338
#12 0xde7be054 in check_drive (devicename=0xde7b0ba8 "/dev/da1s1h")
at /usr/src/sys/dev/raid/vinum/vinumio.c:378
#13 0xde7be40c in vinum_scandisk (devicename=0xc3a638e0, drives=3)
at /usr/src/sys/dev/raid/vinum/vinumio.c:739
#14 0xde7b917e in vinumattach (mod=0xc3b04ff8, type=MOD_LOAD, unused=0x0)
at /usr/src/sys/dev/raid/vinum/vinum.c:140
#15 vinum_modevent (mod=0xc3b04ff8, type=MOD_LOAD, unused=0x0)
at /usr/src/sys/dev/raid/vinum/vinum.c:296
#16 0xc01df436 in module_register_init (arg=0xde7c60f0)
at /usr/src/sys/kern/kern_module.c:112
#17 0xc01e0be8 in linker_file_sysinit
(filename=0xc3a88928 "/boot/modules/vinum.ko", result=0xde7b0c88)
at /usr/src/sys/kern/kern_linker.c:171
#18 linker_load_file (filename=0xc3a88928 "/boot/modules/vinum.ko",
result=0xde7b0c88) at /usr/src/sys/kern/kern_linker.c:336
#19 0xc01e0d07 in linker_load_module (kldname=<value optimized out>,
modname=0xd9841000 "vinum", parent=0x0, verinfo=0x0, lfpp=0xde7b0cb0)
at /usr/src/sys/kern/kern_linker.c:1451
#20 0xc01e1112 in sys_kldload (uap=0xde7b0cf0)
at /usr/src/sys/kern/kern_linker.c:784
#21 0xc03df6a9 in syscall2 (frame=0xde7b0d40)
at /usr/src/sys/platform/pc32/i386/trap.c:1361
#22 0xc03c7d46 in Xint0x80_syscall ()
at /usr/src/sys/platform/pc32/i386/exception.s:876
#23 0x0000001f in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(kgdb)
--
Regards,
Rumko
Updated by tuxillo almost 15 years ago
Hi Rumko,
Do you have the same error if you use the disknames instead of the serial numbers?
The problem seems that drive->vp is an invalid vnode that when passed to
vn_strategy() causes a panic.
Cheers,
Antonio Huete
Updated by tuxillo almost 15 years ago
Hi again,
Nevermind testing, I just reproduced it on my test VM. I will investigate it
further.
Cheers,
Antonio Huete
Updated by alexh almost 15 years ago
The problem here lies within open_drive and especially vn_opendisk. vn_opendisk
is synthesizing a vnode with a given major/minor, which can only go wrong with
devfs. The correct solution would be to do a namecache lookup (look for
references to nlookup_init or nlookup_init_raw for sample code) instead of
calling getsynthvnode() in vn_opendisk.
Would be good if someone (tux?) could take care of this; it should be rather
straightforward. If that's not possible, I'll post a fix whenever I have some
more time (~ 1 week).
Cheers,
Alex Hornung