2.1.6 kernel panics on degraded raidz2 (also affects v2.2)

Developer discussions.

2.1.6 kernel panics on degraded raidz2 (also affects v2.2)

Postby Haravikk » Thu Jul 13, 2023 6:24 am

I'm trying to setup a four-disk raidz2 using not quite enough disks (I have two, and another two that are currently in use until I can migrate data across) so my intention was to create a raidz2 from the two disks, and two sparse files, before removing the sparse files to create an intentionally degraded (but usable) pool so I can add the other disks and resilver later to create the correct amount of redundancy.

I was able to create the pool just fine to create one that looks like:

Code: Select all
$ zpool status
  pool: zbackup
 state: ONLINE
  scan: scrub repaired 0B in 00:00:01 with 0 errors on Thu Jul 13 13:11:40 2023
config:

   NAME                                            STATE     READ WRITE CKSUM
   zbackup                                         ONLINE       0     0     0
     raidz2-0                                      ONLINE       0     0     0
       media-431C99C5-1F98-A74A-AEE9-2BC6B5B4B278  ONLINE       0     0     0
       media-639ACDB8-6F1D-BB4A-9B99-ACA606BB680E  ONLINE       0     0     0
       /Users/haravikk/Desktop/disk3.img           ONLINE       0     0     0
       /Users/haravikk/Desktop/disk4.img           ONLINE       0     0     0

errors: No known data errors


$ zpool list -v
NAME                                             SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
zbackup                                         7.27T   610K  7.27T        -         -     0%     0%  1.00x    ONLINE  -
  raidz2-0                                      7.27T   610K  7.27T        -         -     0%  0.00%      -    ONLINE
    media-431C99C5-1F98-A74A-AEE9-2BC6B5B4B278  1.82T      -      -        -         -      -      -      -    ONLINE
    media-639ACDB8-6F1D-BB4A-9B99-ACA606BB680E  1.82T      -      -        -         -      -      -      -    ONLINE
    /Users/haravikk/Desktop/disk3.img           1.82T      -      -        -         -      -      -      -    ONLINE
    /Users/haravikk/Desktop/disk4.img           1.82T      -      -        -         -      -      -      -    ONLINE


However, the moment I try to offline either of the two sparse files I get an immediate kernel panic. The command I used to offline was:

Code: Select all
$ zpool offline zbackup /Users/haravikk/Desktop/disk4.img


It doesn't matter which of the two sparse files I offline. I've also tried exporting the pool and moving a file, but I get the same result during import. It seems the moment the pool is in a degraded state a kernel panic is triggered, which doesn't bode well if I were to have an actually failed drive (it would be impossible to replace it as the kernel panic would occur before I could run zpool replace).

In case it's useful, here are the properties for the pool:

Code: Select all
$ zpool get all zbackup
NAME     PROPERTY                       VALUE                          SOURCE
zbackup  size                           7.27T                          -
zbackup  capacity                       0%                             -
zbackup  altroot                        -                              default
zbackup  health                         ONLINE                         -
zbackup  guid                           9167587832427214874            -
zbackup  version                        -                              default
zbackup  bootfs                         -                              default
zbackup  delegation                     on                             default
zbackup  autoreplace                    off                            default
zbackup  cachefile                      -                              default
zbackup  failmode                       wait                           default
zbackup  listsnapshots                  off                            default
zbackup  autoexpand                     on                             local
zbackup  dedupratio                     1.00x                          -
zbackup  free                           7.27T                          -
zbackup  allocated                      610K                           -
zbackup  readonly                       off                            -
zbackup  ashift                         9                              local
zbackup  comment                        -                              default
zbackup  expandsize                     -                              -
zbackup  freeing                        0                              -
zbackup  fragmentation                  0%                             -
zbackup  leaked                         0                              -
zbackup  multihost                      off                            default
zbackup  checkpoint                     -                              -
zbackup  load_guid                      11601007956795242925           -
zbackup  autotrim                       off                            default
zbackup  compatibility                  off                            default
zbackup  feature@async_destroy          enabled                        local
zbackup  feature@empty_bpobj            enabled                        local
zbackup  feature@lz4_compress           active                         local
zbackup  feature@multi_vdev_crash_dump  enabled                        local
zbackup  feature@spacemap_histogram     active                         local
zbackup  feature@enabled_txg            active                         local
zbackup  feature@hole_birth             active                         local
zbackup  feature@extensible_dataset     active                         local
zbackup  feature@embedded_data          active                         local
zbackup  feature@bookmarks              enabled                        local
zbackup  feature@filesystem_limits      enabled                        local
zbackup  feature@large_blocks           enabled                        local
zbackup  feature@large_dnode            enabled                        local
zbackup  feature@sha512                 enabled                        local
zbackup  feature@skein                  enabled                        local
zbackup  feature@edonr                  enabled                        local
zbackup  feature@userobj_accounting     enabled                        local
zbackup  feature@encryption             enabled                        local
zbackup  feature@project_quota          enabled                        local
zbackup  feature@device_removal         enabled                        local
zbackup  feature@obsolete_counts        enabled                        local
zbackup  feature@zpool_checkpoint       enabled                        local
zbackup  feature@spacemap_v2            active                         local
zbackup  feature@allocation_classes     enabled                        local
zbackup  feature@resilver_defer         enabled                        local
zbackup  feature@bookmark_v2            enabled                        local
zbackup  feature@redaction_bookmarks    enabled                        local
zbackup  feature@redacted_datasets      enabled                        local
zbackup  feature@bookmark_written       enabled                        local
zbackup  feature@log_spacemap           active                         local
zbackup  feature@livelist               enabled                        local
zbackup  feature@device_rebuild         enabled                        local
zbackup  feature@zstd_compress          active                         local
zbackup  feature@draid                  enabled                        local
zbackup  feature@zilsaxattr             enabled                        local
zbackup  feature@head_errlog            active                         local
zbackup  feature@blake3                 enabled                        local


