keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.92k stars 1.23k forks source link

Kernel Panics on High Sierra #9091

Open ngocphamm opened 7 years ago

ngocphamm commented 7 years ago

I'm not 100% sure if Keybase is responsible for the panics, but I see this line in all 4 kernel panics I got since late September (process name can be either kbfs or keybase. The kernel panics happened when I woke the computer up after the nights.

BSD process name corresponding to current thread: kbfs

Below is the detail of the latest panic dump


Tue Oct 17 08:21:11 2017

*** Panic Report ***
panic(cpu 2 caller 0xffffff802dd94512): assertion failed: ifp->if_sndbyte_total >= len, file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4570.1.46/bsd/netinet/in_pcb.c, line: 3608
Backtrace (CPU 2), Frame : Return Address
0xffffff81377eba10 : 0xffffff802d86d366 
0xffffff81377eba50 : 0xffffff802d998494 
0xffffff81377eba90 : 0xffffff802d98a429 
0xffffff81377ebb10 : 0xffffff802d81f190 
0xffffff81377ebb30 : 0xffffff802d86cd8c 
0xffffff81377ebc60 : 0xffffff802d86cafc 
0xffffff81377ebcc0 : 0xffffff802dd94512 
0xffffff81377ebce0 : 0xffffff802dd93f9c 
0xffffff81377ebd30 : 0xffffff802dd938e8 
0xffffff81377ebd70 : 0xffffff802dd8484f 
0xffffff81377ebd90 : 0xffffff802dd8452a 
0xffffff81377ebdc0 : 0xffffff802dd87262 
0xffffff81377ebe10 : 0xffffff802dd87613 
0xffffff81377ebe30 : 0xffffff802dd060b3 
0xffffff81377ebea0 : 0xffffff802dd05d44 
0xffffff81377ebf00 : 0xffffff802dd0a644 
0xffffff81377ebf40 : 0xffffff802de0e548 
0xffffff81377ebfa0 : 0xffffff802d81f976 

BSD process name corresponding to current thread: kbfs

Mac OS version:
17A405

Kernel version:
Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64
Kernel UUID: B84FDEFC-9081-35CE-8C51-25A9583AACDE
Kernel slide:     0x000000002d600000
Kernel text base: 0xffffff802d800000
__HIB  text base: 0xffffff802d700000
System model name: MacBookPro10,2 (Mac-AFD8A9D944EA4843)

