macos-fuse-t / fuse-t

Other
808 stars 3 forks source link

Crash after file writing using gocrypts #48

Closed libor13 closed 6 months ago

libor13 commented 6 months ago

We are using gocryptfs with fuse-t version 1.0.33 MacOS Sonoma 14.2.1 When trying to change an office document stored on a virtual disk, the process freezes and after a while crashes and restarts the entire MacOS. I am attaching the crash log:

panic(cpu 2 caller 0xfffffe0021717024): Kernel data abort. at pc 0xfffffe00241136d0, lr 0xfffffe00240f60dc (saved state: 0xfffffe5dab7dec50)
                  x0:  0x0000000000000090 x1:  0xfffffe5dab7df1b0  x2:  0xfffffe5dab7df050  x3:  0x0000000000000000
                  x4:  0xfffffe5dab7deeec x5:  0x0000000000000002  x6:  0x0000000000000023  x7:  0x0000000001000000
                  x8:  0x0000000000000000 x9:  0x0000000000000001  x10: 0x0000000000000000  x11: 0x0000000000000001
                  x12: 0x0000000000420000 x13: 0x00000000004a0000  x14: 0x00000000ffdfffff  x15: 0xfffffe0024625fc0
                  x16: 0x00000200610e553c x17: 0xfffffe29b71770a0  x18: 0x0000000000000000  x19: 0x0000000000000001
                  x20: 0xfffffe301be601a4 x21: 0xfffffe5dab7df538  x22: 0x0000000000000048  x23: 0xfffffe201fbd43f8
                  x24: 0xfffffe00204b8c70 x25: 0x0000000000000048  x26: 0xfffffe1b4f536fc0  x27: 0xfffffe1b55860090
                  x28: 0x0000000000000000 fp:  0xfffffe5dab7df520  lr:  0xfffffe00240f60dc  sp:  0xfffffe5dab7defa0
                  pc:  0xfffffe00241136d0 cpsr: 0x80401208         esr: 0x96000006          far: 0x0000000000000090

Debugger message: panic
Memory ID: 0x1
OS release type: User
OS version: 23C71
Kernel version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
Fileset Kernelcache UUID: 89516519121B13EC9D63007F55C1F1FD
Kernel UUID: 3DE22D7D-A5F5-3B17-84BD-A58164C8B09B
Boot session UUID: 32F95A15-DA66-49A1-A92E-292400BEDECE
iBoot version: iBoot-10151.61.4
secure boot?: YES
roots installed: 0
Paniclog version: 14
KernelCache slide: 0x0000000018968000
KernelCache base:  0xfffffe001f96c000
Kernel slide:      0x0000000018970000
Kernel text base:  0xfffffe001f974000
Kernel text exec slide: 0x0000000019e9c000
Kernel text exec base:  0xfffffe0020ea0000
mach_absolute_time: 0xa73bc45c
Epoch Time:        sec       usec
  Boot    : 0x659041a3 0x0000ad91
  Sleep   : 0x00000000 0x00000000
  Wake    : 0x00000000 0x00000000
  Calendar: 0x65904210 0x000981bf

Zone info:
  Zone map: 0xfffffe101e70c000 - 0xfffffe301e70c000
  . VM    : 0xfffffe101e70c000 - 0xfffffe14eb3d8000
  . RO    : 0xfffffe14eb3d8000 - 0xfffffe1684d70000
  . GEN0  : 0xfffffe1684d70000 - 0xfffffe1b51a3c000
  . GEN1  : 0xfffffe1b51a3c000 - 0xfffffe201e708000
  . GEN2  : 0xfffffe201e708000 - 0xfffffe24eb3d4000
  . GEN3  : 0xfffffe24eb3d4000 - 0xfffffe29b80a0000
  . DATA  : 0xfffffe29b80a0000 - 0xfffffe301e70c000
  Metadata: 0xfffffe4976798000 - 0xfffffe497e798000
  Bitmaps : 0xfffffe497e798000 - 0xfffffe49814d0000
  Extra   : 0 - 0

