Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11.4

All your general support questions for OpenZFS on OS X.

Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11.4

Postby jordancurve » Sun Jun 06, 2021 7:44 pm

I get a panic with 2.0.1 and Big Sur 11.4 on an Intel iMac (Retina 5K, 27-inch, Late 2014) as soon as I run `zpool import -a`. Panic log: https://pastebin.com/LY4LcQqb . I reported this on IRC, and people suggested I try `zpool import -o readonly=on -a`. That doesn't panic, and it gives me readonly access to my data, which is nice.
User avatar
jordancurve
 
Posts: 19
Joined: Sun Jun 06, 2021 4:19 pm

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby jordancurve » Fri Jun 18, 2021 5:22 pm

Planning to downgrade to Catalina to see if that helps.
User avatar
jordancurve
 
Posts: 19
Joined: Sun Jun 06, 2021 4:19 pm

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby lundman » Mon Jun 21, 2021 3:58 pm

This is the scrub process that is going too deep into the stack space and overflowing. Readonly disables scrubs, and you can probably stop scrubs with one of the sysctls.

We will try to figure out how to make the stack smaller
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby lundman » Mon Jun 21, 2021 4:34 pm

As a quick fix, how difficult would it be for you to double the kernel stack space and try?

The default is "4" so

sudo nvram boot-args="kernel_stack_pages=8"

But check what the value of "boot-args" is first, and append the new option.

If that is beyond your comfort zone, then just leave it.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby jordancurve » Mon Jun 21, 2021 5:10 pm

Setting kernel_stack_pages=8 appears to completely fix the issue! I rebooted, ran `zpool import -a`, and I now I seem to have read/write access to my datasets. `zpool status` shows that it's currently scrubbing:

Code: Select all
 state: ONLINE
status: Some supported and requested features are not enabled on the pool.
   The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
   the pool may no longer be accessible by software that does not support
   the features. See zpool-features(5) for details.
  scan: scrub in progress since Sun Jun  6 18:27:14 2021
   629G scanned at 2.78G/s, 10.6G issued at 47.9M/s, 894G total
   0B repaired, 1.18% done, 05:14:47 to go


My current boot-args are: "kernel_stack_pages=8 -v keepsyms=1"
Last edited by jordancurve on Mon Jun 21, 2021 7:46 pm, edited 1 time in total.
User avatar
jordancurve
 
Posts: 19
Joined: Sun Jun 06, 2021 4:19 pm

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby lundman » Mon Jun 21, 2021 6:52 pm

Ace, thanks for confirming the problem for us. If you can, keep it using large stacks until we can address the issue.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby lundman » Mon Jun 21, 2021 6:54 pm

Oh actually, can you show:

sysctl kern.stack_depth_max

Be curious how large it got.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Kernel Panic on `zpool import` with 2.0.1 and Big Sur 11

Postby jordancurve » Mon Jun 21, 2021 7:45 pm

Thanks for finding this workaround. I'll happily keep my stack depth at 8 as long as necessary.

Code: Select all
$ sysctl kern.stack_depth_max
kern.stack_depth_max: 22368


The scrub finished so I guess that's as deep as it got.
User avatar
jordancurve
 
Posts: 19
Joined: Sun Jun 06, 2021 4:19 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 23 guests