acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

VirtualSMC/SMCProcessor KP #1504

Closed tarkh closed 3 years ago

tarkh commented 3 years ago

Hi guys! Today I caught KP on wake. It happens just once today, before everything was ok. So I thought maybe this information will be useful for developers. Thanks for amazing product) My sys. spec: CPU i7-3770K MacOS: Big Sur 11.2

KP log

panic(cpu 0 caller 0xffffff802d2deabb): "thread_invoke: preemption_level 1, possible cause: blocking while holding a spinlock, or within interrupt context"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-7195.81.3/osfmk/kern/sched_prim.c:2280
Backtrace (CPU 0), Frame : Return Address
0xffffffc130be3640 : 0xffffff802d2bab4d mach_kernel : _handle_debugger_trap + 0x3dd
0xffffffc130be3690 : 0xffffff802d3fd7e3 mach_kernel : _kdp_i386_trap + 0x143
0xffffffc130be36d0 : 0xffffff802d3ede1a mach_kernel : _kernel_trap + 0x55a
0xffffffc130be3720 : 0xffffff802d25fa2f mach_kernel : _return_from_trap + 0xff
0xffffffc130be3740 : 0xffffff802d2ba3ed mach_kernel : _DebuggerTrapWithState + 0xad
0xffffffc130be3860 : 0xffffff802d2ba6d8 mach_kernel : _panic_trap_to_debugger + 0x268
0xffffffc130be38d0 : 0xffffff802dabef9a mach_kernel : _panic + 0x54
0xffffffc130be3940 : 0xffffff802d2deabb mach_kernel : _thread_unstop + 0x161b
0xffffffc130be39b0 : 0xffffff802d2dd40f mach_kernel : _thread_block_reason + 0xaf
0xffffffc130be3a00 : 0xffffff802d3e5746 mach_kernel : _lck_mtx_lock_wait_x86 + 0x146
0xffffffc130be3a40 : 0xffffff802d3e4fab mach_kernel : _lck_mtx_lock_slow + 0x1db
0xffffffc130be3a70 : 0xffffff802d3523ca mach_kernel : _kernel_memory_allocate + 0x7da
0xffffffc130be3b40 : 0xffffff802d314947 mach_kernel : _work_interval_port_type_render_server + 0x1367
0xffffffc130be3bb0 : 0xffffff802d314624 mach_kernel : _work_interval_port_type_render_server + 0x1044
0xffffffc130be3c00 : 0xffffff802d3177d3 mach_kernel : _zdestroy + 0x1263
0xffffffc130be3c80 : 0xffffff802d3dbb4d mach_kernel : _fpnoextflt + 0x12d
0xffffffc130be3cc0 : 0xffffff802d25fa2f mach_kernel : _return_from_trap + 0xff
0xffffffc130be3ce0 : 0xffffff80310029ac as.vit9696.SMCProcessor : __ZN12SMCProcessor13timerCallbackEv + 0x8c
0xffffffc130be3de0 : 0xffffff802da1d385 mach_kernel : __ZN18IOTimerEventSource15timeoutSignaledEPvS0_ + 0xa5
0xffffffc130be3e50 : 0xffffff802da1d286 mach_kernel : __ZN18IOTimerEventSource17timeoutAndReleaseEPvS0_ + 0xc6
0xffffffc130be3e80 : 0xffffff802d2ff725 mach_kernel : _thread_call_delayed_timer + 0x4a5
0xffffffc130be3ef0 : 0xffffff802d300634 mach_kernel : _thread_call_delayed_timer + 0x13b4
0xffffffc130be3fa0 : 0xffffff802d25f13e mach_kernel : _call_continuation + 0x2e
      Kernel Extensions in backtrace:
         as.vit9696.SMCProcessor(1.2)[097BF571-3449-35D2-95C1-BEAD5CDD3348]@0xffffff8031000000->0xffffff803100dfff
            dependency: as.vit9696.Lilu(1.5.1)[5D715668-3A1F-3AC5-8B6A-43DB08E1B922]@0xffffff8030fb9000->0xffffff8030fe2fff
            dependency: as.vit9696.VirtualSMC(1.2.0)[28E5BE19-2EBB-32A2-B7C6-7A27EFFF0F3D]@0xffffff8030fe6000->0xffffff8030ffcfff
            dependency: com.apple.iokit.IOACPIFamily(1.4)[B41AA072-8BB9-3493-9796-6FF849CDABB8]@0xffffff802f6d8000->0xffffff802f6d9fff