TPIDRx_ELy = {1: 0xfffffe24ea5ed828  0: 0x0000000000001002  0ro: 0x00000001dae810e0 }
CORE 0 PVH locks held: None
CORE 1 PVH locks held: None
CORE 2 PVH locks held: None
CORE 3 PVH locks held: None
CORE 4 PVH locks held: None
CORE 5 PVH locks held: None
CORE 6 PVH locks held: None
CORE 7 PVH locks held: None
CORE 8 PVH locks held: None
CORE 9 PVH locks held: None
CORE 0: PC=0x00000001900a336c, LR=0x0000000156d8f450, FP=0x000000016ff84bf0
CORE 1: PC=0x0000000102c805b4, LR=0x0000000102b511a8, FP=0x000000016f092710
CORE 2 is the one that panicked. Check the full backtrace for details.
CORE 3: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab59fef0
CORE 4: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab95fef0
CORE 5: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab6e3ef0
CORE 6: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab83fef0
CORE 7: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab857ef0
CORE 8: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab47fef0
CORE 9: PC=0xfffffe0020f34220, LR=0xfffffe0020f34220, FP=0xfffffe5dab683ef0
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space
Panicked task 0xfffffe24e9b29e18: 21357 pages, 18 threads: pid 1020: Microsoft Word
Panicked thread: 0xfffffe24ea5ed828, backtrace: 0xfffffe5dab7de380, tid: 10026
                                 lr: 0xfffffe0020ef958c  fp: 0xfffffe5dab7de410
                                 lr: 0xfffffe0021044108  fp: 0xfffffe5dab7de480
                                 lr: 0xfffffe0021042568  fp: 0xfffffe5dab7de570
                                 lr: 0xfffffe0020ea7b68  fp: 0xfffffe5dab7de580
                                 lr: 0xfffffe0020ef8e68  fp: 0xfffffe5dab7de930
                                 lr: 0xfffffe002170c548  fp: 0xfffffe5dab7de950
                                 lr: 0xfffffe0021717024  fp: 0xfffffe5dab7dead0
                                 lr: 0xfffffe0021043f64  fp: 0xfffffe5dab7deb40
                                 lr: 0xfffffe002104281c  fp: 0xfffffe5dab7dec30
                                 lr: 0xfffffe0020ea7b68  fp: 0xfffffe5dab7dec40
                                 lr: 0xfffffe00240f60dc  fp: 0xfffffe5dab7df520
                                 lr: 0xfffffe00240f6ed4  fp: 0xfffffe5dab7df5c0
                                 lr: 0xfffffe00211226f0  fp: 0xfffffe5dab7df620
                                 lr: 0xfffffe0023d64edc  fp: 0xfffffe5dab7df6a0
                                 lr: 0xfffffe0023d653f0  fp: 0xfffffe5dab7df840
                                 lr: 0xfffffe0023d668a8  fp: 0xfffffe5dab7df860
                                 lr: 0xfffffe0023d3efc8  fp: 0xfffffe5dab7dfa00
                                 lr: 0xfffffe00216ee7c8  fp: 0xfffffe5dab7dfa60
                                 lr: 0xfffffe0021118374  fp: 0xfffffe5dab7dfb30
                                 lr: 0xfffffe002110b46c  fp: 0xfffffe5dab7dfd90
                                 lr: 0xfffffe002151fb98  fp: 0xfffffe5dab7dfe20
                                 lr: 0xfffffe00210426a8  fp: 0xfffffe5dab7dff10
                                 lr: 0xfffffe0020ea7b68  fp: 0xfffffe5dab7dff20
      Kernel Extensions in backtrace:
         com.apple.security.sandbox(300.0)[17CFD554-F412-3152-AEB1-27E9E3CF96BE]@0xfffffe0023d307b0->0xfffffe0023d70173
            dependency: com.apple.driver.AppleMobileFileIntegrity(1.0.5)[16357F30-B7D9-318D-93AF-AC890264E5B9]@0xfffffe0022415b20->0xfffffe0022445cef
            dependency: com.apple.iokit.IOStorageFamily(2.1)[AAF21051-80CE-3C4D-8B6F-B91FEDD4F18B]@0xfffffe0023729db0->0xfffffe002374ba8f
            dependency: com.apple.kext.AppleMatch(1.0.0d1)[A1D6BFC9-5B95-3FE1-96BF-EF67FDEB8950]@0xfffffe00223c53a0->0xfffffe00223c768f
         com.apple.filesystems.nfs(1.0)[6C083934-2BE8-316D-A0B5-2DFB0519A4FA]@0xfffffe00240c9e60->0xfffffe002414e553
            dependency: com.apple.kec.corecrypto(14.0)[547AE918-1417-336B-8C60-BBE0B40ACEF7]@0xfffffe0024042440->0xfffffe0024092c4b
            dependency: com.apple.kext.triggers(1.0)[2A33A36D-DCAA-3A3B-9241-C507139565FE]@0xfffffe00241c9aa0->0xfffffe00241cc3af

