Kernel panic when waking from sleep

Describe the bug
I left my laptop powered on and sleeping all weekend with lid closed, with external display and keyboard attached. When I returned Monday morning I was unable to wake it up so I had to reboot and then I saw the panic report naming BetterTouchTool as the culprit. Not sure if you can get anything useful from this.

Device information:
macOS 10.14.2
BTT 2.428

*** Panic Report ***
Panic(CPU 0, time 237261541616907): NMIPI for unresponsive processor: TLB flush timeout, TLB state:0x0
RAX: 0xffffff80165c1916, RBX: 0x0000000000000000, RCX: 0xffffff80165c1a5c, RDX: 0xffffff922aaf8060
RSP: 0xffffff81d3440d80, RBP: 0xffffff81d3440df0, RSI: 0x0000000000000004, RDI: 0xffffff922aaf8060
R8:  0x0000000000000001, R9:  0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000000
R12: 0x0000000000000001, R13: 0x0000000000000002, R14: 0x000000000000fc00, R15: 0xffffff80400d9680
RFL: 0x0000000000000093, RIP: 0xffffff80165c1919, CS:  0x0000000000000008, SS:  0x0000000000000010
Backtrace (CPU 0), Frame : Return Address
0xffffff81d3440c20 : 0xffffff80166d975f 
0xffffff81d3440c80 : 0xffffff801655bfa7 
0xffffff81d3440df0 : 0xffffff7f977cb486 
0xffffff81d3440e10 : 0xffffff7f976df061 
0xffffff81d3440e30 : 0xffffff7f976d5fff 
0xffffff81d3440ea0 : 0xffffff8016c5c2e5 
0xffffff81d3440ee0 : 0xffffff7f96eb3a3e 
0xffffff81d3440f30 : 0xffffff7f97e42a7c 
0xffffff81d3440f50 : 0xffffff7f97e4baa5 
0xffffff81d3440f70 : 0xffffff80166d977c 
0xffffff81d3440fd0 : 0xffffff801655be4d 
0xffffff81f4e83f30 : 0xffffff80165ce627 
0xffffff81f4e83f80 : 0xffffff80165cecb0 
0xffffff81f4e83fa0 : 0xffffff801655b0ce 
      Kernel Extensions in backtrace:[7EA30FDD-A2FB-390F-99DD-42BC19691BB4]@0xffffff7f96e95000->0xffffff7f96ec9fff[52CE91F1-D89E-3BF2-A5BE-0A914968DC65]@0xffffff7f97e3b000->0xffffff7f97ed6fff

BSD process name corresponding to current thread: kernel_task

Mac OS version:

Kernel version:
Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64
Kernel UUID: 56B30885-F9BA-30E8-AD1C-5D59EC243BA9
Kernel slide:     0x0000000016200000
Kernel text base: 0xffffff8016400000
__HIB  text base: 0xffffff8016300000
System model name: MacBookPro11,5 (Mac-06F11F11946D27C5)

