2.2.3 KP on 10.14

Developer discussions.

2.2.3 KP on 10.14

Postby nodarkthings » Tue Jan 21, 2025 7:08 am

UPDATE: Don't bother reading what I wrote below, it's very likely that I had simply forgotten to change the partition type with gdisk when I created the pool... :oops: I probably thought it wasn't needed any more, and I stopped using slices 3 years ago... :mrgreen:
The surprising thing is that it worked perfectly in 10.14 for so long and that problems only arose after I booted 10.9.
I leave my posts as it could be instructive for someone... ;)


*********************
Hi!
After one week when everything was working ok, I had a KP today, coming back from 10.9 to 10.14.
I've tried uninstalling/reinstalling but every time I had KP after login, even with v2.2.2! :o
Currently, I have to keep OpenZFS completely uninstalled in 10.14 — while in 10.9, I have no issue... :roll:

Here's an excerpt from the KP log:
Code: Select all
Tue Jan 21 13:49:19 2025

*** Panic Report ***
panic(cpu 0 caller 0xffffff7fad212d66): VERIFY3(offset + asize <= msp->ms_start + msp->ms_size) failed (2147483648 <= 536870912)

Backtrace (CPU 0), Frame : Return Address
0xffffff9140fe3620 : 0xffffff802c3ad5cd mach_kernel : _handle_debugger_trap + 0x47d
0xffffff9140fe3670 : 0xffffff802c4e9245 mach_kernel : _kdp_i386_trap + 0x155
0xffffff9140fe36b0 : 0xffffff802c4da97a mach_kernel : _kernel_trap + 0x50a
0xffffff9140fe3720 : 0xffffff802c35a9d0 mach_kernel : _return_from_trap + 0xe0
0xffffff9140fe3740 : 0xffffff802c3acfe7 mach_kernel : _panic_trap_to_debugger + 0x197
0xffffff9140fe3860 : 0xffffff802c3ace33 mach_kernel : _panic + 0x63
0xffffff9140fe38d0 : 0xffffff7fad212d66 org.openzfsonosx.zfs : _spl_panic + 0x96
0xffffff9140fe3a50 : 0xffffff7fad2b3cb1 org.openzfsonosx.zfs : _metaslab_free_concrete + 0xb1
0xffffff9140fe3aa0 : 0xffffff7fad2b4d8a org.openzfsonosx.zfs : _metaslab_free + 0x18a
0xffffff9140fe3af0 : 0xffffff7fad34c56d org.openzfsonosx.zfs : _zio_free_sync + 0x10d
0xffffff9140fe3b30 : 0xffffff7fad34c40d org.openzfsonosx.zfs : _zio_free + 0xbd
0xffffff9140fe3b60 : 0xffffff7fad281e15 org.openzfsonosx.zfs : _dsl_dataset_block_kill + 0x195
0xffffff9140fe3bc0 : 0xffffff7fad2778e2 org.openzfsonosx.zfs : _free_blocks + 0xc2
0xffffff9140fe3c20 : 0xffffff7fad277d96 org.openzfsonosx.zfs : _free_children + 0x196
0xffffff9140fe3c90 : 0xffffff7fad277e6c org.openzfsonosx.zfs : _free_children + 0x26c
0xffffff9140fe3d00 : 0xffffff7fad277b92 org.openzfsonosx.zfs : _dnode_sync_free_range + 0x192
0xffffff9140fe3d80 : 0xffffff7fad2bd97b org.openzfsonosx.zfs : _range_tree_walk + 0x1bb
0xffffff9140fe3de0 : 0xffffff7fad2773b5 org.openzfsonosx.zfs : _dnode_sync + 0x2b5
0xffffff9140fe3e80 : 0xffffff7fad25da89 org.openzfsonosx.zfs : _sync_dnodes_task + 0x99
0xffffff9140fe3ed0 : 0xffffff7fad223dac org.openzfsonosx.zfs : _taskq_thread + 0x1bc
0xffffff9140fe3f70 : 0xffffff7fad2243a0 org.openzfsonosx.zfs : _spl_thread_setup + 0x210
0xffffff9140fe3fa0 : 0xffffff802c35a0ce mach_kernel : _call_continuation + 0x2e
      Kernel Extensions in backtrace:
         org.openzfsonosx.zfs(2.2.3)[C9650396-0D9B-3213-BEAE-42282D78F9E0]@0xffffff7fad211000->0xffffff7fad97afff
            dependency: com.apple.iokit.IOStorageFamily(2.1)[E28FB7B6-F78E-340D-91AC-7B78EC5F7D8D]@0xffffff7facc83000