last started kext at 795766644: com.apple.filesystems.autofs      3.0 (addr 0xfffffe0020363570, size 5912)
loaded kexts:
com.apple.filesystems.autofs      3.0
com.apple.driver.AppleTopCaseHIDEventDriver  7400.26
com.apple.driver.AppleBiometricServices             1
com.apple.driver.CoreKDL            1
com.apple.driver.DiskImages.ReadWriteDiskImage           493.0.0
com.apple.driver.DiskImages.UDIFDiskImage      493.0.0
com.apple.driver.DiskImages.RAMBackingStore 493.0.0
com.apple.driver.DiskImages.FileBackingStore    493.0.0
com.apple.driver.BCMWLANFirmware4387.Hashstore    1
com.apple.driver.AppleUSBDeviceNCM 5.0.0
com.apple.driver.AppleFileSystemDriver               3.0.1
com.apple.nke.l2tp         1.9
com.apple.filesystems.tmpfs       1
com.apple.filesystems.nfs            1
com.apple.filesystems.lifs            1
com.apple.filesystems.apfs          2235.60.6
com.apple.IOTextEncryptionFamily          1.0.0
com.apple.filesystems.hfs.kext   650.0.2
com.apple.security.BootPolicy   1
com.apple.BootCache    40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib   1.0.0
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless         1.0.0d1
com.apple.driver.SEPHibernation             1
com.apple.driver.AppleSmartBatteryManager    161.0.0
com.apple.driver.AppleThunderboltIP    4.0.3
com.apple.AppleEmbeddedSimpleSPINORFlasher            1
com.apple.driver.AppleProResHW            326.11.0
com.apple.driver.AppleJPEGDriver           6.2.2
com.apple.driver.AppleALSColorSensor  1.0.0d1
com.apple.driver.AppleAVD         737.1
com.apple.driver.AppleAVE2       703.54.1
com.apple.driver.AppleAOPVoiceTrigger               300.7
com.apple.driver.ApplePMP        1
com.apple.driver.ApplePMPFirmware     1
com.apple.driver.AppleMobileDispT600X-DCP    140.0
com.apple.driver.AppleSamsungSerial    1.0.0d1
com.apple.driver.AppleSerialShim            1
com.apple.driver.AppleMCDP29XXUpdateSupport           1
com.apple.driver.usb.AppleSynopsysUSB40XHCI               1
com.apple.driver.AppleCS42L84Audio    700.46
com.apple.driver.AppleSmartIO2              1
com.apple.driver.AppleSN012776Amp   700.46
com.apple.AGXG13X      276.58
com.apple.driver.AppleM68Buttons        1.0.0d1
com.apple.driver.AppleT6000SOCTuner 1
com.apple.driver.AppleT6000CLPCv3      1
com.apple.driver.AppleSDXC       3.4.3
com.apple.driver.AppleDPDisplayTCON  1
com.apple.driver.AppleEventLogHandler               1
com.apple.driver.AppleS5L8960XNCO    1
com.apple.driver.AppleT6000PMGR        1
com.apple.driver.AppleS8000AES             1
com.apple.driver.AppleS8000DWI            1.0.0d1
com.apple.driver.AppleInterruptControllerV2     1.0.0d1
com.apple.driver.AppleT8110DART          1
com.apple.driver.AppleBluetoothModule             1
com.apple.driver.AppleBCMWLANBusInterfacePCIe         1
com.apple.driver.AppleS5L8920XPWM  1.0.0d1
com.apple.driver.AudioDMAController-T600x     300.15
com.apple.driver.AppleT6000DART          1
com.apple.driver.AppleSPIMC    1
com.apple.driver.AppleS5L8940XI2C       1.0.0d2
com.apple.driver.AppleT6000     1
com.apple.iokit.IOUserEthernet 1.0.1
com.apple.driver.usb.AppleUSBUserHCI 1
com.apple.iokit.IOKitRegistryCompatibility          1
com.apple.iokit.EndpointSecurity             1
com.apple.driver.AppleDiskImages2        273
com.apple.AppleSystemPolicy    2.0.0
com.apple.nke.applicationfirewall            404
com.apple.kec.InvalidateHmac   1
com.apple.kec.AppleEncryptedArchive  1
com.apple.driver.driverkit.serial                6.0.0
com.apple.iokit.IOAVBFamily      1220.1
com.apple.driver.AppleHIDKeyboard       7400.2
com.apple.driver.AppleHSBluetoothDriver           7400.26
com.apple.driver.IOBluetoothHIDDriver 9.0.0
com.apple.driver.AppleActuatorDriver   7400.42
com.apple.driver.AppleMultitouchDriver              7400.42
com.apple.driver.AppleMesaSEPDriver   100.99
com.apple.iokit.IOBiometricFamily          1
com.apple.driver.DiskImages.KernelBacked         493.0.0
com.apple.driver.AppleXsanScheme        3
com.apple.driver.usb.networking             5.0.0
com.apple.nke.ppp         1.9
com.apple.driver.AppleBSDKextStarter   3
com.apple.kext.triggers 1.0
com.apple.filesystems.hfs.encodings.kext             1
com.apple.driver.AppleSyntheticGameController              11.2.3
com.apple.driver.AppleSEPHDCPManager            1.0.1
com.apple.driver.AppleTrustedAccessory              1
com.apple.iokit.AppleSEPGenericTransfer            1
com.apple.driver.AppleConvergedIPCOLYBTControl          1
com.apple.driver.AppleConvergedPCI     1
com.apple.driver.AppleBluetoothDebug 1
com.apple.driver.AppleBTM        1.0.1
com.apple.driver.IOHIDPowerSource      1
com.apple.driver.AppleCallbackPowerSource      1
com.apple.driver.AppleThunderboltUSBDownAdapter    1.0.4
com.apple.driver.AppleThunderboltPCIDownAdapter     4.1.1
com.apple.driver.AppleThunderboltDPInAdapter              8.5.1
com.apple.driver.AppleThunderboltDPAdapterFamily     8.5.1
com.apple.driver.AppleDCPDPTXProxy   1.0.0
com.apple.driver.DCPDPFamilyProxy       1
com.apple.driver.DCPAVFamilyProxy       1
com.apple.AGXFirmwareKextG13XRTBuddy        276.58
com.apple.AGXFirmwareKextRTBuddy64              276.58
com.apple.driver.AppleStockholmControl             1.0.0
com.apple.driver.AppleHIDTransportSPI 7410.1
com.apple.driver.AppleHIDTransport      7410.1
com.apple.driver.AppleInputDeviceSupport         7410.1
com.apple.driver.AppleAOPAudio             300.14
com.apple.driver.AppleSPMIPMU             1.0.1
com.apple.driver.AppleDialogPMU          1.0.1
com.apple.iokit.IOMobileGraphicsFamily-DCP    343.0.0
com.apple.iokit.IOMobileGraphicsFamily              343.0.0
com.apple.driver.AppleM2ScalerCSCDriver          265.0.0
com.apple.driver.AppleSPMI       1.0.1
com.apple.driver.AppleDiagnosticDataAccessReadOnly  1.0.0
com.apple.driver.AppleHPM       3.4.4
com.apple.driver.AppleUSBXDCIARM      1.0
com.apple.driver.AppleUSBXDCI               1.0
com.apple.iokit.IOUSBDeviceFamily        2.0.0
com.apple.driver.usb.AppleSynopsysUSBXHCI     1
com.apple.driver.usb.AppleUSBXHCI       1.2
com.apple.driver.AppleEmbeddedUSBHost          1
com.apple.driver.usb.AppleUSBHub        1.2
com.apple.driver.usb.AppleUSBHostCompositeDevice    1.2
com.apple.driver.AppleCSEmbeddedAudio          700.46
com.apple.driver.AppleT6000TypeCPhy 1
com.apple.driver.AppleT8103TypeCPhy 1
com.apple.driver.AppleDCP         1
com.apple.driver.AppleSPU         1
com.apple.driver.AppleEmbeddedAudio               700.46
com.apple.iokit.AppleARMIISAudio         300.11
com.apple.iokit.IOGPUFamily     93.10.1
com.apple.plugin.IOgPTPPlugin 1200.91
com.apple.driver.ApplePassthroughPPM               3.0
com.apple.iokit.IONVMeFamily 2.1.0
com.apple.driver.AppleNANDConfigAccess          1.0.0
com.apple.driver.AppleFirmwareKit         1
com.apple.driver.AppleSART       1
com.apple.driver.ApplePMGR     1
com.apple.driver.AppleARMWatchdogTimer       1
com.apple.driver.AppleDisplayCrossbar 1.0.0
com.apple.iokit.IODisplayPortFamily       1.0.0
com.apple.driver.AppleTypeCPhy             1
com.apple.driver.AppleThunderboltNHI 7.2.81
com.apple.driver.AppleT6000PCIeC         1
com.apple.iokit.IOThunderboltFamily     9.3.3
com.apple.iokit.IOPortFamily     1.0
com.apple.driver.ApplePIODMA                1
com.apple.driver.AppleT600xPCIe            1
com.apple.driver.AppleMultiFunctionManager   1
com.apple.driver.AppleBluetoothDebugService 1
com.apple.driver.AppleBCMWLANCore  1.0.0
com.apple.iokit.IO80211Family 1200.13.0
com.apple.driver.IOImageLoader              1.0.0
com.apple.driver.AppleOLYHAL  1
com.apple.driver.corecapture     1.0.4
com.apple.driver.AppleEmbeddedPCIE  1
com.apple.driver.AppleMCA2-T600x       800.11
com.apple.driver.AppleEmbeddedAudioLibs        300.1
com.apple.driver.AppleFirmwareUpdateKext      1
com.apple.driver.AppleH13CameraInterface       8.205.0
com.apple.driver.AppleGPIOICController               1.0.2
com.apple.driver.AppleFireStormErrorHandler   1
com.apple.driver.AppleMobileApNonce 1
com.apple.driver.usb.AppleUSBHostPacketFilter               1.0
com.apple.iokit.IOTimeSyncFamily           1200.91
com.apple.driver.DiskImages      493.0.0
com.apple.iokit.IOGraphicsFamily            598
com.apple.iokit.IOBluetoothFamily          9.0.0
com.apple.driver.AppleSSE          1.0
com.apple.driver.AppleSEPKeyStore        2
com.apple.driver.AppleUSBTDM               556
com.apple.iokit.IOUSBMassStorageDriver            243
com.apple.iokit.IOPCIFamily       2.9
com.apple.iokit.IOSCSIBlockCommandsDevice   492
com.apple.iokit.IOSCSIArchitectureModelFamily               492
com.apple.driver.AppleRSMChannel       1
com.apple.iokit.IORSMFamily     1
com.apple.driver.AppleLockdownMode 1
com.apple.driver.AppleIPAppender          1.0
com.apple.driver.AppleFDEKeyStore       28.30
com.apple.driver.AppleEffaceableStorage             1.0
com.apple.driver.AppleCredentialManager          1.0
com.apple.driver.KernelRelayHost            1
com.apple.iokit.IOUSBHostFamily            1.2
com.apple.driver.AppleUSBHostMergeProperties             1.2
com.apple.driver.usb.AppleUSBCommon              1.0
com.apple.driver.AppleSMC        3.1.9
com.apple.driver.RTBuddy           1.0.0
com.apple.driver.AppleEmbeddedTempSensor   1.0.0
com.apple.driver.AppleARMPMU             1.0
com.apple.iokit.IOAccessoryManager     1.0.0
com.apple.driver.AppleOnboardSerial    1.0
com.apple.iokit.IOSkywalkFamily              1.0
com.apple.driver.mDNSOffloadUserClient            1.0.1b8
com.apple.iokit.IONetworkingFamily      3.4
com.apple.iokit.IOSerialFamily   11
com.apple.driver.AppleSEPManager        1.0.1
com.apple.driver.AppleA7IOP     1.0.2
com.apple.driver.IOSlaveProcessor          1
com.apple.driver.AppleBiometricSensor 2
com.apple.iokit.IOHIDFamily       2.0.0
com.apple.driver.AppleANELoadBalancer             7.202.3
com.apple.driver.AppleH11ANEInterface              7.202.0
com.apple.driver.IODARTFamily 1
com.apple.AUC 1.0
com.apple.iokit.IOSurface            352.0.3
com.apple.iokit.IOAVFamily        1.0.0
com.apple.iokit.IOHDCPFamily   1.0.0
com.apple.iokit.IOCECFamily      1
com.apple.iokit.IOAudio2Family               1.0
com.apple.driver.AppleIISController        300.1
com.apple.driver.AppleAudioClockLibs   300.1
com.apple.driver.FairPlayIOKit   71.3.0
com.apple.driver.AppleARMPlatform      1.0.2
com.apple.iokit.IOSlowAdaptiveClockingFamily  1.0.0
com.apple.iokit.IOReportFamily 47
com.apple.security.quarantine   4
com.apple.security.sandbox        300.0
com.apple.iokit.IOStorageFamily              2.1
com.apple.kext.AppleMatch       1.0.0d1
com.apple.driver.AppleMobileFileIntegrity           1.0.5
com.apple.iokit.CoreAnalyticsFamily       1
com.apple.security.AppleImage4              5.0.0
com.apple.kext.CoreTrust             1
com.apple.iokit.IOCryptoAcceleratorFamily         1.0.1
com.apple.kec.pthread  1
com.apple.kec.Libm        1
com.apple.kec.Compression       1.0
com.apple.kec.corecrypto            14.0

