osxfuse / osxfuse

FUSE extends macOS by adding support for user space file systems
https://osxfuse.github.io/
Other
8.78k stars 515 forks source link

Kernel panic developing custom 9p server #713

Closed dmorn closed 3 years ago

dmorn commented 4 years ago

I'm working on a custom 9p server. Every once in a while my mac gets restarted with this error

panic(cpu 0 caller 0xffffff801ef665b1): "overflow detected"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/xnu/install/TempContent/Objects/EXPORT_HDRS/osfmk/mach/vm_param.h:387
Backtrace (CPU 0), Frame : Return Address
0xffffff8122943450 : 0xffffff801ed1f5cd 
0xffffff81229434a0 : 0xffffff801ee58b05 
0xffffff81229434e0 : 0xffffff801ee4a68e 
0xffffff8122943530 : 0xffffff801ecc5a40 
0xffffff8122943550 : 0xffffff801ed1ec97 
0xffffff8122943650 : 0xffffff801ed1f087 
0xffffff81229436a0 : 0xffffff801f4c27cc 
0xffffff8122943710 : 0xffffff801ef665b1 
0xffffff8122943840 : 0xffffff801ef69d70 
0xffffff81229438f0 : 0xffffff801ef69013 
0xffffff8122943a10 : 0xffffff801ef67119 
0xffffff8122943c20 : 0xffffff801ef66f15 
0xffffff8122943c50 : 0xffffff7fa27f444c 
0xffffff8122943d00 : 0xffffff7fa27ed28d 
0xffffff8122943d40 : 0xffffff801efb1168 
0xffffff8122943dc0 : 0xffffff801efa2271 
0xffffff8122943e20 : 0xffffff801f2a36d0 
0xffffff8122943ee0 : 0xffffff801f2a3490 
0xffffff8122943f40 : 0xffffff801f387097 
0xffffff8122943fa0 : 0xffffff801ecc6206 
      Kernel Extensions in backtrace:
         com.github.osxfuse.filesystems.osxfuse(3.11)[E8885520-BA4F-3A9F-92C5-03F90FF86802]@0xffffff7fa27e4000->0xffffff7fa27fdfff

BSD process name corresponding to current thread: main

Mac OS version:
19F101

