Reproducible kernel panic in zfs-macOS-2.0.1-1

All your general support questions for OpenZFS on OS X.

Reproducible kernel panic in zfs-macOS-2.0.1-1

Postby CharlesS » Sat Jun 05, 2021 7:29 pm

Code: Select all
Three steps to quickly KP a Mac (in my case, a MacBookPro16,1) running Big Sur 11.4 with ZFS 2.0.1 installed (and compression set to zstd, in case that is relevant):

1. Create a file on your Desktop, named

Code: Select all
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSÜ

(note the umlaut at the end)

2. Copy this file onto a ZFS volume using the /bin/cp command.

3. There is no step three.

The issue is caused by an incorrect implementation at the FS driver layer; the OS expects to be able to write files with a maximum of 256 UTF-16 code units, whereas the OpenZFS driver for macOS in its current implementation only allows 256-bytes of UTF-8, and these don't always line up. In the past, this caused the file copy operation to fail with an error; now, it crashes the entire OS (at least on my machine). I hope that this isn't the result of something like a buffer overflow inside of kernel driver code. :?

Incidentally, I reported this issue six years ago, and received a fair amount of abuse for it. That appears to have since been edited out from the thread, but the issue is still closed.
CharlesS
 
Posts: 8
Joined: Sun Apr 13, 2014 2:45 pm

Re: Reproducible kernel panic in zfs-macOS-2.0.1-1

Postby jawbroken » Sun Jun 06, 2021 4:52 am

You received abuse for reporting a bug? Feels like there has to be more to that story.
jawbroken
 
Posts: 23
Joined: Wed Apr 01, 2015 4:46 am

Re: Reproducible kernel panic in zfs-macOS-2.0.1-1

Postby CharlesS » Sun Jun 06, 2021 8:04 am

jawbroken wrote:You received abuse for reporting a bug? Feels like there has to be more to that story.

In 2015, there was a distinct sense that a certain member tended to take bug reports as some sort of personal attack against the project. This one had a bunch of "just don't have a file that long!" (this file is autogenerated by code I don't control) and "just use HFS+ on top of a ZVOL!" (I think I'd rather just use APFS at that point...), referring to the bug report as "nonsense", etc. At some point I mentioned that fixing issues like this was just generally a good idea for ensuring overall stability, and got a reply starting with "Because you are so utterly persuasive, and because your suggestion that O3X is unstable was so ingratiating, against all good sense, I did more research, and..."

Anyway I probably shouldn't have brought that bit up, and apologize for it; it was six years ago, and I don't know if the user in question is even active here anymore. I was just feeling a little bitter, since this, and other similar incidents, are why I kinda quit using ZFS much until noticing that v2 came out and deciding to give it another try.

Anyway, this is a bug, IMO it's fairly serious, and it should probably be fixed. I'm willing to send logs privately, if it will help.
CharlesS
 
Posts: 8
Joined: Sun Apr 13, 2014 2:45 pm

Re: Reproducible kernel panic in zfs-macOS-2.0.1-1

Postby Wowfunhappy » Sun Jun 06, 2021 4:21 pm

Interestingly, on 1.9.2 cp tells me "operation not supported" when I try to move the file, so this issue was reintroduced recently, it was fixed at some point! :)
Wowfunhappy
 
Posts: 33
Joined: Sat Jul 21, 2018 11:58 am

Re: Reproducible kernel panic in zfs-macOS-2.0.1-1

Postby lundman » Wed Jun 09, 2021 1:01 pm

Thanks for adding it to the issue tracker, gives me something to work on directly. Can't speak for others, but my todo is long, but I'll get to it eventually
User avatar
lundman
 
Posts: 1030
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan


Return to General Help

Who is online

Users browsing this forum: No registered users and 4 guests

cron