[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-bugs
Subject:    [unveil] kernel panic for mfs/read-only filesystems during reboot
From:       Jiri B. <jirib () live ! com>
Date:       2018-08-25 22:09:06
Message-ID: AM5P189MB04987C6CD6D695C5DCCD4031D9350 () AM5P189MB0498 ! EURP189 ! PROD ! OUTLOOK ! COM
[Download RAW message or body]

I'm got kernel panic on OpenBSD 6.4-beta (GENERIC.MP) #260: Sat Aug 25 02:10:42 MDT \
2018 when experimenting with mfs and read-only filesystems.

# shutdown -r now
shutdown: unveil: Read-only file system
# mount                                                               
/dev/sd0a on / type ffs (local, read-only)
mfs:35132 on /dev type mfs (asynchronous, local, noexec, nosuid, size=102400 \
512-blocks) mfs:74539 on /etc type mfs (asynchronous, local, nodev, nosuid, \
size=102400 512-blocks) mfs:26844 on /tmp type mfs (asynchronous, local, nodev, \
noexec, nosuid, size=204800 512-blocks) mfs:54540 on /var type mfs (asynchronous, \
local, nodev, noexec, nosuid, size=102400 512-blocks) mfs:55695 on /var/log type mfs \
                (asynchronous, local, nodev, noexec, nosuid, size=262144 512-blocks)
/dev/sd0d on /usr type ffs (local, nodev, read-only)
/dev/sd0e on /usr/local type ffs (local, nodev, nosuid, read-only)
/dev/sd0f on /data type ffs (local, nodev, nosuid, read-only)
# reboot
panic: kernel diagnostic assertion "vp->v_uvcount == 0" failed: file \
"/usr/src/sys/kern/kern_unveil.c", line 748 Stopped at      db_enter+0x12:  popq    \
%r11  TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*469083  35132      0           0          0    1K mount_mfs
 240741  31688      0     0x14000      0x200    0  reaper
db_enter() at db_enter+0x12
panic() at panic+0x120
__assert(ffffffff816afd14,ffff800021147ec0,0,ffffff006fc21338) at __assert+0x24

unveil_removevnode(b3fdf0663036209b) at unveil_removevnode+0xf2
dounmount_leaf(36a320cd3cded2ab,ffff800000096c00,0) at dounmount_leaf+0x69
dounmount(bf305e5e97ceba2d,ffff800000096c00,ffff8000ffff8008) at dounmount+0xfa

mfs_start(3167c81713baac45,ffff800000096c00,ffffff007f63e000) at mfs_start+0xf9

sys_mount(a36477f38b506169,150,ffff8000ffff8008) at sys_mount+0x5b5
syscall(bc035fa0eb20afa4) at syscall+0x32a
Xsyscall(6,15,7f7ffffda610,15,7f7ffffdaaac,7f7ffffdaf8d) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdae00, count: 5
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.

ddb{1}> show panic
kernel diagnostic assertion "vp->v_uvcount == 0" failed: file "/usr/src/sys/ker
n/kern_unveil.c", line 748
ddb{1}> show uvm
Current UVM status:
  pagesize=4096 (0x1000), pagemask=0xfff, pageshift=12
  504236 VM pages: 10856 active, 2913 inactive, 0 wired, 460030 free (57336 zer
o)
  min  10% (25) anon, 10% (25) vnode, 5% (12) vtext
  freemin=16807, free-target=22409, inactive-target=0, wired-max=168078
  faults=131805, traps=130457, intrs=12942, ctxswitch=38035 fpuswitch=0
  softint=15328, syscalls=340659, kmapent=16
  fault counts:
    noram=0, noanon=0, noamap=0, pgwait=0, pgrele=0
    ok relocks(total)=7550(7550), anget(retries)=49584(0), amapcopy=56876
    neighbor anon/obj pg=3853/52486, gets(lock/unlock)=24354/7550
    cases: anon=40560, anoncow=9024, obj=20857, prcopy=3497, przero=57861
  daemon and swap counts:
    woke=0, revs=0, scans=0, obscans=0, anscans=0
    busy=0, freed=0, reactivate=0, deactivate=0
    pageouts=0, pending=0, nswget=0
    nswapdev=1
    swpages=526127, swpginuse=0, swpgonly=0 paging=0
  kernel pointers:
    objs(kern)=0xffffffff81ca11a0
ddb{1}> show bcstats
Current Buffer Cache status:
numbufs 5869 busymapped 0, delwri 12
kvaslots 6302 avail kva slots 6302
bufpages 22694, dmapages 22694, dirtypages 21
pendingreads 0, pendingwrites 0
highflips 0, highflops 0, dmaflips 0
ddb{1}> trace
db_enter() at db_enter+0x12
panic() at panic+0x120
__assert(ffffffff816afd14,ffff800021147ec0,0,ffffff006fc21338) at __assert+0x24

unveil_removevnode(b3fdf0663036209b) at unveil_removevnode+0xf2
dounmount_leaf(36a320cd3cded2ab,ffff800000096c00,0) at dounmount_leaf+0x69
dounmount(bf305e5e97ceba2d,ffff800000096c00,ffff8000ffff8008) at dounmount+0xfa

mfs_start(3167c81713baac45,ffff800000096c00,ffffff007f63e000) at mfs_start+0xf9

sys_mount(a36477f38b506169,150,ffff8000ffff8008) at sys_mount+0x5b5
syscall(bc035fa0eb20afa4) at syscall+0x32a
Xsyscall(6,15,7f7ffffda610,15,7f7ffffdaaac,7f7ffffdaf8d) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdae00, count: -10

- steps to reproduce:
* create fs setup as in mount output below
* shutdown -r
* reboot

# mount                                                               
/dev/sd0a on / type ffs (local, read-only)
mfs:35132 on /dev type mfs (asynchronous, local, noexec, nosuid, size=102400 \
512-blocks) mfs:74539 on /etc type mfs (asynchronous, local, nodev, nosuid, \
size=102400 512-blocks) mfs:26844 on /tmp type mfs (asynchronous, local, nodev, \
noexec, nosuid, size=204800 512-blocks) mfs:54540 on /var type mfs (asynchronous, \
local, nodev, noexec, nosuid, size=102400 512-blocks) mfs:55695 on /var/log type mfs \
                (asynchronous, local, nodev, noexec, nosuid, size=262144 512-blocks)
/dev/sd0d on /usr type ffs (local, nodev, read-only)
/dev/sd0e on /usr/local type ffs (local, nodev, nosuid, read-only)
/dev/sd0f on /data type ffs (local, nodev, nosuid, read-only)

booting hd0a:/bsd: 10438407+2528272+266264+0+671744 \
[693713+119+848016+591435]=0xf4e0f0 entry point at 0x1000158
[ using 2134256 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2018 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.4-beta (GENERIC.MP) #260: Sat Aug 25 02:10:42 MDT 2018
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2130567168 (2031MB)
avail mem = 2056863744 (1961MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf5930 (10 entries)
bios0: vendor SeaBIOS version "rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org" \
                date 04/01/2014
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Core 2 Duo P9xxx (Penryn Class Core 2), 2394.62 MHz, 06-17-03
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,SSSE3,CX16,SSE4.1,x2APIC,HV,NXE,LONG,LAHF,MELTDOWN
                
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way \
                L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 1000MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel Core 2 Duo P9xxx (Penryn Class Core 2), 2394.09 MHz, 06-17-03
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,SSSE3,CX16,SSE4.1,x2APIC,HV,NXE,LONG,LAHF,MELTDOWN
                
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way \
                L2 cache
cpu1: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu1: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu1: smt 0, core 0, package 1
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
"ACPI0006" at acpi0 not configured
acpicmos0 at acpi0
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 wired \
                to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 0 int 9
iic0 at piixpm0
em0 at pci0 dev 3 function 0 "Intel 82540EM" rev 0x03: apic 0 int 11, address \
52:54:00:f2:28:44 em1 at pci0 dev 4 function 0 "Intel 82540EM" rev 0x03: apic 0 int \
11, address 52:54:00:d9:75:7e uhci0 at pci0 dev 5 function 0 "Intel 82801I USB" rev \
0x03: apic 0 int 10 uhci1 at pci0 dev 5 function 1 "Intel 82801I USB" rev 0x03: apic \
0 int 10 uhci2 at pci0 dev 5 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 11
ehci0 at pci0 dev 5 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ahci0 at pci0 dev 6 function 0 "Intel 82801I AHCI" rev 0x02: apic 0 int 10, AHCI 1.0
ahci0: port 0: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, QEMU HARDDISK, 2.5+> SCSI3 0/direct fixed \
                t10.ATA_QEMU_HARDDISK_13070165000000000623
sd0: 4096MB, 512 bytes/sector, 8388608 sectors, thin
virtio0 at pci0 dev 7 function 0 "Qumranet Virtio Memory" rev 0x00
viomb0 at virtio0
virtio0: apic 0 int 11
virtio1 at pci0 dev 8 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio1
virtio1: apic 0 int 11
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (ee68e7c48391ecff.a) swap on sd0b dump on sd0b


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic