electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://electronjs.org
MIT License
114.43k stars 15.45k forks source link

[Bug]: Fatal crashes on Macbook Pro #30841

Closed PassionPenguin closed 3 years ago

PassionPenguin commented 3 years ago

Preflight Checklist

Electron Version

13.2.1

What operating system are you using?

macOS

Operating System Version

Darwin Penguins-MBP 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

What arch are you using?

x64

Last Known Working Electron version

13.2.1

Expected Behavior

Application run properly

(no code has changed before the session had started, just a simple restart)

Actual Behavior

a fatal crash, lead to black screen and a fatal crash in system (CPU 2 unresponsive, tlb flush timeout)

Testcase Gist URL

No response

Additional Information

Electron information

System Diagnostics

code ADP000 No issues found

macOS Output Log:

Panic(CPU 2, time 598349611021480): NMIPI for unresponsive processor: TLB flush timeout, TLB state:0x0
RAX: 0xffffff86864fac60, RBX: 0xffffff867d3d8df0, RCX: 0x00000000000000c6, RDX: 0x0002c7d300000000
RSP: 0xffffffa0486c0da0, RBP: 0xffffffa0486c0de0, RSI: 0xffffff8686946b20, RDI: 0xffffff867d3d8df0
R8:  0x0000000000000000, R9:  0x0000000000002710, R10: 0x0000000000000000, R11: 0x0000000000000000
R12: 0xffffff8686946b20, R13: 0x0000000000000000, R14: 0x0002c7d32d4c571c, R15: 0xffffff86864fac60
RFL: 0x0000000000000086, RIP: 0xffffff80020a0fcd, CS:  0x0000000000000008, SS:  0x0000000000000010
Backtrace (CPU 2), Frame : Return Address
0xffffffa0486c0c50 : 0xffffff80021c4ccb 
0xffffffa0486c0ca0 : 0xffffff8002032d39 
0xffffffa0486c0de0 : 0xffffff80020a10d4 
0xffffffa0486c0e10 : 0xffffff80021ba0c5 
0xffffffa0486c0e30 : 0xffffff80020aef56 
0xffffffa0486c0e60 : 0xffffff80020ddc9f 
0xffffffa0486c0f20 : 0xffffff80021b0fb3 
0xffffffa0486c0f60 : 0xffffff80021ce5aa 
0xffffffa0486c0f80 : 0xffffff80021c4ccb 
0xffffffa0486c0fd0 : 0xffffff8002032bdd 
0xffffffa07cd3bda0 : 0xffffff80020e73ae 
0xffffffa07cd3be00 : 0xffffff800264fe5f 
0xffffffa07cd3bf00 : 0xffffff800264eed6 
0xffffffa07cd3bf40 : 0xffffff800273fc9e 
0xffffffa07cd3bfa0 : 0xffffff80020331f6 

Process name corresponding to current thread: Electron Helper (Renderer)

Mac OS version:
20F71

Kernel version:
Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64
Kernel UUID: 52A1E876-863E-38E3-AC80-09BBAB13B752
KernelCache slide: 0x0000000001e00000
KernelCache base:  0xffffff8002000000
Kernel slide:      0x0000000001e10000
Kernel text base:  0xffffff8002010000
__HIB  text base: 0xffffff8001f00000
System model name: MacBookPro12,1 (Mac-E43C1C25D4880AD6)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 6

System uptime in nanoseconds: 598349611063588
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x000220322004dda4
  Sleep   : 0x00021d71bd5f8f5e 0x0002b95b57f4c0d0 0x00021d6589e18138
  Wake    : 0x00021d71ca41a311 0x0002c06557b00192 0x00021d71c94107c2
last started kext at 595372581895731: >usb.cdc.acm 5.0.0 (addr 0xffffff7f9cba2000, size 8192)
last stopped kext at 591193185722564: >!UAudio 405.39 (addr 0xffffff7f9cba6000, size 315392)
loaded kexts:
com.valvesoftware.SteamInput 4357.73.42
com.AmbrosiaSW.AudioSupport 4.2
>!AUpstreamUserClient 3.6.8
@filesystems.autofs 3.0
@fileutil 20.036.15
>AudioAUUC 1.70
>X86PlatformShim 1.0.0
>AGPM 122.1
>!APlatformEnabler 2.7.0d0
>!AGraphicsDevicePolicy 6.3.3
@AGDCPluginDisplayMetrics 6.3.3
>!AHDA 283.15
>pmtelemetry 1
|IOUserEthernet 1.0.1
>usb.!UUserHCI 1
|IO!BSerialManager 8.0.5d7
@Dont_Steal_Mac_OS_X 7.0.0
>!AHV 1
>!ADiskImages2 1
>!A!IBDWGraphics 16.0.4
>eficheck 1
>!AThunderboltIP 4.0.3
>!ACameraInterface 7.6.0
>!ALPC 3.1
>!ASMCLMU 212
>!A!IBDWGraphicsFramebuffer 16.0.4
>!ABacklight 180.3
|Broadcom!B20703USBTransport 8.0.5d7
>!A!ISlowAdaptiveClocking 4.0.0
>!AMCCSControl 1.14
|IO!BUSBDFU 8.0.5d7
>!UCardReader 511.120.2
|SCSITaskUserClient 436.121.1
>!AFileSystemDriver 3.0.1
@filesystems.tmpfs 1
@filesystems.hfs.kext 556.100.11
@BootCache 40
@!AFSCompression.!AFSCompressionTypeZlib 1.0.0
@!AFSCompression.!AFSCompressionTypeDataless 1.0.0d1
@filesystems.apfs 1677.120.9
>!AAHCIPort 346.100.2
>!ATopCaseHIDEventDriver 4050.1
>AirPort.BrcmNIC 1400.1.1
@private.KextAudit 1.0
>!ASmartBatteryManager 161.0.0
>!ARTC 2.0
>!AACPIButtons 6.1
>!AHPET 1.8
>!ASMBIOS 2.1
>!AACPIEC 6.1
>!AAPIC 1.7
@!ASystemPolicy 2.0.0
@nke.applicationfirewall 311
|IOKitRegistryCompatibility 1
|EndpointSecurity 1
>usb.cdc.acm 5.0.0
>usb.serial 6.0.0
>!UAudio 405.39
>usb.cdc.ecm 5.0.0
>usb.cdc.ncm 5.0.0
>!UMergeNub 900.4.2
@kext.triggers 1.0
>!AGraphicsControl 6.3.3
>DspFuncLib 283.15
@kext.OSvKernDSPLib 529
|IOSerial!F 11
|IOAVB!F 940.4
|IOEthernetAVB!C 1.1.0
>!AThunderboltDPOutAdapter 8.1.4
|IOAccelerator!F2 442.9
>X86PlatformPlugin 1.0.0
>IOPlatformPlugin!F 6.0.0d8
>!ABacklightExpert 1.1.0
|IONDRVSupport 585.1
|Broadcom!BHost!CUSBTransport 8.0.5d7
|IO!BHost!CUSBTransport 8.0.5d7
|IO!BHost!CTransport 8.0.5d7
>!AHDA!C 283.15
|IOHDA!F 283.15
|IOAudio!F 300.6.1
@vecLib.kext 1.2.0
@!AGPUWrangler 6.3.3
@!AGraphicsDeviceControl 6.3.3
|IOSlowAdaptiveClocking!F 1.0.0
|IOGraphics!F 585.1
>!ASMBus!C 1.0.18d1
@plugin.IOgPTPPlugin 985.2
>usb.IOUSBHostHIDDevice 1.2
>usb.cdc 5.0.0
>usb.networking 5.0.0
>usb.!UHostCompositeDevice 1.2
>!AThunderboltDPInAdapter 8.1.4
>!AThunderboltDPAdapter!F 8.1.4
>!AThunderboltPCIDownAdapter 4.1.1
>!ABSDKextStarter 3
|IOSurface 290.8.1
@filesystems.hfs.encodings.kext 1
>!AXsanScheme 3
|IOAHCIBlock!S 332
>!AActuatorDriver 4440.3
|IOAHCI!F 294.100.1
>!AHIDKeyboard 224
>!AMultitouchDriver 4440.3
>!AInputDeviceSupport 4400.35
>!AHS!BDriver 4050.1
>IO!BHIDDriver 8.0.5d7
>!AHSSPIHIDDriver 61
>!AThunderboltNHI 7.2.8
|IOThunderbolt!F 9.3.2
|IO80211!F 1200.12.2b1
|IOSkywalk!F 1
>mDNSOffloadUserClient 1.0.1b8
>corecapture 1.0.4
>usb.!UHostPacketFilter 1.0
|IOUSB!F 900.4.2
>!AHSSPISupport 61
>!A!ILpssSpi!C 3.0.60
>!A!ILpssI2C 3.0.60
>!A!ILpssGspi 3.0.60
>!A!ILpssDmac 3.0.60
>usb.!UXHCIPCI 1.2
>usb.!UXHCI 1.2
>!AEFINVRAM 2.1
>!AEFIRuntime 2.1
|IOSMBus!F 1.1
|IOHID!F 2.0.0
$!AImage4 3.0.0
|IOTimeSync!F 985.2
|IONetworking!F 3.4
>DiskImages 493.0.0
|IO!B!F 8.0.5d7
|IOReport!F 47
|IO!BPacketLogger 8.0.5d7
$quarantine 4
$sandbox 300.0
@kext.!AMatch 1.0.0d1
|CoreAnalytics!F 1
>!ASSE 1.0
>!AKeyStore 2
>!UTDM 511.120.2
|IOUSBMass!SDriver 184.121.1
|IOSCSIBlockCommandsDevice 436.121.1
|IO!S!F 2.1
|IOSCSIArchitectureModel!F 436.121.1
>!AMobileFileIntegrity 1.0.5
@kext.CoreTrust 1
>!AFDEKeyStore 28.30
>!AEffaceable!S 1.0
>!ACredentialManager 1.0
>KernelRelayHost 1
|IOUSBHost!F 1.2
>!UHostMergeProperties 1.2
>usb.!UCommon 1.0
>!ABusPower!C 1.0
>!ASEPManager 1.0.1
>IOSlaveProcessor 1
>!AACPIPlatform 6.1
>!ASMC 3.1.9
|IOPCI!F 2.9
|IOACPI!F 1.4
>watchdog 1
@kec.pthread 1
@kec.corecrypto 11.1
@kec.Libm 1
Panic(CPU 1, time 598349611021764): NMIPI for unresponsive processor: TLB flush timeout, TLB state:0x0
RAX: 0xffffff8686946b20, RBX: 0xffffff933f179a58, RCX: 0x00000000000000c8, RDX: 0x0002c7d300000000
RSP: 0xffffffa07d303aa0, RBP: 0xffffffa07d303ae0, RSI: 0xffffff86864fac60, RDI: 0xffffff933f179a58
R8:  0xffffffa07d303c60, R9:  0xffffff80020e40e0, R10: 0x0000000000ffffff, R11: 0x0000000000000000
R12: 0xffffff86864fac60, R13: 0x0000000000000000, R14: 0x0002c7d32d4b7bd7, R15: 0xffffff8686946b20
RFL: 0x0000000000000013, RIP: 0xffffff80020a0fb7, CS:  0x0000000000000008, SS:  0x0000000000000010
Backtrace (CPU 1), Frame : Return Address
0xffffffa048ac4f80 : 0xffffff80021c4ccb 
0xffffffa048ac4fd0 : 0xffffff8002032bdd 
0xffffffa07d303ae0 : 0xffffff80020a10d4 
0xffffffa07d303b10 : 0xffffff80020e2930 
0xffffffa07d303b30 : 0xffffff80020e4119 
0xffffffa07d303be0 : 0xffffff80020e4612 
0xffffffa07d303c50 : 0xffffff80020e368a 
0xffffffa07d303d10 : 0xffffff80020e75c5 
0xffffffa07d303d50 : 0xffffff80025f92f4 
0xffffffa07d303d70 : 0xffffff80025f93de 
0xffffffa07d303db0 : 0xffffff80026528bd 
0xffffffa07d303e30 : 0xffffff800264dcc5 
0xffffffa07d303ee0 : 0xffffff800264daf1 
0xffffffa07d303f40 : 0xffffff800273fc9e 
0xffffffa07d303fa0 : 0xffffff80020331f6 

