NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58760: running fdisk(8) on a vnd(4) backed by NFS crashes the kernel



>Number:         58760
>Category:       kern
>Synopsis:       running fdisk(8) on a vnd(4) backed by NFS crashes the kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 19 16:20:00 +0000 2024
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD unpluged.duskware.de 10.99.12 NetBSD 10.99.12 (UNPLUGED) #600: Mon Oct 14 12:03:10 CEST 2024 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/evbarm/compile/UNPLUGED evbarm
Architecture: earmv5
Machine: evbarm
>Description:

In a directory that is NFS mounted do:

> cd $something/on/nfs
> dd if=/dev/zero of=blah.img count=128
128+0 records in
128+0 records out
65536 bytes transferred in 0.126 secs (520126 bytes/sec)
> fdisk -0 -u -f -s 12/32/96 -F ./blah.img
> fdisk blah.img
Disk: blah.img
NetBSD disklabel disk geometry:
cylinders: 1, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 128, bytes/sector: 512

BIOS disk geometry:
cylinders: 1, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 128

Partitions aligned to 16065 sector boundaries, offset 63

Partition table:
0: Primary DOS with 32 bit FAT - LBA (sysid 12)
    start 32, size 96 (0 MB, Cyls 0/0/33-0/2/2)
        PBR is not bootable: All bytes are identical (0x00)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
No active partition.
Drive serial number: 0 (0x00000000)
> su
# vnconfig -c vnd0 blah.img
# fdisk vnd0

... and notice the kernel crash like this:

[ 685.0814275] panic: nfs physio/async
[ 685.0814275] cpu0: Begin traceback...
[ 685.0814275] 0xd4d2fe74: netbsd:db_panic+0x14
[ 685.0814275] 0xd4d2fe94: netbsd:vpanic+0x14c
[ 685.0814275] 0xd4d2feac: netbsd:panic+0x24
[ 685.0814275] 0xd4d2fed4: netbsd:nfs_strategy+0x60
[ 685.0814275] 0xd4d2fefc: netbsd:VOP_STRATEGY+0x68
[ 685.0814275] 0xd4d2ffac: netbsd:vndthread+0x7d0



>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index