Segmentation fault exporting multiple pools

All your general support questions for OpenZFS on OS X.

Segmentation fault exporting multiple pools

Postby Jimbo » Sat Dec 10, 2022 4:52 pm

Not a biggie and I don't recall actually testing this with the 2.1.6RCs, but if I export two pools at once:
Code: Select all
% sudo zpool export Empty12 Empty8
Volume Empty12 on disk8s1 unmounted
zsh: segmentation fault  sudo zpool export Empty12 Empty8

No harm seems to be done other than the second pool not exporting. The second pool exports fine if run by itself:
Code: Select all
% sudo zpool export Empty8       
Volume Empty8 on disk9s1 unmounted

Another example:
Code: Select all
% sudo zpool export Empty8 Empty12
Volume Empty12 on disk8s1 unmounted
zsh: segmentation fault  sudo zpool export Empty8 Empty12
% sudo zpool export Empty8 Empty12
cannot open 'Empty12': no such pool
Volume Empty8 on disk9s1 unmounted

Entirely repeatable for me.
Jimbo
 
Posts: 149
Joined: Sun Sep 17, 2017 5:12 am

Re: Segmentation fault exporting multiple pools

Postby lundman » Sat Dec 10, 2022 11:52 pm

Interesting, and "zpool export -a" works?
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Segmentation fault exporting multiple pools

Postby Jimbo » Sun Dec 11, 2022 12:07 am

No, same issue:
Code: Select all
% sudo zpool import Empty8
% sudo zpool import Empty12
% sudo zpool export -a     
Volume Empty12 on disk7s1 unmounted
zsh: segmentation fault  sudo zpool export -a
% sudo zpool export -a     
Volume Empty8 on disk6s1 unmounted

I'm wondering though, if it is just this 8Tb disk, as:
Code: Select all
% sudo zpool import workroot
% sudo zpool import dataroot
% sudo zfs load-key -a && sudo zfs mount -a
2 / 2 key(s) successfully loaded
% sudo zpool export workroot dataroot     
Unmount successful for /Volumes/Data/Software
Unmount successful for /Volumes/Data/Photos
Unmount successful for /Volumes/Data/Other
Unmount successful for /Volumes/Data/Media
Unmount successful for /Volumes/Data/Amiga
Unmount successful for /Volumes/Data
Unmount successful for /Volumes/Work/VMs
Unmount successful for /Volumes/Work/Home
Unmount successful for /Volumes/Work

But these other pools are rather different (i.e. they're encrypted and on USB3 SSD, not spinning rust in a Thunderbolt enclosure).
Jimbo
 
Posts: 149
Joined: Sun Sep 17, 2017 5:12 am

Re: Segmentation fault exporting multiple pools

Postby lundman » Sun Dec 11, 2022 12:23 am

Very neat, thanks - I will give this a go.

If you are very bored, save the core file and print out the stack from it :)
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Segmentation fault exporting multiple pools

Postby Jimbo » Sun Dec 11, 2022 12:33 am

Recreating the pool doesn't seem to change anything either:
Code: Select all
% sudo zpool create -f -o ashift=12 -O compression=lz4 -O atime=off -O casesensitivity=sensitive -O normalization=formD Empty8Again disk4
% sudo zpool status -v
  pool: Empty8Again
 state: ONLINE
config:

   NAME         STATE     READ WRITE CKSUM
   Empty8Again  ONLINE       0     0     0
     disk4      ONLINE       0     0     0

errors: No known data errors
% sudo zpool export Empty8Again
Volume Empty8Again on disk6s1 unmounted
% sudo zpool import Empty8Again
% sudo zpool import Empty12   
% sudo zpool export -a         
Volume Empty12 on disk7s1 unmounted
zsh: segmentation fault  sudo zpool export -a

This is quite odd. If I export multiple pools that include this 8Tb drive (but not the 12Tb drive), it works:
Code: Select all
% sudo zpool import workroot
% sudo zpool import dataroot
% sudo zpool import Empty8Again
% sudo zfs load-key -a && sudo zfs mount -a
2 / 2 key(s) successfully loaded
% sudo zpool export -a                     
Volume Empty8Again on disk8s1 unmounted
Unmount successful for /Volumes/Data/Software
Unmount successful for /Volumes/Data/Photos
Unmount successful for /Volumes/Data/Other
Unmount successful for /Volumes/Data/Media
Unmount successful for /Volumes/Data/Amiga
Unmount successful for /Volumes/Data
Unmount successful for /Volumes/Work/VMs
Unmount successful for /Volumes/Work/Home
Unmount successful for /Volumes/Work