Process name corresponding to current thread: Electron Helper (Renderer)
panic(cpu 3 caller 0xffffff800219e5e1): "IPI timeout, unresponsive CPU bitmap: 0x6, NMIPI acks: 0x0, now: 0x2, deadline: 598348377422137, pre-NMIPI time: 0x2203220042d96, current: 0x220322005e75d, global: 1"@/System/Volumes/Data/SWE/macOS/BuildRoots/e90674e518/Library/Caches/com.apple.xbs/Sources/xnu/xnu-7195.121.3/osfmk/x86_64/pmap.c:2905
Backtrace (CPU 3), Frame : Return Address
0xffffffa07c9e3340 : 0xffffff800208e0dd 
0xffffffa07c9e3390 : 0xffffff80021d4f33 
0xffffffa07c9e33d0 : 0xffffff80021c552a 
0xffffffa07c9e3420 : 0xffffff8002032a2f 
0xffffffa07c9e3440 : 0xffffff800208d8fd 
0xffffffa07c9e3560 : 0xffffff800208dbf3 
0xffffffa07c9e35d0 : 0xffffff800289d81a 
0xffffffa07c9e3640 : 0xffffff800219e5e1 
0xffffffa07c9e3700 : 0xffffff80021a46fc 
0xffffffa07c9e37e0 : 0xffffff80021a54e6 
0xffffffa07c9e3840 : 0xffffff8002133615 
0xffffffa07c9e3990 : 0xffffff8002132f63 
0xffffffa07c9e39c0 : 0xffffff8002802612 
0xffffffa07c9e39f0 : 0xffffff80027ff068 
0xffffffa07c9e3a20 : 0xffffff80027fedb9 
0xffffffa07c9e3a60 : 0xffffff80027fed6f 
0xffffffa07c9e3a90 : 0xffffff8004ca55cf 
0xffffffa07c9e3ad0 : 0xffffff800281e13e 
0xffffffa07c9e3b20 : 0xffffff800282837b 
0xffffffa07c9e3c80 : 0xffffff8002180961 
0xffffffa07c9e3d90 : 0xffffff800209375d 
0xffffffa07c9e3e00 : 0xffffff8002069cf5 
0xffffffa07c9e3e60 : 0xffffff8002081312 
0xffffffa07c9e3ef0 : 0xffffff80021a982d 
0xffffffa07c9e3fa0 : 0xffffff8002033216 
      Kernel Extensions in backtrace:
         com.apple.iokit.IOSurface(2
codebytere commented 3 years ago

Thanks for reporting this and helping to make Electron better!

Because of time constraints, triaging code with third-party dependencies is usually not feasible for a small team like Electron's.

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

PassionPenguin commented 3 years ago

how can electron fiddle trigger a system fatal crash and make a forced restart?