System uptime in nanoseconds: 237261734160635
last loaded kext at 65713837442484:	3 (addr 0xffffff7f98792000, size 32768)
last unloaded kext at 67166082420464:	3 (addr 0xffffff7f98792000, size 32768)
loaded kexts:
org.virtualbox.kext.VBoxNetAdp	5.2.22
org.virtualbox.kext.VBoxNetFlt	5.2.22
org.virtualbox.kext.VBoxUSB	5.2.22
org.virtualbox.kext.VBoxDrv	5.2.22	2.3.0	5.6.0	3.3.1	2.0.4	2.0.4	1.70	3.28.4	3.28.4	1	18.306.12	1.0.1	3.0	6.0.9f2	110.23.46	2.7.0d0	1.0.0	1	3.6.5	3.28.4	7.0.0	12.0.4	282.10	1	3.1.2	6.0.9f2	2.0.4	1400.1.1	1.5.6	3.28.4	3.1	1	212	6.8.0	4.0.0	12.0.4	456.230.1	138.2	138.2	945.230.6	329.200.2	2.1.2	407.200.4	1.0.0d1	40	1.0.0	1.0	1.0	161.0.0	1.8	6.1	2.0	2.1	6.1	1.7	190	8	900.4.2	2.3.0	4.7.3	2.1.4	5.5.8	315.6	1.2	1.0	2.0.4	710.1	700.7	1.1.0	900.4.2	1.0	1.0	282.10	527	1.1.0	3.28.4	530	6.0.9f2	6.0.9f2	6.0.9f2	2.0.4	1200.12.2	1.0.1b8	1.0.4	282.10	282.10	1.0.18d1	3.28.4	206.5	1.2.0	1.0.0	6.0.0d8	1.0.0	3.28.4	404.2.2	530.14	255.1	138.2	6.0.9f2	6.0.9f2	2410.5	208	2410.5	2410.2	1.2	5.0.0	1.2	301.200.2	1.2	1.2	288	11	1	5.5.8	5.5.8	2.1.4	4.7.6	6.8.1	1.0	900.4.2	1.2	2.1	2.1	1.1	2.0.0	3	300.0	1.0.0d1	493.0.0	28.30	1.0	2	456.230.1	1.0.5	1	145.200.2	408.200.1	408.200.1	2.1	1.0	1	1.2	1.0	1.0	1.0.1	1	700.7	3.4	47	6.1	3.1.9	2.9	1.4	1	1	1.0
panic(cpu 4 caller 0xffffff80166b4c85): "TLB invalidation IPI timeout, unresponsive CPU bitmap: 0x1, NMIPI acks: 0x0, now: 0x1, deadline: 237261512308959"@/BuildRoot/Library/Caches/
Backtrace (CPU 4), Frame : Return Address
0xffffff9215f23660 : 0xffffff80165aeafd 
0xffffff9215f236b0 : 0xffffff80166e85a3 
0xffffff9215f236f0 : 0xffffff80166d9fca 
0xffffff9215f23760 : 0xffffff801655bca0 
0xffffff9215f23780 : 0xffffff80165ae517 
0xffffff9215f238a0 : 0xffffff80165ae363 
0xffffff9215f23910 : 0xffffff80166b4c85 
0xffffff9215f239b0 : 0xffffff80166bbb74 
0xffffff9215f23a90 : 0xffffff80166bcaf7 
0xffffff9215f23af0 : 0xffffff8016643cec 
0xffffff9215f23c40 : 0xffffff801664b3d2 
0xffffff9215f23c80 : 0xffffff801663f133 
0xffffff9215f23cb0 : 0xffffff8016be72f0 
0xffffff9215f23cd0 : 0xffffff8016c8d059 
0xffffff9215f23d30 : 0xffffff801669634b 
0xffffff9215f23d80 : 0xffffff80165b42bd 
0xffffff9215f23dd0 : 0xffffff801658ebe5 
0xffffff9215f23e50 : 0xffffff80165a359e 
0xffffff9215f23ef0 : 0xffffff80166c170b 
0xffffff9215f23fa0 : 0xffffff801655c486 

BSD process name corresponding to current thread: BetterTouchTool

Model: MacBookPro11,5, BootROM, 4 processors, Intel Core i7, 2.8 GHz, 16 GB, SMC 2.30f2
Graphics: AMD Radeon R9 M370X, AMD Radeon R9 M370X, PCIe
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533642465238412D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533642465238412D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x152), Broadcom BCM43xx 1.0 ( AirPortDriverBrcmNIC-1305.2)
Bluetooth: Version 6.0.9f2, 3 services, 27 devices, 1 incoming serial ports
Network Service: Thunderbolt Ethernet Slot 2, Ethernet, en3
Network Service: Wi-Fi, AirPort, en0
PCI Card: ethernet, Ethernet Controller, Thunderbolt@193,0,0
PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt@194,0,0
PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt@192,0,0
PCI Card: pci11c1,5901, IEEE 1394 Open HCI, Thunderbolt@191,0,0
Serial ATA Device: APPLE SSD SM1024G, 1 TB
USB Device: USB 3.0 Bus
USB Device: USB audio CODEC
USB Device: USB 3.0 Bus
USB Device: KB800 Kinesis Freestyle
USB Device: USB 3.0 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Bluetooth USB Host Controller
USB Device: USB Receiver
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
Thunderbolt Device: Thunderbolt 2 Dock, Other World Computing, Inc., 1, 25.1