At the moment, it just looks like this occurs when I'm exporting multiple pools with these two empty pools imported (and I've just recreated both of them again to make sure) - 1x 8Tb drive and 1x 12Tb drive - and it always seems to be the 8Tb that fails.
Code: Select all
% sudo zpool import -a
% sudo zfs load-key -a && sudo zfs mount -a
2 / 2 key(s) successfully loaded
% sudo zpool status -v
  pool: Empty12Again
 state: ONLINE
config:

   NAME                                          STATE     READ WRITE CKSUM
   Empty12Again                                  ONLINE       0     0     0
     media-D25AF408-0EF1-D24F-BAD8-14776FE53C05  ONLINE       0     0     0

errors: No known data errors

  pool: Empty8Again
 state: ONLINE
config:

   NAME                                          STATE     READ WRITE CKSUM
   Empty8Again                                   ONLINE       0     0     0
     media-476C2969-1E77-F54F-B3D8-4008A10CF2D1  ONLINE       0     0     0

errors: No known data errors

  pool: dataroot
 state: ONLINE
  scan: scrub repaired 0B in 00:14:11 with 0 errors on Tue Nov 29 17:20:18 2022
config:

   NAME                                          STATE     READ WRITE CKSUM
   dataroot                                      ONLINE       0     0     0
     media-7D0140E7-C5A1-4543-A202-0499BE18210E  ONLINE       0     0     0

errors: No known data errors

  pool: workroot
 state: ONLINE
  scan: scrub repaired 0B in 00:16:39 with 0 errors on Tue Nov 29 17:22:51 2022
config:

   NAME                                          STATE     READ WRITE CKSUM
   workroot                                      ONLINE       0     0     0
     media-E789C13E-4845-C340-A373-50EB43B3BFD3  ONLINE       0     0     0

errors: No known data errors
% sudo zpool export -a                     
Volume Empty12Again on disk7s1 unmounted
zsh: segmentation fault  sudo zpool export -a
% sudo zpool export -a
Volume Empty8Again on disk9s1 unmounted
Unmount successful for /Volumes/Data/Software
Unmount successful for /Volumes/Data/Photos
Unmount successful for /Volumes/Data/Other
Unmount successful for /Volumes/Data/Media
Unmount successful for /Volumes/Data/Amiga
Unmount successful for /Volumes/Data
Unmount successful for /Volumes/Work/VMs
Unmount successful for /Volumes/Work/Home
Unmount successful for /Volumes/Work
Jimbo
 
Posts: 149
Joined: Sun Sep 17, 2017 5:12 am

Re: Segmentation fault exporting multiple pools

Postby Jimbo » Sun Dec 11, 2022 2:58 am

I'm happy to try and get the stack trace, but I'm at a bit of a loss as to how to go about that in Ventura.

Would this be in or from the associated *.ips file from "~/Library/Logs/DiagnosticReports"?
Jimbo
 
Posts: 149
Joined: Sun Sep 17, 2017 5:12 am

Re: Segmentation fault exporting multiple pools

Postby lundman » Mon Dec 12, 2022 12:26 am

Honestly I am not sure either, I'd run it in lldb, but that would require disabling SIP etc and a whole thing.

But yes, "ulimit -c unlimited" before should at least write a core file and maybe entry in /Library/Logs/
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Segmentation fault exporting multiple pools

Postby Jimbo » Mon Dec 12, 2022 4:29 am

I can't seem to get a core to generate - they should appear in /cores AFAICT.

The the crash report from ~/Library/Logs/DiagnosticReports is attached.
Attachments
crashreport.txt
(13.65 KiB) Downloaded 109 times
Jimbo
 
Posts: 149
Joined: Sun Sep 17, 2017 5:12 am

Re: Segmentation fault exporting multiple pools

Postby lundman » Thu Dec 15, 2022 2:03 am

ah in the unsharing code, yes, I can believe that. Thanks for reporting it.
User avatar
lundman
 
Posts: 1335
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 26 guests

cron