And here is the command I used to create the pool:

Code: Select all
sudo zpool create -f \
-m none \
-o ashift=9 \
-o autoexpand=on \
-o feature@encryption=enabled \
-O relatime=on \
-O casesensitivity=insensitive \
-O compression=zstd \
-O dnodesize=auto \
-O normalization=formD \
-O xattr=sa \
-O com.apple.browse=off \
-O com.apple.ignoreowner=off \
-O com.apple.mimic=hfs \
-O com.apple.devdisk=on \
-O canmount=off \
-O readonly=on \
zbackup raidz2 disk3 disk4 disk3.img disk4.img


I'm attaching a zipped set of multiple kernel panics, though they look pretty much identical to my eye as someone who has no clue. ;)

I'm running ZFS v2.1.6 on macOS High Sierra on an older (2009) Mac Mini for testing, so I'm unable to test v2.1.7rc2 for comparison (as there only currently seem to be releases for Catalina and Ventura). The system is a mostly fresh install (fully updated, very little extra installed).
Attachments
panics.zip
(23.02 KiB) Downloaded 191 times
Last edited by Haravikk on Fri Dec 01, 2023 10:48 am, edited 1 time in total.
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Fri Jul 14, 2023 1:58 am

I just tried to reproduce this using a Catalina VM I already had setup with v2.1.7rc3 and the panic doesn't occur; is this an issue that has been fixed by v2.1.7 or could it be High Sierra specific?

The machine I'm trying to add the pool to is older so High Sierra is the last officially supported OS, I may try to upgrade to a newer one that's known to be stable but I was hoping to start with a fresh High Sierra install first.
Last edited by Haravikk on Sat Jul 15, 2023 4:27 am, edited 1 time in total.
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Sat Jul 15, 2023 12:39 am

Another quick update, but it seems the issue is specific to direct files; I tried using .sparseimage files instead and that worked, presumably because it meant I could use a /dev/diskN reference for the attached "device". This gets me up and running at least!
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Sat Jul 15, 2023 2:59 am

…spoke too soon, the crashes now occur when trying to create the zvol (my aim is to run Time Machine onto an HFS+ formatted zvol so that ZFS provides compression, encryption and redundancy). Here's the command I used:

Code: Select all
sudo zfs create -s -V 4T \
-o encryption=on \
-o keylocation=prompt \
-o keyformat=passphrase \
-o volblocksize=128K \
-o readonly=off \
zbackup/backup


It doesn't seem to matter if all devices (including disk images) are online or not, it crashes regardless. I'm attaching two crash-logs for that specific crash.

Is it easy to build v2.1.7rc3 for high sierra? That seems to work as expected on Catalina, so it would be good to be able to narrow this issue down either to the macOS version or the ZFS version. When I have time I'll try v2.1.6 on newer macOS versions to see if I can reproduce the issue on those.

Update: Using a virtual machine I seem to have confirmed that v2.1.6 works without crashing on Catalina, so the issue appears to be limited to High Sierra. I haven't had an opportunity to test Mojave yet.
Attachments
panics.zip
(7.71 KiB) Downloaded 188 times
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Sun Jul 16, 2023 1:39 am