Last edited by nodarkthings on Sat Jan 25, 2025 5:26 am, edited 3 times in total.
nodarkthings
 
Posts: 185
Joined: Mon Jan 26, 2015 10:32 am

Re: 2.2.3 KP on 10.14

Postby nodarkthings » Tue Jan 21, 2025 7:56 am

... I've then cleaned all caches with Mojave Cache Cleaner, then I had a KP DURING installation of v2.2.2! :o — which has been working for months with no issue before.
I've checked my RAM, just in case, apparently works ok.
I don't know what to check/try any more. :?
nodarkthings
 
Posts: 185
Joined: Mon Jan 26, 2015 10:32 am

Re: 2.2.3 KP on 10.14

Postby nodarkthings » Tue Jan 21, 2025 8:23 am

Mystery solved: my zpool has been irremediably damaged! :(
Now, any time I import it on a system with OpenZFS installed, instant KP!
I guess when it seemed to work on 10.9, it was its last breath... :mrgreen:
The boring thing is I had just installed a 25 GB virtual machine on it, with no backup yet. :cry:
nodarkthings
 
Posts: 185
Joined: Mon Jan 26, 2015 10:32 am

Re: 2.2.3 KP on 10.14

Postby nodarkthings » Tue Jan 21, 2025 1:41 pm

I had the idea to check the partition type with gdisk and noticed it had been reverted to af00 (HFS), so I changed it to bf01 (ZFS) but my hope was short: it KPed anyway when trying to import it...

Here's the result of some commands:
Code: Select all
sh-3.2# zfs get all
sh-3.2# zpool import -d /dev/disk-by-id
no pools available to import
sh-3.2# zpool import
   pool: MV
     id: 8298650122219877499
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

   MV                                            ONLINE
     media-2DB274D1-659B-4327-8418-C6128A153E6B  ONLINE


I then tried zpool import -N MV, KP again... but zpool import -N -o readonly=on -f -R /mnt -F MV worked!
Code: Select all
sh-3.2# zfs get all
NAME       PROPERTY               VALUE                   SOURCE
MV         type                   filesystem              -
MV         creation               Mer déc  4 14:34 2024  -
MV         used                   64.8G                   -
MV         available              25.3G                   -
MV         referenced             54.4G                   -
MV         compressratio          1.54x                   -
MV         mounted                no                      -
MV         quota                  none                    default
MV         reservation            none                    default
MV         recordsize             128K                    default
MV         mountpoint             /mnt/Volumes/MV         default
MV         sharenfs               off                     default
MV         checksum               on                      default
MV         compression            zstd-9                  local
MV         atime                  off                     local
MV         devices                on                      default
MV         exec                   on                      default
MV         setuid                 on                      default
MV         readonly               off                     default
MV         zoned                  off                     default
MV         snapdir                hidden                  default
MV         aclmode                discard                 default
MV         aclinherit             restricted              default
MV         createtxg              1                       -
MV         canmount               on                      default
MV         xattr                  on                      default
MV         copies                 1                       default
MV         version                5                       -
MV         utf8only               on                      -
MV         normalization          formD                   -
MV         casesensitivity        insensitive             -
MV         vscan                  off                     default
MV         nbmand                 off                     default
MV         sharesmb               off                     default
MV         refquota               none                    default
MV         refreservation         none                    default
MV         guid                   15444513684379951659    -
MV         primarycache           all                     default
MV         secondarycache         all                     default
MV         usedbysnapshots        0B                      -
MV         usedbydataset          54.4G                   -
MV         usedbychildren         10.4G                   -
MV         usedbyrefreservation   0B                      -
MV         logbias                latency                 default
MV         objsetid               54                      -
MV         dedup                  off                     default
MV         mlslabel               none                    default
MV         sync                   standard                default
MV         dnodesize              legacy                  default
MV         refcompressratio       1.59x                   -
MV         written                54.4G                   -
MV         logicalused            99.9G                   -
MV         logicalreferenced      86.2G                   -
MV         volmode                default                 default
MV         filesystem_limit       none                    default
MV         snapshot_limit         none                    default
MV         filesystem_count       none                    default
MV         snapshot_count         none                    default
MV         snapdev                hidden                  default
MV         acltype                nfsv4                   default
MV         context                none                    default
MV         fscontext              none                    default
MV         defcontext             none                    default
MV         rootcontext            none                    default
MV         relatime               on                      default
MV         redundant_metadata     all                     default
MV         overlay                on                      default
MV         encryption             off                     default
MV         keylocation            none                    default
MV         keyformat              none                    default
MV         pbkdf2iters            0                       default
MV         special_small_blocks   0                       default
MV         prefetch               all                     default
MV         com.apple.browse       off                     local
MV         com.apple.ignoreowner  on                      local
MV         com.apple.mimic        off                     local
MV         com.apple.devdisk      poolonly                default
MV/MVZVOL  type                   volume                  -
MV/MVZVOL  creation               Mar jan  7 12:45 2025   -
MV/MVZVOL  used                   10.4G                   -
MV/MVZVOL  available              25.3G                   -
MV/MVZVOL  referenced             10.4G                   -
MV/MVZVOL  compressratio          1.31x                   -
MV/MVZVOL  reservation            none                    default
MV/MVZVOL  volsize                20G                     local
MV/MVZVOL  volblocksize           16K                     default
MV/MVZVOL  checksum               on                      default
MV/MVZVOL  compression            zstd-9                  inherited from MV
MV/MVZVOL  readonly               off                     default
MV/MVZVOL  createtxg              223938                  -
MV/MVZVOL  copies                 1                       default
MV/MVZVOL  refreservation         none                    local
MV/MVZVOL  guid                   6824628946229086924     -
MV/MVZVOL  primarycache           all                     default
MV/MVZVOL  secondarycache         all                     default
MV/MVZVOL  usedbysnapshots        0B                      -
MV/MVZVOL  usedbydataset          10.4G                   -
MV/MVZVOL  usedbychildren         0B                      -
MV/MVZVOL  usedbyrefreservation   0B                      -
MV/MVZVOL  logbias                latency                 default
MV/MVZVOL  objsetid               86                      -
MV/MVZVOL  dedup                  off                     default
MV/MVZVOL  mlslabel               none                    default
MV/MVZVOL  sync                   standard                default
MV/MVZVOL  refcompressratio       1.31x                   -
MV/MVZVOL  written                10.4G                   -
MV/MVZVOL  logicalused            13.6G                   -
MV/MVZVOL  logicalreferenced      13.6G                   -
MV/MVZVOL  volmode                default                 default
MV/MVZVOL  snapshot_limit         none                    default
MV/MVZVOL  snapshot_count         none                    default
MV/MVZVOL  snapdev                hidden                  default
MV/MVZVOL  context                none                    default
MV/MVZVOL  fscontext              none                    default
MV/MVZVOL  defcontext             none                    default
MV/MVZVOL  rootcontext            none                    default
MV/MVZVOL  redundant_metadata     all                     default
MV/MVZVOL  encryption             off                     default
MV/MVZVOL  keylocation            none                    default
MV/MVZVOL  keyformat              none                    default
MV/MVZVOL  pbkdf2iters            0                       default
MV/MVZVOL  prefetch               all                     default
MV/MVZVOL  volthreading           on                      default


I found that command on a forum, but I realize that the /mnt part is not adequate for MacOS... :mrgreen: What I have done is giving it a non existing mountpoint.
Nevertheless, I tried zpool scrub MV but it doesn't seem to do anything (doesn't even comes back to the command line), and when I do zpool status in another Terminal window it gives me the result of the last scrub one month ago...
I finally succeeded accessing MV with a simple zfs mount MV, then Shift-Command-G in the Finder and /mnt/Volumes/MV. I then could recover the important data.
Disk Utility shows MVZVOL as not initialized, so I wonder if the culprit here is just the ZVOL? :? Luckily I have nothing crucial in it.
nodarkthings
 
Posts: 185
Joined: Mon Jan 26, 2015 10:32 am

Re: 2.2.3 KP on 10.14

Postby nodarkthings » Sat Jan 25, 2025 5:35 am

See the UPDATE in my first post. ;)
Conclusion: the good thing I've learnt with this misadventure is that you can recover data adding -o readonly=on when importing the pool:
Code: Select all
zpool import -N -o readonly=on -f -F MV

I'm not sure all the flags are needed, but it worked... :D
nodarkthings
 
Posts: 185
Joined: Mon Jan 26, 2015 10:32 am


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 5 guests