** Stackshot Succeeded ** Bytes Traced 365925 (Uncompressed 900640) **
macos-fuse-t commented 6 months ago

Does it happen on older OSes? Do you have a reliable way to reproduce it and send me instructions? PS: It seems to be related to this https://github.com/macos-fuse-t/fuse-t/issues/45.

libor13 commented 6 months ago

I tested on MacOS Big Sur 11.7.8 now and everything seems ok.

libor13 commented 6 months ago

Instruction for reproduce crash:

Environment: MacOS Sonoma 14.2.1 (Intel processor) FUSE-T 1.0.33 gocryptfs 2.3 with forked macos-fuse-t/go-fuse

1. Create virtual disk gocryptfs -init /tmp/secure

2. Mount virtual disk gocryptfs /tmp/secure $HOME/mnt

3. Create MS Word docx document on virtual disk and work with it - save, close, open .... While saving the docx, one or more temporary folders are displayed and deleted again on virtual drive, for example with name name.docx.sb-86e266ea-2G7Zgn Randomly during working with docx computer crashes and restarts. (crash report in attachment) panic-full-2024-01-03-120833.0003.ips.zip

After restart folder /tmp/secure will disappear.

macos-fuse-t commented 6 months ago

I wasn't able to reproduce your crash by following the instructions but I encourage you to fill a bug report with apple. Mention that a crash happens when you try to save a word doc to an NFS mounted folder. Unfortunately I'm powerless to resolve such issues because it caused by a sh*tty macOS kernel code and all my previous bug reports got silently ignored.

libor13 commented 6 months ago

I installed version 1.0.34 and it seems that saving the docx file works without problems. Thanks

macos-fuse-t commented 6 months ago

I'm in doubt that 1.0.34 has any effect on this. Nevertheless closing this for now, you're welcome to re-open if needed