So I tried setting up the required volume using a Catalina system, hoping that maybe it was only volume creation causing the panic, but unfortunately once transferred to High Sierra the panic just happens when the volume is unlocked instead. Here's what that kernel panic looks like, in case it helps to narrow it down further:

Code: Select all
Anonymous UUID:       F96632CF-5F9D-F663-CE91-E1D2CBBD3FA5

Sun Jul 16 10:29:51 2023

*** Panic Report ***
panic(cpu 1 caller 0xffffff801a18687f): Kernel trap at 0xffffff7f9d69d497, type 6=invalid opcode, registers:
CR0: 0x0000000080010033, CR2: 0x000000010364b080, CR3: 0x000000012f3b7000, CR4: 0x00000000000026e0
RAX: 0x0000000000000000, RBX: 0xffffff90b83afc00, RCX: 0xffffff90b83afc20, RDX: 0x0000000000000100
RSP: 0xffffff80b28d3338, RBP: 0xffffff80b28d3360, RSI: 0xffffff80b28d3370, RDI: 0xffffff90b83afc00
R8:  0x0000000000000000, R9:  0xffffff7f9d9faa60, R10: 0x0000000000000020, R11: 0xffffff80b28d36f8
R12: 0x0000000000000100, R13: 0xffffff90b8efbb20, R14: 0xffffff80b28d3370, R15: 0x0000000000000100
RFL: 0x0000000000010282, RIP: 0xffffff7f9d69d497, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0x000000010364b080, Error code: 0x0000000000000000, Fault CPU: 0x1, PL: 0, VF: 0

Backtrace (CPU 1), Frame : Return Address
0xffffff80b28d2e00 : 0xffffff801a06ae76
0xffffff80b28d2e50 : 0xffffff801a194484
0xffffff80b28d2e90 : 0xffffff801a186654
0xffffff80b28d2f00 : 0xffffff801a01ce60
0xffffff80b28d2f20 : 0xffffff801a06a8ec
0xffffff80b28d3050 : 0xffffff801a06a6ac
0xffffff80b28d30b0 : 0xffffff801a18687f
0xffffff80b28d3220 : 0xffffff801a01ce60
0xffffff80b28d3240 : 0xffffff7f9d69d497
0xffffff80b28d3360 : 0xffffff7f9d5bf5ed
0xffffff80b28d33b0 : 0xffffff7f9d5a9351
0xffffff80b28d3400 : 0xffffff7f9d5a903a
0xffffff80b28d3520 : 0xffffff7f9d5a6576
0xffffff80b28d35a0 : 0xffffff7f9d589631
0xffffff80b28d36c0 : 0xffffff7f9d5897d7
0xffffff80b28d3880 : 0xffffff7f9d489a78
0xffffff80b28d3980 : 0xffffff7f9d4896c7
0xffffff80b28d3a00 : 0xffffff7f9d53213f
0xffffff80b28d3a40 : 0xffffff7f9d52e4a0
0xffffff80b28d3b10 : 0xffffff7f9d56d929
0xffffff80b28d3b50 : 0xffffff801a2d63c1
0xffffff80b28d3b80 : 0xffffff801a2cbbcf
0xffffff80b28d3c00 : 0xffffff801a2be45b
0xffffff80b28d3e00 : 0xffffff801a4f4dd3
0xffffff80b28d3e30 : 0xffffff801a545cac
0xffffff80b28d3f40 : 0xffffff801a602818
0xffffff80b28d3fa0 : 0xffffff801a01d646
      Kernel Extensions in backtrace:
         org.openzfsonosx.zfs(2.1.6)[3D9FF480-30CF-38B0-AF55-0BD6BB034C5B]@0xffffff7f9d425000->0xffffff7f9db11fff
            dependency: com.apple.iokit.IOStorageFamily(2.1)[F27A8A2A-6662-3608-83BD-415037509E01]@0xffffff7f9a90f000

BSD process name corresponding to current thread: zfs

Mac OS version:
17G14042

Kernel version:
Darwin Kernel Version 17.7.0: Fri Oct 30 13:34:27 PDT 2020; root:xnu-4570.71.82.8~1/RELEASE_X86_64
Kernel UUID: 5E83A13A-32F5-3604-8591-50E2F2F70DC6
Kernel slide:     0x0000000019e00000
Kernel text base: 0xffffff801a000000
__HIB  text base: 0xffffff8019f00000
System model name: Macmini4,1 (Mac-F2208EC8)

