Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

All your general support questions for OpenZFS on OS X.

Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Postby evereasy » Wed Aug 11, 2021 8:14 am

Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Code: Select all
# sw_vers
ProductName:   macOS
ProductVersion:   11.5.1
BuildVersion:   20G80
# zpool version
zfs-macOS-2.1.0-rc3
zfs-kmod-2.1.0-rc3


The crash log can be found in the attachments.

After read the following posts,

OpenZFS on OS X • View topic - Kernel panic with 2.0.1 and Big Sur 11.4
viewtopic.php?f=26&t=3596

OpenZFS on OS X • View topic - Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11.4
viewtopic.php?f=26&t=3586

Here is what I have done to toubleshoot this issue.

1. Stop zpool import -a
Code: Select all
mv /usr/local/zfs/libexec/zfs/launchd.d/zpool-import-all.sh /usr/local/zfs/libexec/zfs/launchd.d/zpool-import-all.sh-2021-08-11

2. zpool scrub is completed without any error.
Code: Select all
# zpool import -N earth
# zpool scrub earth

3. Tested with readonly mode. It will not crash.
Code: Select all
zpool import -o readonly=on -a

4. Tested with the following nvram parameters, using 8, 80, 128, 256. It will still crash, if not using readonly mode.
Code: Select all
nvram boot-args="kernel_stack_pages=256 -v keepsyms=1"


Could you kindly help to share your suggestion on the following?
1. How to troubleshooting this issue?
2. Do you need more information?

As you may see, now I can only have read only access to my home directory (on ZFS). Hope there is a workaround for this issue.
Attachments
ZFS_Crash-2021-08-11-2236.txt
Kernel Panic Messages
(8.19 KiB) Downloaded 261 times
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Postby evereasy » Wed Aug 11, 2021 9:02 am

Not sure if this is related to setattr? Today I did change color tag of some files :-(

An issue that was reported in the past -

OpenZFS on OS X • View topic - Duplicated files become hidden in Finder
viewtopic.php?f=26&t=3519

From the call stack, (just a guess, from the name of the functions), it crashed at replaying setattr (_zfs_replay_setattr) when mounting certain file system. To be specific, I can actually mount some file systems on the same pool.

Hope this helps.

Code: Select all
Backtrace (CPU 6), Frame : Return Address
0xffffffa0d654e0f0 : 0xffffff8001c8e04d mach_kernel : _handle_debugger_trap + 0x3fd
0xffffffa0d654e140 : 0xffffff8001dd4e13 mach_kernel : _kdp_i386_trap + 0x143
0xffffffa0d654e180 : 0xffffff8001dc540a mach_kernel : _kernel_trap + 0x55a
0xffffffa0d654e1d0 : 0xffffff8001c32a2f mach_kernel : _return_from_trap + 0xff
0xffffffa0d654e1f0 : 0xffffff8001c8d86d mach_kernel : _DebuggerTrapWithState + 0xad
0xffffffa0d654e310 : 0xffffff8001c8db63 mach_kernel : _panic_trap_to_debugger + 0x273
0xffffffa0d654e380 : 0xffffff800249dc0a mach_kernel : _panic + 0x54
0xffffffa0d654e3f0 : 0xffffff8001dc57d6 mach_kernel : _sync_iss_to_iks + 0x2c6
0xffffffa0d654e570 : 0xffffff8001dc54bd mach_kernel : _kernel_trap + 0x60d
0xffffffa0d654e5c0 : 0xffffff8001c32a2f mach_kernel : _return_from_trap + 0xff
0xffffffa0d654e5e0 : 0xffffff80021e74bb mach_kernel : _kauth_cred_ismember_gid + 0x2b
0xffffffa0d654e850 : 0xffffff8002226ebf mach_kernel : _groupmember + 0x1f
0xffffffa0d654e870 : 0xffffff7f9e93b368 org.openzfsonosx.zfs : _zfs_setattr + 0x3a8
0xffffffa0d654efb0 : 0xffffff7f9e93025f org.openzfsonosx.zfs : _zfs_replay_setattr + 0x13f
0xffffffa0d654f230 : 0xffffff7f9e950484 org.openzfsonosx.zfs : _zil_replay_log_record + 0x124
0xffffffa0d654f270 : 0xffffff7f9e94dbf9 org.openzfsonosx.zfs : _zil_parse + 0x1f9
0xffffffa0d654f420 : 0xffffff7f9e95030b org.openzfsonosx.zfs : _zil_replay + 0xcb
0xffffffa0d654f480 : 0xffffff7f9e93653a org.openzfsonosx.zfs : _zfsvfs_setup + 0x16a
0xffffffa0d654f6b0 : 0xffffff7f9e933bcd org.openzfsonosx.zfs : _zfs_domount + 0x1cd
0xffffffa0d654f820 : 0xffffff7f9e93422e org.openzfsonosx.zfs : _zfs_vfs_mount + 0x4de
0xffffffa0d654f8a0 : 0xffffff8001f26a8f mach_kernel : _vnode_should_flush_after_write + 0x1a0f
0xffffffa0d654fb00 : 0xffffff8001f282e0 mach_kernel : ___mac_mount + 0x450
0xffffffa0d654ff00 : 0xffffff8001f27e7e mach_kernel : _mount + 0x4e
0xffffffa0d654ff40 : 0xffffff800234001e mach_kernel : _unix_syscall64 + 0x2ce
0xffffffa0d654ffa0 : 0xffffff8001c331f6 mach_kernel : _hndl_unix_scall64 + 0x16
      Kernel Extensions in backtrace:
         org.openzfsonosx.zfs(2.1)[175AD2FF-2BDB-3473-9548-0F5BF64465C2]@0xffffff7f9e83c000->0xffffff7f9eb3afff
            dependency: com.apple.iokit.IOStorageFamily(2.1)[6CD2A6EC-9FFC-370D-8FEE-C8016E5C6BBA]@0xffffff800486f000->0xffffff8004880fff
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Postby lundman » Thu Aug 12, 2021 12:14 am

Ah ok, passing kauth as NULL during replay isn't going to go well. I'll make some fixes.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Postby lundman » Thu Aug 12, 2021 2:09 am

Here is a PKG for Intel BigSur that hopefully fixes the panic.

md5: e7284fd7996997bbfe05aea09a38c0d6
zfs-macOS-2.1.99-95-gfcee809626

OpenZFSonOsX-2.1.99-Big.Sur-11.pkg
(16.38 MiB) Downloaded 239 times
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Postby evereasy » Thu Aug 12, 2021 2:26 am

Thank you so much for your help. It works! ;)

Code: Select all
# zpool version
zfs-macOS-2.1.99-95_gfcee809626
zfs-kmod-2.1.99-95_gfcee809626
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Kernel Panic on `zpool import` 2.1.0-rc3, Big Sur 11.5.1

Postby lundman » Thu Aug 12, 2021 2:27 am

fabulous!
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan


Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 22 guests