Kernel version:
Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64
Kernel UUID: 54F1A78D-6F41-32BD-BFED-4381F9F6E2EF
Kernel slide:     0x000000001ea00000
Kernel text base: 0xffffff801ec00000
__HIB  text base: 0xffffff801eb00000
System model name: MacBookPro11,1 (Mac-189A3D4F975D5FFC)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 8858056778855
last loaded kext at 7932406935131: @filesystems.smbfs   3.4.3 (addr 0xffffff7fa2899000, size 450560)
last unloaded kext at 8411321137233: >!UAudio   323.1 (addr 0xffffff7fa2805000, size 434176)
loaded kexts:
com.github.osxfuse.filesystems.osxfuse  3.11.0
com.github.kbfuse.filesystems.kbfuse    3.10.0
com.kerio.kext.kvnetnew 9.3.0
org.virtualbox.kext.VBoxNetAdp  6.1.6
org.virtualbox.kext.VBoxNetFlt  6.1.6
org.virtualbox.kext.VBoxUSB 6.1.6
org.virtualbox.kext.VBoxDrv 6.1.6
@filesystems.smbfs  3.4.3
>usb.realtek8153patcher 5.0.0
@fileutil   20.036.15
>AudioAUUC  1.70
@filesystems.autofs 3.0
|IO!BSerialManager  7.0.5f6
>AGPM   111.4.4
>!APlatformEnabler  2.7.0d0
>X86PlatformShim    1.0.0
>!AUpstreamUserClient   3.6.8
>!AHDA  283.15
>!AGraphicsDevicePolicy 5.2.4
@AGDCPluginDisplayMetrics   5.2.4
>!AHV   1
|IOUserEthernet 1.0.1
>!A!IHD5000Graphics 14.0.6
>pmtelemetry    1
@Dont_Steal_Mac_OS_X    7.0.0
>eficheck   1
>!AThunderboltIP    3.1.4
>!A!IFramebufferAzul    14.0.6
>!ASMCLMU   212
>!ALPC  3.1
>!A!ISlowAdaptiveClocking   4.0.0
>!ACameraInterface  7.6.0
>!ABacklight    180.3
>!AMCCSControl  1.14
>!UCardReader   489.120.1
>!UTCKeyboard   255
>!UTCButtons    255
>!AVirtIO   1.0
@filesystems.hfs.kext   522.100.5
@!AFSCompression.!AFSCompressionTypeDataless    1.0.0d1
@BootCache  40
@!AFSCompression.!AFSCompressionTypeZlib    1.0.0
@filesystems.apfs   1412.120.2
>!AAHCIPort 341.0.2
@private.KextAudit  1.0
>AirPort.BrcmNIC    1400.1.1
>!ASmartBatteryManager  161.0.0
>!ARTC  2.0
>!AACPIButtons  6.1
>!AHPET 1.8
>!ASMBIOS   2.1
>!AACPIEC   6.1
>!AAPIC 1.7
$!AImage4   1
@nke.applicationfirewall    303
$TMSafetyNet    8
@!ASystemPolicy 2.0.0
|EndpointSecurity   1
>!AHIDKeyboard  209
>usb.cdc    5.0.0
|IOUSBUserClient    900.4.2
@kext.triggers  1.0
>DspFuncLib 283.15
@kext.OSvKernDSPLib 529
>!AGraphicsControl  5.2.4
|IOAVB!F    850.1
>!ASSE  1.0
|IOAccelerator!F2   438.5.4
>!AHDA!C    283.15
|IOHDA!F    283.15
@!AGPUWrangler  5.2.4
@!AGraphicsDeviceControl    5.2.4
|IOSlowAdaptiveClocking!F   1.0.0
>X86PlatformPlugin  1.0.0
>IOPlatformPlugin!F 6.0.0d8
>!ABacklightExpert  1.1.0
|IONDRVSupport  576.1
>!ASMBus!C  1.0.18d1
|IOGraphics!F   576.1
@plugin.IOgPTPPlugin    840.3
|IOEthernetAVB!C    1.1.0
|Broadcom!BHost!CUSBTransport   7.0.5f6
|IO!BHost!CUSBTransport 7.0.5f6
|IO!BHost!CTransport    7.0.5f6
|IO!B!F 7.0.5f6
|IO!BPacketLogger   7.0.5f6
>usb.!UHub  1.2
>!UMultitouch   264
>usb.IOUSBHostHIDDevice 1.2
>usb.networking 5.0.0
>usb.!UHostCompositeDevice  1.2
|IOAudio!F  300.2
@vecLib.kext    1.2.0
|IOSerial!F 11
|IOSurface  269.11
@filesystems.hfs.encodings.kext 1
|IOAHCIBlock!S  316.100.5
|IOAHCI!F   290.0.1
>!AThunderboltDPInAdapter   6.2.6
>!AThunderboltDPAdapter!F   6.2.6
>!AThunderboltPCIDownAdapter    2.5.4
>!AThunderboltNHI   5.8.6
|IOThunderbolt!F    7.6.1
|IO80211!F  1200.12.2b1
>mDNSOffloadUserClient  1.0.1b8
>corecapture    1.0.4
|IOSkywalk!F    1
>usb.!UHostPacketFilter 1.0
|IOUSB!F    900.4.2
>usb.!UXHCIPCI  1.2
>usb.!UXHCI 1.2
>!AEFINVRAM 2.1
>!AEFIRuntime   2.1
|IOSMBus!F  1.1
|IOHID!F    2.0.0
$quarantine 4
$sandbox    300.0
@kext.!AMatch   1.0.0d1
>DiskImages 493.0.0
>!AFDEKeyStore  28.30
>!AEffaceable!S 1.0
>!AKeyStore 2
>!UTDM  489.120.1
|IOSCSIBlockCommandsDevice  422.120.3
>!ACredentialManager    1.0
>KernelRelayHost    1
>!ASEPManager   1.0.1
>IOSlaveProcessor   1
|IOUSBMass!SDriver  157.121.1
|IOSCSIArchitectureModel!F  422.120.3
|IO!S!F 2.1
|IOUSBHost!F    1.2
>!UHostMergeProperties  1.2
>usb.!UCommon   1.0
>!ABusPower!C   1.0
|CoreAnalytics!F    1
>!AMobileFileIntegrity  1.0.5
@kext.CoreTrust 1
|IOTimeSync!F   840.3
|IONetworking!F 3.4
|IOReport!F 47
>!AACPIPlatform 6.1
>!ASMC  3.1.9
>watchdog   1
|IOPCI!F    2.9
|IOACPI!F   1.4
@kec.pthread    1
@kec.corecrypto 1.0
@kec.Libm   1

It might also be that this is completely my fault, as my code is responding to 9p requests. Let me know if you think this is a bug in my side or fuse's one!

osxfuse version:

 % fuse-version 
OSXFUSE.FuseVersion: 29
OSXFUSE.AgentVersion: 3.11.0
OSXFUSE.AgentName: OSXFUSE
dmorn commented 4 years ago

Darwin jecoz.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64```
bfleischer commented 4 years ago

I have not seen this issue before. Apple has not released debug symbols for this particular version of the kernel. This means I can only symbolicate the two FUSE calls in the stack. But this does not really help.

0xffffff8122943c50 : 0xffffff7fa27f444c fuse_vnop_write (in osxfuse) (fuse_vnops.c:4100)
0xffffff8122943d00 : 0xffffff7fa27ed28d fuse_biglock_vnop_write (in osxfuse) (fuse_biglock_vnops.c:727)

Can you reproduce the issue with macOS 10.15.6 and post another panic log?

What did you do to trigger the issue? Can you provide some repro steps?

bfleischer commented 3 years ago

There is nothing I can do without feedback, closed.