System uptime in nanoseconds: 268925845693
last loaded kext at 104335204507: com.apple.driver.AppleHWSensor   1.9.5d0 (addr 0xffffff7f9db2a000, size 28672)
loaded kexts:
org.openzfsonosx.zfs   2.1.6
com.binaryfruit.driver.SATSMARTDriver   0.10.3
com.apple.driver.AppleHWSensor   1.9.5d0
com.apple.driver.AppleBluetoothMultitouch   92
com.apple.driver.AppleGraphicsDevicePolicy   3.20.18
com.apple.AGDCPluginDisplayMetrics   3.20.18
com.apple.driver.AppleHV   1
com.apple.iokit.IOUserEthernet   1.0.1
com.apple.driver.AudioAUUC   1.70
com.apple.iokit.IOBluetoothSerialManager   6.0.7f22
com.apple.driver.AppleUpstreamUserClient   3.6.5
com.apple.driver.AppleMikeyHIDDriver   131
com.apple.driver.pmtelemetry   1
com.apple.driver.AppleMCCSControl   1.5.5
com.apple.driver.AppleHDAHardwareConfigDriver   281.52
com.apple.driver.AppleTyMCEDriver   1.0.3d2
com.apple.driver.ApplePlatformEnabler   2.7.0d0
com.apple.driver.AGPM   110.23.37
com.apple.driver.AppleMikeyDriver   281.52
com.apple.Dont_Steal_Mac_OS_X   7.0.0
com.apple.GeForceTesla   10.0.4
com.apple.driver.AppleHDA   281.52
com.apple.driver.AirPort.Brcm4331   800.21.30
com.apple.iokit.AppleBCM5701Ethernet   10.3.1
com.apple.driver.AppleLPC   3.1
com.apple.driver.AppleOSXWatchdog   1
com.apple.iokit.IOBluetoothUSBDFU   6.0.7f22
com.apple.driver.ACPI_SMC_PlatformPlugin   1.0.0
com.apple.driver.AirPort.Brcm4360   1250.20.1a4
com.apple.driver.AppleFIVRDriver   4.1.0
com.apple.driver.AppleIntelSlowAdaptiveClocking   4.0.0
com.apple.nvidia.NVDAStartup   10.3.2
com.apple.filesystems.autofs   3.0
com.apple.driver.AppleIRController   353
com.apple.driver.CoreStorageFsck   546.50.1
com.apple.driver.AppleFileSystemDriver   3.0.1
com.apple.filesystems.hfs.kext   407.50.6
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless   1.0.0d1
com.apple.BootCache   40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib   1.0.0
com.apple.AppleSystemPolicy   1.0
com.apple.iokit.SCSITaskUserClient   404.30.3
com.apple.filesystems.apfs   748.51.0
com.apple.driver.AppleFWOHCI   5.5.9
com.apple.driver.AppleSDXC   1.7.6
com.apple.driver.AppleAHCIPort   329.50.2
com.apple.driver.AppleRTC   2.0
com.apple.driver.AppleHPET   1.8
com.apple.driver.AppleACPIButtons   6.1
com.apple.driver.AppleSMBIOS   2.1
com.apple.driver.AppleACPIEC   6.1
com.apple.driver.AppleAPIC   1.7
com.apple.driver.AppleIntelCPUPowerManagementClient   220.50.1
com.apple.nke.applicationfirewall   186
com.apple.security.TMSafetyNet   8
com.apple.security.quarantine   3
com.apple.driver.AppleIntelCPUPowerManagement   220.50.1
com.apple.driver.IOBluetoothHIDDriver   6.0.7f22
com.apple.driver.AppleMultitouchDriver   1614.1
com.apple.driver.AppleInputDeviceSupport   1614.13
com.apple.driver.AppleGraphicsControl   3.20.18
com.apple.iokit.IOAVBFamily   683.1
com.apple.plugin.IOgPTPPlugin   680.15
com.apple.driver.AppleSSE   1.0
com.apple.iokit.IOSurface   211.15
com.apple.iokit.IOSerialFamily   11
com.apple.nvidia.classic.NVDANV50HalTesla   10.0.4
com.apple.nvidia.classic.NVDAResmanTesla   10.0.4
com.apple.driver.DspFuncLib   281.52
com.apple.kext.OSvKernDSPLib   526
com.apple.driver.AppleSMBusController   1.0.18d1
com.apple.AppleGPUWrangler   3.20.18
com.apple.AppleGraphicsDeviceControl   3.20.18
com.apple.iokit.IONDRVSupport   519.21
com.apple.driver.AppleHDAController   281.52
com.apple.iokit.IOGraphicsFamily   519.23
com.apple.iokit.IOHDAFamily   281.52
com.apple.iokit.IOAudioFamily   206.5
com.apple.vecLib.kext   1.2.0
com.apple.iokit.IOEthernetAVBController   1.1.0
com.apple.iokit.IOFireWireIP   2.2.9
com.apple.driver.NVSMU   2.2.9
com.apple.driver.IOPlatformPluginLegacy   1.0.0
com.apple.driver.IOPlatformPluginFamily   6.0.0d8
com.apple.driver.AppleSMBusPCI   1.0.14d1
com.apple.iokit.IO80211Family   1200.12.2
com.apple.driver.mDNSOffloadUserClient   1.0.1b8
com.apple.driver.corecapture   1.0.4
com.apple.iokit.IOSlowAdaptiveClockingFamily   1.0.0
com.apple.kext.triggers   1.0
com.apple.driver.AppleHIDKeyboard   205.1
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport   6.0.7f22
com.apple.iokit.IOBluetoothHostControllerUSBTransport   6.0.7f22
com.apple.iokit.IOBluetoothHostControllerTransport   6.0.7f22
com.apple.iokit.IOBluetoothFamily   6.0.7f22
com.apple.driver.usb.AppleUSBHub   1.2
com.apple.driver.usb.IOUSBHostHIDDevice   1.2
com.apple.driver.usb.cdc   5.0.0
com.apple.driver.usb.networking   5.0.0
com.apple.driver.usb.AppleUSBHostCompositeDevice   1.2
com.apple.driver.CoreStorage   546.50.1
com.apple.filesystems.hfs.encodings.kext   1
com.apple.iokit.IOSCSIMultimediaCommandsDevice   404.30.3
com.apple.iokit.IOBDStorageFamily   1.8
com.apple.iokit.IODVDStorageFamily   1.8
com.apple.iokit.IOCDStorageFamily   1.8
com.apple.iokit.IOAHCISerialATAPI   267.50.1
com.apple.driver.AppleXsanScheme   3
com.apple.iokit.IOAHCIBlockStorage   301.40.2
com.apple.iokit.IOFireWireFamily   4.7.2
com.apple.driver.AppleMCP89RootPortPM   1.11
com.apple.iokit.IOAHCIFamily   288
com.apple.driver.AppleUSBMergeNub   900.4.1
com.apple.driver.usb.AppleUSBHostPacketFilter   1.0
com.apple.iokit.IOUSBFamily   900.4.1
com.apple.driver.usb.AppleUSBEHCIPCI   1.2
com.apple.driver.usb.AppleUSBOHCIPCI   1.2
com.apple.driver.usb.AppleUSBOHCI   1.2
com.apple.driver.usb.AppleUSBEHCI   1.2
com.apple.driver.AppleEFINVRAM   2.1
com.apple.driver.AppleEFIRuntime   2.1
com.apple.driver.AppleUSBHostMergeProperties   1.2
com.apple.iokit.IOSMBusFamily   1.1
com.apple.iokit.IOHIDFamily   2.0.0
com.apple.security.sandbox   300.0
com.apple.kext.AppleMatch   1.0.0d1
com.apple.driver.DiskImages   480.60.3
com.apple.driver.AppleFDEKeyStore   28.30
com.apple.driver.AppleEffaceableStorage   1.0
com.apple.driver.AppleKeyStore   2
com.apple.driver.AppleUSBTDM   439.70.3
com.apple.driver.AppleMobileFileIntegrity   1.0.5
com.apple.iokit.IOUSBMassStorageDriver   140.70.2
com.apple.iokit.IOSCSIBlockCommandsDevice   404.30.3
com.apple.iokit.IOSCSIArchitectureModelFamily   404.30.3
com.apple.iokit.IOStorageFamily   2.1
com.apple.driver.AppleCredentialManager   1.0
com.apple.driver.KernelRelayHost   1
com.apple.iokit.IOUSBHostFamily   1.2
com.apple.driver.usb.AppleUSBCommon   1.0
com.apple.driver.AppleBusPowerController   1.0
com.apple.driver.AppleSEPManager   1.0.1
com.apple.driver.IOSlaveProcessor   1
com.apple.iokit.IOTimeSyncFamily   680.15
com.apple.iokit.IONetworkingFamily   3.4
com.apple.iokit.IOReportFamily   31
com.apple.driver.AppleACPIPlatform   6.1
com.apple.driver.AppleSMC   3.1.9
com.apple.iokit.IOPCIFamily   2.9
com.apple.iokit.IOACPIFamily   1.4
com.apple.kec.pthread   1
com.apple.kec.Libm   1
com.apple.kec.corecrypto   1.0


