Page 1 of 1

Kernel Panic on Mojave with 2.0.1 (Workaround)

PostPosted: Tue Jul 27, 2021 3:22 pm
by frank
Just another me too post about kernel panics with 2.0.1 on Mojave.

Freshly booted and mounted mirrored vdev of 2 SSDs. Executing a "zpool scrub tank" gets an immediate kernel panic and reboot.

I started scrolling through the other threads here mentioning kernel panics and found the advice to set
Code: Select all
sudo nvram boot-args="kernel_stack_pages=8"

in the thread about zpool import. Gave that a try, and it appears to have worked for me™. So, I strongly suspect the new codebase has some kind of common issue that is macos-version independent.

Additionally, probably apropos of nothing related, the previous version 1.9.? of zfs I was running appeared to have a runaway thread or something. It was spinning a full cpu and heating my house -- only showing up as a "kernel_task" in my explorations :( ... That had been going on for _months_. I had no clue whatsoever that it was zfs related. I am happy to report that runaway seems to have been vanquished upon installation of 2.0.1. Thank You!!!

Re: Kernel Panic on Mojave with 2.0.1 (Workaround)

PostPosted: Tue Jul 27, 2021 3:56 pm
by lundman
Yep, it goes too deep into the stack and exhausts the 16KB stacks that XNU has.
This can happen at scrub/resilver in particular, and zvol read/writes.

The 2.1rc has started to address these issues by making the stacks leaner, and
the upcoming 2.1 (release or rc3) has found a permanent fix, where we detect
that the stack is about to run out, we split the task into a new thread (hence new
stack) to complete it.

Re: Kernel Panic on Mojave with 2.0.1 (Workaround)

PostPosted: Sat Aug 14, 2021 6:29 am
by fissionfan
Just ran into this- is it safe to use the Catalina 2.1.0rc4 installer for Mojave?
--update- nope 10.15 min required...
--tried compiling...make install for spl and zfs appeared to work but running zpool afterwards failed... so reverted back to 1.9.4

Can I request a rc4 installer for Mojave?

Thanks for all your work on this!

Re: Kernel Panic on Mojave with 2.0.1 (Workaround)

PostPosted: Sat Aug 14, 2021 5:48 pm
by lundman
Mojave uploaded.

Re: Kernel Panic on Mojave with 2.0.1 (Workaround)

PostPosted: Sat Aug 14, 2021 7:22 pm
by fissionfan
Thank you!! :D :D
happily scrubbing right now!