That's most likely not related to BTT (BTT runs in user space and doesn't install any kernel extensions).
Unfortunately it's very hard to track down stuff like this. Sometimes it's a hardware issue, sometimes it's some kernel extension that is installed (however in your case I can only see VirtualBox, so if that is up-to-date it's probably not caused by it)

Hi Andreas, and Elliott.

So I'm a longterm BTT worshipper, but I've only had a MacBook Pro with Touch Bar since March. It does seem that if BTT is running and the machine is left to sleep and particularly if the power supply is interrupted (disconnected/reconnected) in any way, the machine will panic in just the way described as Elliott.

I've been trying to troubleshoot this ever since getting the Mac, Apple have found it as difficult as I have to pin down but of course, as it doesn't occur with no third party software running, they don't see it as a hardware issue.

When BTT 3 came out, I was hoping the issue might go away, no luck. The MacBook Pro Supplemental Update came out this week and I was really hoping that, as it was over 1GB and focused on the T2 chip, that maybe this issue would get fixed. The only way I can be sure that I won't come back to a panicked, rebooted Mac is to quit BTT before sleeping it. That surely can't be right.

Now, I don't think this is a problem with BetterTouchTool per se. However at this point I find it undeniable that perhaps due to the way that BTT uses the Touch Bar, or simply the fact that the Touch Bar is doing way more than just sitting there totally unused (as I presume it does on every person's machine that doesn't have BTT), it's causing some flaw in the Touch Bar implementation/hardware to be symptomatic.

However, is there any chance you would take another look at this for us, Andreas? Do you use BTT with a Touch Bar enabled 2018+ MacBook Pro? If there are any troubleshooting steps you would like me to take or any data you would find it easier to look at (even the Panic logs, when related to the T2 'iBridge') chip, are totally unreadable for me)

Yours so very upset about this whole thing,


1 Like

I also have been experiencing sleep-wake failures (MacBook Pro spontaneously reboots) and BTT implicated in the panic report. Need to quit BTT before sleep to avoid. Very inconvenient as find BTT very useful.

1 Like

sorry, there is not much I can do here. This is most definitely a hardware or driver issue ;-(

However it may well be that some function in BTT could access parts of the faulty hardware/driver that could lead to this, but without having one of the faulty machines it's pretty much impossible for me to reproduce this in order to add a workaround. There are many people on the internet (apple forums) with the same ibridge issues, that are not using BTT at all.

Is it not possible that BTT could alter the way it accesses the Touch Bar in such a way as to avoid the issue? Do you have options when accessing the TB - are there any troubleshooting steps to try in this regard? But of course, if you don't have a T2-equipped Touch Bar Mac to test with, there's not much hope of this.

I'm tempted to install the Catalina DP but I'm sure that would have worse reliability if anything. I was just so disappointed when the panics continued to occur after the Supplemental Update - because whatever they say publicly Apple are most definitely aware of the situation.

Andreas, is there anything we can take back when trying to get support for this issue? I've wanted to say, "there's no way that any app should be able to cause kernel panics excepting a faulty driver or hardware" but wasn't 100% sure of this. But that's true, isn't it? I understand you feel this is both outside of your scope of support responsibilites and capabilities, but, as someone with obviously greater knowledge of the Touch Bar and how it integrates with the rest of the system, I know I would appreciate any help you can give us in diagnosing and/or getting support for the issue. (If I had the money I would send you a Touch Bar MBP pronto, but I'm in debt for mine already, which stings doubly as I feel like it's a lemon)

Unfortunately there is only one way to access the TouchBar. I do own multiple T2 Macs but even among the many BTT users there are maybe 20 with kernel panics, I would really need one of these faulty machines but even then it’s unlikely I would be able to add a workaround ;-(

Best bet would be to get it replaced by Apple (maybe due to a faulty keyboard? They replace the complete bottom part for keyboard repairs)

I didn't consider that you'd obviously have analytics. So it sounds like what you're saying is that there are loads of people with the exact same Mac who aren't experiencing the issue, which does suggest to me that it is in fact a hardware fault. OK, so that's something. Anything fixable is good news. Genius Bar tomorrow then. Thanks Andreas