NetBSD-Bugs archive

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

kern/54219: zpool create pool dk5 causes kernel panic



>Number:         54219
>Category:       kern
>Synopsis:       zpool create pool dk5 causes kernel panic
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 19 18:20:00 +0000 2019
>Originator:     matt farnsworth
>Release:        8,0
>Organization:
>Environment:
virtual box
>Description:
panic: vrelel: bad ref count
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip 0xfffffffff8021fe95 cs 0x8 rflags 0x246 cr2 0x7f7fffb90a88 ilevel 0 rsp 0xffff8000693a4d20
curlwp 0xfffffe811e9a05c0 pid 0.182 lowest kstack 0xffff8000693a22c0
stopped in pid 0.182 (system) at netbsd:breakpoint+0x5: leave
kdb
vpanic
vcache_reclaim()
vcache_dealloc()
vdev_disk_open() at zfs:vdev_disk_open
vdev_open() at zfs:vdev_open
vdev_open_child() at zfs:vdev_open_child
taskq_thread at solaris:taskq_thread
>How-To-Repeat:
# freebsd zfs book recommends building VDEVS from partitiions
# netbsd does not have /dev/gpt, therefore no /dev/gpt/zfs1
gpt add -s 2g -l gpt_zfs1 -t fbsd_zfs wd1
# responds type not recognized ? maybe need to register nbsd_zfs uuid?
gpt show wd1
# ok. shows freeBSD zfs part
dkctl wd1 listwedges
# ok. dk5
zpool create pool /dev/dk5
# note: do not have gpt/zfs1 as in freebsd
panic
# also
zpool create pool mirror /dev/dk5 /dev/dk6
panic

>Fix:
I have not looked at the source code for this.
I don't really understand wedges (I haven't used netbsd for 10 years).
It seems strange that open would call dealloc, maybe its a test to reassign the wedge (it wasn't mounted, but maybe it was released before this taskq_thread?)
Maybe zpool should reject wedges (dk*) as block devices?
Maybe zfs.kmod should not use vcache calls for dk devices?
#
I tried using an alternate spec.
> zpool create pool wd1a
This succeeded without error and 
> zpool list 
shows the pool now exists, but
> zpool destroy pool
removes the partition too (gpt show wd1)
and corrupts the gpt label
> gpt add ...
# invalid label
I guess dual booting with freebsd would be a bad idea, but it looks like its very difficult with gpt anyway.



Home | Main Index | Thread Index | Old Index