Update: It looks like the common thread in all of these panics is that the cause is listed as an invalid opcode which is interesting; I would have thought that would make the issue hardware dependent, rather than operating system dependent? This seems like it may make the issue specific to the High Sierra release of v2.1.6, perhaps something wrong with how it was compiled?

How OS version specific are the releases anyway? Has enough changed between High Sierra and Montery/Catalina that I can't use those releases on a High Sierra system? I assume the installers won't let me but perhaps if I installed manually?
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Thu Jul 20, 2023 3:36 am

This issue also appears to affect Mojave; I managed to update the affected system to Mojave and suffered the same kernel panic when attempting to load the key for the zvol using the Mojave version of ZFS (clean install).

Unfortunately the system doesn't appear to work with Catalina, even using dosdude1's Catalina patcher; though the comparability list suggests it should work (macmini4,1) it won't startup, so using the Catalina version of ZFS isn't an option. Any ideas why only High Sierra and Mojave are affected, of the versions I can try?
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby lundman » Tue Aug 15, 2023 3:33 pm

Older versions will generally work on newer systems, I mostly just compile for a specific OS just in case it has abilities to make it run faster on that version.
We could compile the latest for Mojave if you want to try it, if we suspect a specific problem with that build?
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Wed Aug 16, 2023 2:08 am