System uptime in nanoseconds: 66902429906598
last loaded kext at 66899852434920: com.logitech.driver.LogiWheelDriver 1 (addr 0xffffff7fb0ce5000, size 53248)
last unloaded kext at 48941039030118: com.apple.driver.AppleThunderboltPCIUpAdapter 2.1.3 (addr 0xffffff7fb0605000, size 53248)
loaded kexts:
com.logitech.driver.LogiWheelDriver 1
org.virtualbox.kext.VBoxNetAdp  5.1.28
org.virtualbox.kext.VBoxNetFlt  5.1.28
org.virtualbox.kext.VBoxUSB 5.1.28
org.virtualbox.kext.VBoxDrv 5.1.28
com.orderedbytes.driver.ControllerMateFamily    4.6.0
com.globaldelight.driver.Boom2Device    1.1
com.driver.LogJoystick  2.0
com.orderedbytes.driver.CMUSBDevices    4.6.0
at.obdev.nke.LittleSnitch   5094
com.logitech.manager.kernel.driver  6.70.1
com.apple.filesystems.smbfs 3.2
com.apple.driver.AGPM   110.23.24
com.apple.driver.ApplePlatformEnabler   2.7.0d0
com.apple.driver.X86PlatformShim    1.0.0
com.apple.filesystems.autofs    3.0
com.apple.driver.AppleMikeyHIDDriver    131
com.apple.driver.AudioAUUC  1.70
com.apple.driver.AppleGraphicsDevicePolicy  3.16.19
com.apple.AGDCPluginDisplayMetrics  3.16.19
com.apple.driver.AppleHV    1
com.apple.iokit.IOUserEthernet  1.0.1
com.apple.driver.AppleHDA   280.12
com.apple.driver.AppleUpstreamUserClient    3.6.4
com.apple.driver.AppleMikeyDriver   280.12
com.apple.iokit.IOBluetoothSerialManager    6.0.0f7
com.apple.driver.pmtelemetry    1
com.apple.Dont_Steal_Mac_OS_X   7.0.0
com.apple.driver.AppleIntelHD4000Graphics   10.2.8
com.apple.driver.eficheck   1
com.apple.AVEBridge 1.0.0
com.apple.driver.AppleThunderboltIP 3.1.0
com.apple.driver.SMCMotionSensor    3.0.4d1
com.apple.driver.AppleLPC   3.1
com.apple.driver.AppleIntelSlowAdaptiveClocking 4.0.0
com.apple.driver.AppleSMCLMU    211
com.apple.driver.AppleOSXWatchdog   1
com.apple.driver.AppleIntelFramebufferCapri 10.2.8
com.apple.driver.AppleSMCPDRC   1.0.0
com.apple.driver.AppleBacklight 170.10.1
com.apple.driver.AppleMCCSControl   1.5.3
com.apple.driver.AppleUSBTCButtons  254
com.apple.driver.AppleUSBTCKeyboard 254
com.apple.filesystems.apfs  748.1.47
com.apple.filesystems.hfs.kext  407.1.3
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.BootCache 40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0
com.apple.iokit.AppleBCM5701Ethernet    10.3.1
com.apple.driver.AirPort.Brcm4360   1200.15.1a3
com.apple.driver.AppleSDXC  1.7.6
com.apple.driver.AppleAHCIPort  329
com.apple.driver.AppleSmartBatteryManager   161.0.0
com.apple.driver.AppleRTC   2.0
com.apple.driver.AppleACPIButtons   6.1
com.apple.driver.AppleHPET  1.8
com.apple.driver.AppleSMBIOS    2.1
com.apple.driver.AppleACPIEC    6.1
com.apple.driver.AppleAPIC  1.7
com.apple.driver.AppleIntelCPUPowerManagementClient 220.0.0
com.apple.nke.applicationfirewall   183
com.apple.security.TMSafetyNet  8
com.apple.security.quarantine   3
com.apple.IOBufferCopyEngineTest    1
com.apple.driver.AppleIntelCPUPowerManagement   220.0.0
com.apple.driver.usb.cdc    5.0.0
com.apple.driver.AppleThunderboltPCIUpAdapter   2.1.3
com.apple.iokit.IOUSBUserClient 900.4.1
com.apple.kext.triggers 1.0
com.apple.iokit.IOTimeSyncFamily    600.15
com.apple.driver.AppleSSE   1.0
com.apple.driver.DspFuncLib 280.12
com.apple.kext.OSvKernDSPLib    526
com.apple.iokit.IOSerialFamily  11
com.apple.AppleGPUWrangler  3.16.19
com.apple.iokit.IOSlowAdaptiveClockingFamily    1.0.0
com.apple.driver.AppleHDAController 280.12
com.apple.iokit.IOHDAFamily 280.12
com.apple.iokit.IOAudioFamily   206.5
com.apple.vecLib.kext   1.2.0
com.apple.driver.AppleGraphicsControl   3.16.19
com.apple.driver.AppleSMBusPCI  1.0.14d1
com.apple.iokit.IOAcceleratorFamily2    373
com.apple.iokit.IOSurface   209
com.apple.driver.X86PlatformPlugin  1.0.0
com.apple.driver.IOPlatformPluginFamily 6.0.0d8
com.apple.AppleGraphicsDeviceControl    3.16.19
com.apple.driver.AppleBacklightExpert   1.1.0
com.apple.iokit.IONDRVSupport   517.17
com.apple.driver.AppleSMBusController   1.0.18d1
com.apple.iokit.IOGraphicsFamily    517.17
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 6.0.0f7
com.apple.iokit.IOBluetoothHostControllerUSBTransport   6.0.0f7
com.apple.iokit.IOBluetoothHostControllerTransport  6.0.0f7
com.apple.driver.AppleHIDKeyboard   203
com.apple.driver.AppleUSBMultitouch 261
com.apple.driver.usb.IOUSBHostHIDDevice 1.2
com.apple.driver.usb.networking 5.0.0
com.apple.driver.usb.AppleUSBHostCompositeDevice    1.2
com.apple.driver.usb.AppleUSBHub    1.2
com.apple.driver.AppleThunderboltDPInAdapter    5.0.2
com.apple.driver.AppleThunderboltDPAdapterFamily    5.0.2
com.apple.driver.AppleThunderboltPCIDownAdapter 2.1.3
com.apple.driver.AppleEffaceableStorage 1.0
com.apple.filesystems.hfs.encodings.kext    1
com.apple.iokit.IOEthernetAVBController 1.1.0
com.apple.driver.AppleThunderboltNHI    4.5.6
com.apple.iokit.IOThunderboltFamily 6.5.8
com.apple.iokit.IOAHCIBlockStorage  301.1.2
com.apple.iokit.IO80211Family   1200.12.2
com.apple.driver.mDNSOffloadUserClient  1.0.1b8
com.apple.iokit.IONetworkingFamily  3.3
com.apple.driver.corecapture    1.0.4
com.apple.iokit.IOAHCIFamily    288
com.apple.driver.usb.AppleUSBXHCIPCI    1.2
com.apple.driver.usb.AppleUSBXHCI   1.2
com.apple.driver.usb.AppleUSBEHCIPCI    1.2
com.apple.driver.usb.AppleUSBEHCI   1.2
com.apple.driver.usb.AppleUSBHostPacketFilter   1.0
com.apple.driver.AppleUSBHostMergeProperties    1.2
com.apple.driver.AppleEFINVRAM  2.1
com.apple.driver.AppleEFIRuntime    2.1
com.apple.iokit.IOSMBusFamily   1.1
com.apple.security.sandbox  300.0
com.apple.kext.AppleMatch   1.0.0d1
com.apple.iokit.IOBufferCopyEngineFamily    1
com.apple.driver.DiskImages 480.1.2
com.apple.driver.AppleKeyStore  2
com.apple.driver.AppleUSBTDM    439
com.apple.driver.AppleMobileFileIntegrity   1.0.5
com.apple.iokit.IOUSBMassStorageDriver  140
com.apple.iokit.IOSCSIBlockCommandsDevice   404
com.apple.iokit.IOSCSIArchitectureModelFamily   404
com.apple.iokit.IOStorageFamily 2.1
com.apple.driver.AppleCredentialManager 1.0
com.apple.driver.KernelRelayHost    1
com.apple.driver.AppleSEPManager    1.0.1
com.apple.driver.IOSlaveProcessor   1
com.apple.driver.IOBluetoothHIDDriver   6.0.0f7
com.apple.iokit.IOBluetoothFamily   6.0.0f7
com.apple.iokit.IOReportFamily  31
com.apple.iokit.IOUSBHIDDriver  900.4.1
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.driver.AppleFDEKeyStore   28.30
com.apple.iokit.IOUSBFamily 900.4.1
com.apple.iokit.IOUSBHostFamily 1.2
com.apple.driver.usb.AppleUSBCommon 1.0
com.apple.driver.AppleBusPowerController    1.0
com.apple.driver.AppleACPIPlatform  6.1
com.apple.driver.AppleSMCRTC    1.0
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