Process name corresponding to current thread: kernel_task
Boot args: darkwake=0 keepsyms=1 debug=0x100 alcid=9 -xcmp chunklist-security-epoch=0 -chunklist-no-rev2-dev

Mac OS version:
20D64

Kernel version:
Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
Kernel UUID: C86236B2-4976-3542-80CA-74A6B8B4BA03
KernelCache slide: 0x000000002d000000
KernelCache base:  0xffffff802d200000
Kernel slide:      0x000000002d010000
Kernel text base:  0xffffff802d210000
__HIB  text base: 0xffffff802d100000
System model name: MacPro6,1 (Mac-F60DEB81FF30ACF6)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 339896822633524
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x00013522655fa68c
  Sleep   : 0x000135202fbede49 0x000000011320a979 0x00013511a4cebbe0
  Wake    : 0x00013520309cb49e 0x000000011302b8a8 0x000135202ffb63bd
last started kext at 317845013900382: @filesystems.exfat    1.4 (addr 0xffffff7fce3c2000, size 53248)
last stopped kext at 782962315050: >usb.!UUserHCI   1 (addr 0xffffff7fcdb9d000, size 102400)
loaded kexts:
com.parallels.kext.netbridge    16.0.1 48919
com.parallels.kext.vnic 16.0.1 48919
com.parallels.kext.hypervisor   16.0.1 48919
com.parallels.kext.usbconnect   16.0.1 48919
com.github.osxfuse.filesystems.osxfuse  3.11.2
com.intel.driver.EnergyDriver   3.7.0
com.insanelymac.AtherosE2200Ethernet    2.3.0
ru.joedm.SMCSuperIO 1.2.0
as.vit9696.SMCProcessor 1.2.0
as.vit9696.VirtualSMC   1.2.0
as.vit9696.!AALC    1.5.7
as.vit9696.WhateverGreen    1.4.7
as.vit9696.Lilu 1.5.1
@filesystems.exfat  1.4
@filesystems.ntfs   3.14.3
@filesystems.msdosfs    1.10
|CSR!BHost!CUSBTransport    8.0.3d9
>usb.!UUserHCI  1
@filesystems.afpfs  11.3
@nke.asp_tcp    8.2
@filesystems.smbfs  3.4.1
>X86PlatformShim    1.0.0
>!APlatformEnabler  2.7.0d0
>AGPM   119
@filesystems.autofs 3.0
>!AUpstreamUserClient   3.6.8
>!AMCCSControl  1.14
@kext.AMDFramebuffer    4.0.2
@fileutil   20.036.15
>AudioAUUC  1.70
@kext.AMDRadeonX4000    4.0.2
@kext.AMDRadeonServiceManager   4.0.2
@AGDCPluginDisplayMetrics   6.2.2
>pmtelemetry    1
>LuaHardwareAccess  1.0.16
|IOUserEthernet 1.0.1
|IO!BSerialManager  8.0.3d9
@Dont_Steal_Mac_OS_X    7.0.0
>!AHDA  283.15
>!AHV   1
>!ADiskImages2  1
>!AGFXHDA   100.1.431
>!A!IMCEReporter    115
>!A!IFramebufferCapri   16.0.1
>eficheck   1
@kext.AMD9500!C 4.0.2
>!A!ISlowAdaptiveClocking   4.0.0
>!ALPC  3.1
|SCSITaskUserClient 436.40.6
@filesystems.tmpfs  1
@filesystems.hfs.kext   556.60.1
@BootCache  40
@!AFSCompression.!AFSCompressionTypeZlib    1.0.0
@!AFSCompression.!AFSCompressionTypeDataless    1.0.0d1
@filesystems.apfs   1677.81.1
>AirPort.BrcmNIC    1400.1.1
@private.KextAudit  1.0
>!AAHCIPort 346
>!AACPIButtons  6.1
>!ARTC  2.0
>!AHPET 1.8
>!ASMBIOS   2.1
>!AAPIC 1.7
>!A!ICPUPowerManagementClient   222.0.0
@!ASystemPolicy 2.0.0
@nke.applicationfirewall    310
|IOKitRegistryCompatibility 1
|EndpointSecurity   1
>!A!ICPUPowerManagement 222.0.0
>!AXsanScheme   3
>usb.IOUSBHostHIDDevice 1.2
>usb.cdc    5.0.0
>!UMergeNub 900.4.2
$SecureRemotePassword   1.0
@kext.triggers  1.0
>!ASMBus!C  1.0.18d1
|IOSMBus!F  1.1
@kext.AMDRadeonX4000HWLibs  1.0
@kext.AMDRadeonX4000HWServices  4.0.2
|IOSerial!F 11
|IOAVB!F    930.1
@plugin.IOgPTPPlugin    900.11
|IOEthernetAVB!C    1.1.0
>DspFuncLib 283.15
@kext.OSvKernDSPLib 529
>!UAudio    401.4
>!AHDA!C    283.15
|IOHDA!F    283.15
@!AGPUWrangler  6.2.2
|IONDRVSupport  585
|IOAudio!F  300.6.1
@vecLib.kext    1.2.0
|IOAccelerator!F2   439.52
@kext.AMDSupport    4.0.2
@!AGraphicsDeviceControl    6.2.2
|IOGraphics!F   585
|IOSlowAdaptiveClocking!F   1.0.0
>X86PlatformPlugin  1.0.0
>IOPlatformPlugin!F 6.0.0d8
>usb.networking 5.0.0
>usb.!UHostCompositeDevice  1.2
|IO!BHost!CUSBTransport 8.0.3d9
|IO!BHost!CTransport    8.0.3d9
>usb.!UHub  1.2
|IOSCSIMultimediaCommandsDevice 436.40.6
|IOBD!S!F   1.8
|IODVD!S!F  1.8
|IOCD!S!F   1.8
>!ABSDKextStarter   3
|IOSurface  289.3
@filesystems.hfs.encodings.kext 1
|IOAHCISerialATAPI  268
|IOAHCIBlock!S  332
|IO80211!F  1200.12.2b1
|IOSkywalk!F    1
>mDNSOffloadUserClient  1.0.1b8
>corecapture    1.0.4
|IOAHCI!F   294
>usb.!UEHCIPCI  1.2
>usb.!UEHCI 1.2
>usb.!UXHCIPCI  1.2
>usb.!UXHCI 1.2
|IOUSB!F    900.4.2
>!AEFINVRAM 2.1
>!AEFIRuntime   2.1
|IOHID!F    2.0.0
$!AImage4   3.0.0
|IOTimeSync!F   900.11
|IONetworking!F 3.4
>DiskImages 493.0.0
|IO!B!F 8.0.3d9
|IOReport!F 47
|IO!BPacketLogger   8.0.3d9
$quarantine 4
$sandbox    300.0
@kext.!AMatch   1.0.0d1
|CoreAnalytics!F    1
>!ASSE  1.0
>!AKeyStore 2
>!UTDM  511.60.2
|IOUSBMass!SDriver  184.40.6
|IOSCSIBlockCommandsDevice  436.40.6
|IO!S!F 2.1
|IOSCSIArchitectureModel!F  436.40.6
>!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
vit9696 commented 3 years ago

Basically there is no obvious issue here, just a slightly abnormal delay during periodic job execution. I think the issue happened because you used a DEBUG build (try a RELEASE one) and because the CPU was in low power mode. I do wonder whether power management actually works correctly (i.e. MSR 0xE2 is unlocked and all the relevant tables are injected). If nothing helps, you can always disable SMCProcessor on this CPU.