Bug 207619

Summary: ZFS range_tree_remove() assert causes kernel panic
Product: Base System Reporter: freebsd
Component: kernAssignee: freebsd-fs (Nobody) <fs>
Status: New ---    
Severity: Affects Only Me Keywords: crash
Priority: ---    
Version: 10.2-RELEASE   
Hardware: Any   
OS: Any   

Description freebsd 2016-03-01 13:00:20 UTC
I am getting following panic when importing a ZFS pool:

> ZFS filesystem version: 5
> ZFS storage pool version: features support (5000)
> panic: solaris assert: rs->rs_end >= end (0x232a98d9000 >= 0x232a9c16000), file: /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c, line: 262
> cpuid = 7
> KDB: stack backtrace:
> #0 0xffffffff80984e30 at kdb_backtrace+0x60
> #1 0xffffffff809489e6 at vpanic+0x126
> #2 0xffffffff809488b3 at panic+0x43
> #3 0xffffffff81c0a22f at assfail3+0x2f
> #4 0xffffffff81a76bed at range_tree_remove+0xfd
> #5 0xffffffff81a8d7b5 at space_map_load+0x375
> #6 0xffffffff81a7341e at metaslab_load+0x2e
> #7 0xffffffff81a75007 at metaslab_alloc+0x777
> #8 0xffffffff81ab53d6 at zio_dva_allocate+0x76
> #9 0xffffffff81ab27a2 at zio_execute+0x162
> #10 0xffffffff80993405 at taskqueue_run_locked+0xe5
> #11 0xffffffff80993e98 at taskqueue_thread_loop+0xa8
> #12 0xffffffff8091244a at fork_exit+0x9a
> #13 0xffffffff80d30d2e at fork_trampoline+0xe

I also tried to import it on an Arch Linux system to get to my data, but if fails there as well. For what it's worth, you can find the corresponding zfsonlinux ticket here: https://github.com/zfsonlinux/zfs/issues/4374 .
Comment 1 freebsd 2016-03-04 12:02:43 UTC
I could import with "-o readonly=on" on my Linux system. But this panics in FreeBSD. Is this another bug? I don't know a lot about the ZFS internals, but I don't think it should work on the space maps in readonly mode? .