EOF

System Profile:
Serial ATA Device: APPLE SSD SM128E, 121.33 GB
Bluetooth: Version 6.0.0f7, 3 services, 27 devices, 1 incoming serial ports
Model: MacBookPro10,2, BootROM MBP102.010B.B00, 2 processors, Intel Core i5, 2.5 GHz, 8 GB, SMC 2.6f59
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4
Boot Volume File System Type: apfs
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: USB2.0 Hub
USB Device: USB Receiver
USB Device: Matias Keyboard
USB Device: FaceTime HD Camera (Built-in)
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB 3.0 Bus
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x10F), Broadcom BCM43xx 1.0 (7.21.190.13.1a3)
Network Service: Thunderbolt Ethernet, Ethernet, en4
Network Service: Wi-Fi, AirPort, en0
PCI Card: Apple 57762-A0, Ethernet Controller, Thunderbolt@195,0,0
Thunderbolt Device: Thunderbolt to Gigabit Ethernet Adapter, Apple Inc., 1, 5.5
maxtaco commented 7 years ago

cc: @strib

bfleischer commented 7 years ago

Here is the symbolicated backtrace:

panic(cpu 2 caller 0xffffff802dd94512): assertion failed: ifp->if_sndbyte_total >= len, file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4570.1.46/bsd/netinet/in_pcb.c, line: 3608
Backtrace (CPU 2), Frame : Return Address
0xffffff81377eba10 : 0xffffff802d86d366 handle_debugger_trap (in kernel) (debug.c:940)
0xffffff81377eba50 : 0xffffff802d998494 kdp_i386_trap (in kernel) (kdp_machdep.c:458)
0xffffff81377eba90 : 0xffffff802d98a429 kernel_trap (in kernel) (trap.c:782)
0xffffff81377ebb10 : 0xffffff802d81f190 trap_from_kernel (in kernel) + 38
0xffffff81377ebb30 : 0xffffff802d86cd8c panic_trap_to_debugger (in kernel) (debug.c:649)
0xffffff81377ebc60 : 0xffffff802d86cafc panic (in kernel) (debug.c:0)
0xffffff81377ebcc0 : 0xffffff802dd94512 sbfree (in kernel) (in_pcb.c:3608)
0xffffff81377ebce0 : 0xffffff802dd93f9c sbdrop (in kernel) (uipc_socket2.c:1923)
0xffffff81377ebd30 : 0xffffff802dd938e8 sbflush (in kernel) (uipc_socket2.c:1818)
0xffffff81377ebd70 : 0xffffff802dd8484f sowflush (in kernel) (uipc_socket.c:4478)
0xffffff81377ebd90 : 0xffffff802dd8452a sofreelastref (in kernel) (uipc_socket.c:1204)
0xffffff81377ebdc0 : 0xffffff802dd87262 soclose_locked (in kernel) (uipc_socket.c:1458)
0xffffff81377ebe10 : 0xffffff802dd87613 soclose (in kernel) (uipc_socket.c:1467)
0xffffff81377ebe30 : 0xffffff802dd060b3 closef_locked (in kernel) (kern_descrip.c:5225)
0xffffff81377ebea0 : 0xffffff802dd05d44 close_internal_locked (in kernel) (kern_descrip.c:2887)
0xffffff81377ebf00 : 0xffffff802dd0a644 close_nocancel (in kernel) (kern_descrip.c:2784)
0xffffff81377ebf40 : 0xffffff802de0e548 unix_syscall64 (in kernel) (systemcalls.c:382)
0xffffff81377ebfa0 : 0xffffff802d81f976 hndl_unix_scall64 (in kernel) + 22

It does not contain any kbfuse related functions. Therefore I don't think kbfuse (the Keybase kernel extension) is to blame for the panic. It seems that kbfs (the Keybase user space process), or a library it uses, is closing a network socket, which triggers the panic.

To me this looks like a bug in the High Sierra kernel. kbfs should not be able to make the kernel panic by closing a network socket. It would be best to report the panic to Apple. Have you seen the panic on Sierra, too, or have the panics started after upgrading to High Sierra?

cjb commented 7 years ago

For what it's worth, here's a Stack Overflow post with the same panic:

https://apple.stackexchange.com/questions/298218/macos-10-12-6-panic-assertion-failed-ifp-if-sndbyte-total-len-bsd-netine

This person seems to conclude "HoRNDIS" was causing the crash for them -- do you use that?

ngocphamm commented 7 years ago

@bfleischer FYI, the panic only started after upgrading to High Sierra

@cjb I don't use HoRNDIS. Have no idea what it is.