openzfsonosx / zfs

OpenZFS on OS X

Home Page:https://openzfsonosx.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kernel panic on import 1.9.2

JMoVS opened this issue · comments

commented

I recently ran

sudo zpool import -a

and was greeted with the following kernel panic:

panic(cpu 0 caller 0xffffff7f8728a6c9): avl_find() succeeded inside avl_add()
Backtrace (CPU 0), Frame : Return Address
0xffffff9125ba3680 : 0xffffff8003bad6ed mach_kernel : _handle_debugger_trap + 0x47d
0xffffff9125ba36d0 : 0xffffff8003ce9185 mach_kernel : _kdp_i386_trap + 0x155
0xffffff9125ba3710 : 0xffffff8003cda8ba mach_kernel : _kernel_trap + 0x50a
0xffffff9125ba3780 : 0xffffff8003b5ab40 mach_kernel : _return_from_trap + 0xe0
0xffffff9125ba37a0 : 0xffffff8003bad107 mach_kernel : _panic_trap_to_debugger + 0x197
0xffffff9125ba38c0 : 0xffffff8003bacf53 mach_kernel : _panic + 0x63
0xffffff9125ba3930 : 0xffffff7f8728a6c9 net.lundman.spl : _avl_add + 0x79
0xffffff9125ba3970 : 0xffffff7f88afd2f8 net.lundman.zfs : _spa_add + 0x298
0xffffff9125ba39c0 : 0xffffff7f88af0e9c net.lundman.zfs : _spa_tryimport + 0x6c
0xffffff9125ba3a30 : 0xffffff7f88b47d2f net.lundman.zfs : _zfs_ioc_pool_tryimport + 0x9f
0xffffff9125ba3a70 : 0xffffff7f88b4cf52 net.lundman.zfs : _zfsdev_ioctl + 0x6e2
0xffffff9125ba3b40 : 0xffffff8003e3a163 mach_kernel : _spec_ioctl + 0xb3
0xffffff9125ba3b80 : 0xffffff8003e2e8df mach_kernel : _VNOP_IOCTL + 0xbf
0xffffff9125ba3c00 : 0xffffff8003e20544 mach_kernel : _utf8_normalizestr + 0xd34
0xffffff9125ba3e00 : 0xffffff800409b68b mach_kernel : _fo_ioctl + 0x7b
0xffffff9125ba3e30 : 0xffffff80040f1839 mach_kernel : _ioctl + 0x529
0xffffff9125ba3f40 : 0xffffff80041b92ad mach_kernel : _unix_syscall64 + 0x27d
0xffffff9125ba3fa0 : 0xffffff8003b5b306 mach_kernel : _hndl_unix_scall64 + 0x16
      Kernel Extensions in backtrace:
         net.lundman.spl(1.9.2)[626D2241-6E13-331A-8E57-B29C1BD0280C]@0xffffff7f87289000->0xffffff7f88482fff
         net.lundman.zfs(1.9.2)[75F2D58B-13D6-3961-A964-8CB82681547D]@0xffffff7f88a77000->0xffffff7f88e61fff
            dependency: com.apple.iokit.IOStorageFamily(2.1)[71BB22B0-3075-35A1-B04E-FBAC574DA80D]@0xffffff7f84d01000
            dependency: net.lundman.spl(1.9.2)[626D2241-6E13-331A-8E57-B29C1BD0280C]@0xffffff7f87289000
commented

and another one of those I think:

*** Panic Report ***
panic(cpu 2 caller 0xffffff7f9e92f6c9): avl_find() succeeded inside avl_add()
Backtrace (CPU 2), Frame : Return Address
0xffffff91787bb680 : 0xffffff801b5ad6ed mach_kernel : _handle_debugger_trap + 0x47d
0xffffff91787bb6d0 : 0xffffff801b6e9185 mach_kernel : _kdp_i386_trap + 0x155
0xffffff91787bb710 : 0xffffff801b6da8ba mach_kernel : _kernel_trap + 0x50a
0xffffff91787bb780 : 0xffffff801b55ab40 mach_kernel : _return_from_trap + 0xe0
0xffffff91787bb7a0 : 0xffffff801b5ad107 mach_kernel : _panic_trap_to_debugger + 0x197
0xffffff91787bb8c0 : 0xffffff801b5acf53 mach_kernel : _panic + 0x63
0xffffff91787bb930 : 0xffffff7f9e92f6c9 net.lundman.spl : _avl_add + 0x79
0xffffff91787bb970 : 0xffffff7f9fbae2f8 net.lundman.zfs : _spa_add + 0x298
0xffffff91787bb9c0 : 0xffffff7f9fba1e9c net.lundman.zfs : _spa_tryimport + 0x6c
0xffffff91787bba30 : 0xffffff7f9fbf8d2f net.lundman.zfs : _zfs_ioc_pool_tryimport + 0x9f
0xffffff91787bba70 : 0xffffff7f9fbfdf52 net.lundman.zfs : _zfsdev_ioctl + 0x6e2
0xffffff91787bbb40 : 0xffffff801b83a163 mach_kernel : _spec_ioctl + 0xb3
0xffffff91787bbb80 : 0xffffff801b82e8df mach_kernel : _VNOP_IOCTL + 0xbf
0xffffff91787bbc00 : 0xffffff801b820544 mach_kernel : _utf8_normalizestr + 0xd34
0xffffff91787bbe00 : 0xffffff801ba9b68b mach_kernel : _fo_ioctl + 0x7b
0xffffff91787bbe30 : 0xffffff801baf1839 mach_kernel : _ioctl + 0x529
0xffffff91787bbf40 : 0xffffff801bbb92ad mach_kernel : _unix_syscall64 + 0x27d
0xffffff91787bbfa0 : 0xffffff801b55b306 mach_kernel : _hndl_unix_scall64 + 0x16
      Kernel Extensions in backtrace:
         net.lundman.spl(1.9.2)[626D2241-6E13-331A-8E57-B29C1BD0280C]@0xffffff7f9e92e000->0xffffff7f9fb27fff
         net.lundman.zfs(1.9.2)[75F2D58B-13D6-3961-A964-8CB82681547D]@0xffffff7f9fb28000->0xffffff7f9ff13fff
            dependency: com.apple.iokit.IOStorageFamily(2.1)[71BB22B0-3075-35A1-B04E-FBAC574DA80D]@0xffffff7f9c708000
            dependency: net.lundman.spl(1.9.2)[626D2241-6E13-331A-8E57-B29C1BD0280C]@0xffffff7f9e92e000

I started experiencing this after installing the second supplemental update for 10.14.6. I don't know if the timing was coincidental. There is a change to IOStorageFamily.kext in that update, but your report came well before its release (on August 26th).

Have you had any luck finding a fix or workaround?

commented

this kernel panic only happens for me if there are 2 imports going on of the same pool at the same time I think.

Mine is likely a different issue. I believe it happened on any import. It's working again after rolling back to 10.14.6 before the second supplemental update. I didn't have keepsyms enabled on during the panics, but when I have time I'll try to reproduce with symbols and open a separate issue if it is indeed different than this.

In case it helps, I'm noticing with v1.9.2 that if I do a force export on a pool and then an import, the machine always panics. MacOS 10.13.6

It wouldn't be too shocking if forced has issues, that path is tricky, and could definitely do with a overhaul.

The avl_add() panics have been fixed in master. A work around for people experiencing this panic is to not import the same pool multiple times simultaneously. Ie, if you use ZetaWatch and zpool-import-all, comment one of them out.

commented

what is the ZVOL problem that has been reintroduced by this fix? What to be aware of?