lundman wrote:Older versions will generally work on newer systems, I mostly just compile for a specific OS just in case it has abilities to make it run faster on that version.
We could compile the latest for Mojave if you want to try it, if we suspect a specific problem with that build?

If it's possible to get a version compiled for High Sierra that would be fantastic; I was only trying Mojave because High Sierra wasn't working (High Sierra is the latest officially supported macOS for the systems I'm trying to use it with, Mojave requires patching to work though it seems stable enough). I'd rather get the systems working with High Sierra and then decide whether to run Mojave on them later.

I'm just a bit confused about how there's an invalid opcode fault if 2.1.6 was compiled for High Sierra? Is there any way to get more information about where the fault lies? To me that sounds like maybe the compilation for High Sierra is including instructions that some High Sierra capable processors don't support, or in a way that doesn't have any fallback for older systems, but it's weird that the crashes also happen in a VM, though it could be emulating the same processor.

I prefer to run ZFS with compression (zstd) and encryption enabled, and just realised I haven't tried testing with either of these disabled (will do when I find some time); are both of these now being accelerated using assembly code? If there's an easy way to turn those optimisations off I could try testing to see if they're the problem? Not sure when I'll have time, but I can also just try testing without compression or encryption to see if it still crashes or not.
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2

Postby Haravikk » Fri Dec 01, 2023 7:48 am

So I've tried this again on v2.2.0 and unfortunately this is still an issue under High Sierra; I'm attaching two new kernel panics, the first was when attempting to mount an existing degraded raidz2, and the second is after destroying that pool and attempting to a create a new basic pool (two disks, no redundancy, since my intention is to add mirrors later).

It's still the same "invalid opcode" error so some part of the code is calling something it shouldn't. Hardware I'm testing on is still on the same 2009 Mac Mini (Intel Core 2 Duo).

When I have more time I'm going to test upgrading it to a new macOS version using OpenCore Legacy Patcher, as Catalina patcher just doesn't seem to work for me, so I might as well try something newer. Not sure when I'll have time for that though as I already wasted a load of time today setting up to test.

Is there any way to disable hardware acceleration for some or all features, so I can test what might be causing this? I feel like assembly code has to be a potential culprit. Also please let me know if there's anything I can do to get better debugging information for you.
Attachments
kernel_panics.zip
(5.22 KiB) Downloaded 173 times
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Re: 2.1.6 kernel panics on degraded raidz2 (also affects v2.

Postby Haravikk » Mon Mar 04, 2024 9:38 am

Any chance of getting this fixed? There are multiple versions of OpenZFS for Mac on multiple operating systems that simply are not usable due to whatever this bug is.
Haravikk
 
Posts: 82
Joined: Tue Mar 17, 2015 4:52 am

Next

Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 92 guests