Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS 11.0 Beta 3 Crash #16

Open
nk2IsHere opened this issue Jul 30, 2020 · 16 comments
Open

MacOS 11.0 Beta 3 Crash #16

nk2IsHere opened this issue Jul 30, 2020 · 16 comments

Comments

@nk2IsHere
Copy link

Tried using your kext on apple's new beta with mbp2019 16inch.

panic(cpu 0 caller 0xffffff800fbe6f86): Kernel trap at 0xffffff7faeca9f9c, type 13=general protection, registers:
CR0: 0x0000000080010033, CR2: 0xffffffa07ef29000, CR3: 0x0000000023d61000, CR4: 0x00000000003626e0
RAX: 0x000000000064005f, RBX: 0xffffff86c3d77780, RCX: 0x0000000000000774, RDX: 0x0000000000000000
RSP: 0xffffffb09cffbde4, RBP: 0xffffffb09cffbdf0, RSI: 0x000000000064005f, RDI: 0x0000000000000774
R8:  0x000000000064005f, R9:  0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000000
R12: 0xffffff86c3df93b8, R13: 0xffffff86bfa62d00, R14: 0x0000000000000000, R15: 0xffffff86c3df9348
RFL: 0x0000000000010296, RIP: 0xffffff7faeca9f9c, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0xffffffa07ef29000, Error code: 0x0000000000000000, Fault CPU: 0x0, PL: 0, VF: 0

Backtrace (CPU 0), Frame : Return Address
0xffffff800f9561e0 : 0xffffff800fab70bd 
0xffffff800f956230 : 0xffffff800fbf6053 
0xffffff800f956270 : 0xffffff800fbe6bba 
0xffffff800f9562c0 : 0xffffff800fa5ca2f 
0xffffff800f9562e0 : 0xffffff800fab68fd 
0xffffff800f956400 : 0xffffff800fab6bf3 
0xffffff800f956470 : 0xffffff80102b7f6a 
0xffffff800f9564e0 : 0xffffff800fbe6f86 
0xffffff800f956660 : 0xffffff800fbe6c6d 
0xffffff800f9566b0 : 0xffffff800fa5ca2f 
0xffffff800f9566d0 : 0xffffff7faeca9f9c 
0xffffffb09cffbdf0 : 0xffffff7faeca9d92 
0xffffffb09cffbe40 : 0xffffff80101eaf4d 
0xffffffb09cffbef0 : 0xffffff80101ea61f 
0xffffffb09cffbf50 : 0xffffff80101ed386 
0xffffffb09cffbfa0 : 0xffffff800fa5c13e 
      Kernel Extensions in backtrace:
         org.syscl.driver.CPUTune(2.1.7)[1D6045B6-E42C-3054-87BA-865BD55F9E32]@0xffffff7faeca8000->0xffffff7faecadfff

Process name corresponding to current thread: kernel_task
Boot args: -v -cputbeta chunklist-security-epoch=0 -chunklist-no-rev2-dev

Mac OS version:
20A5323l

Kernel version:
Darwin Kernel Version 20.0.0: Wed Jul 15 21:07:06 PDT 2020; root:xnu-7155.0.0.131.6~1/RELEASE_X86_64
Kernel UUID: 4246D7A0-FD50-3D38-BCF0-4BB1D86F38F1
KernelCache slide: 0x000000000f800000
KernelCache base:  0xffffff800fa00000
Kernel slide:      0x000000000f80c000
Kernel text base:  0xffffff800fa0c000
__HIB  text base: 0xffffff800f900000
System model name: MacBookPro16,1 (Mac-E1008331FDC96864)
System shutdown begun: NO
Hibernation exit count: 0

System uptime in nanoseconds: 22375137286
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x00000005390e0e6b
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x00000004268386cc 0x0000000000000000
last started kext at 21101927700: com.paragon-software.kext.VDMounter	4.2 (addr 0xffffff7faeda8000, size 372736)
loaded kexts:
com.paragon-software.kext.VDMounter	4.2
org.syscl.driver.CPUTune	2.1.7
com.intel.driver.EnergyDriver	3.6.0
>pmtelemetry	1
>LuaHardwareAccess	1.0.16
|IOUserEthernet	1.0.1
>usb.!UUserHCI	1
|IO!BSerialManager	8.0.0d41
@Dont_Steal_Mac_OS_X	7.0.0
>!AHV	1
>!ADiskImages2	1
>!A!IPCHPMC	2.0.1
>BridgeAudioCommunication	6.76
>!AAVEBridge	6.1
>!A!ISlowAdaptiveClocking	4.0.0
>!AFileSystemDriver	3.0.1
>BCMWLANFirmware4378.Hashstore	1
>BCMWLANFirmware4377.Hashstore	1
>BCMWLANFirmware4364.Hashstore	1
>BCMWLANFirmware4355.Hashstore	1
@filesystems.hfs.kext	556
@BootCache	40
>!AVirtIO	72
@!AFSCompression.!AFSCompressionTypeZlib	1.0.0
@!AFSCompression.!AFSCompressionTypeDataless	1.0.0d1
>!ABCMWLANBusInterfacePCIeMac	1
@filesystems.apfs	1667.0.0
@private.KextAudit	1.0
>!ASmartBatteryManager	161.0.0
>!AACPIButtons	6.1
>!ASMBIOS	2.1
>!AACPIEC	6.1
>!AAPIC	1.7
@!ASystemPolicy	2.0.0
@nke.applicationfirewall	310
|IOKitRegistryCompatibility	1
|EndpointSecurity	1
|IOAVB!F	900.10
@plugin.IOgPTPPlugin	900.8
|IOEthernetAVB!C	1.1.0
@!AGPUWrangler	6.1.18
@!AGraphicsDeviceControl	6.1.18
>IOPlatformPlugin!F	6.0.0d8
@kext.AMDRadeonX6000HWServices	4.0.0
|IOGraphics!F	583
>!A!ILpssUARTv1	3.0.60
>!A!ILpssUARTCommon	3.0.60
>!AOnboardSerial	1.0
>!ASMBusPCI	1.0.14d1
|IOSlowAdaptiveClocking!F	1.0.0
>usb.IOUSBHostHIDDevice	1.2
>usb.cdc.ecm	5.0.0
>usb.cdc.ncm	5.0.0
>usb.cdc	5.0.0
>usb.networking	5.0.0
>usb.!UHostCompositeDevice	1.2
|IOSurface	289
@filesystems.hfs.encodings.kext	1
|IOAudio!F	300.6.1
@vecLib.kext	1.2.0
>!AThunderboltPCIDownAdapter	4.1.1
>!AThunderboltDPInAdapter	8.1.3
>!AThunderboltDPAdapter!F	8.1.3
>!AHPM	3.4.4
>!A!ILpssI2C!C	3.0.60
>!A!ILpssI2C	3.0.60
>!A!ILpssDmac	3.0.60
>!ABCMWLANCoreMac	1.0.0
|IOSerial!F	11
|IO80211!FV2	1200.12.2b1
|IOSkywalk!F	1
>mDNSOffloadUserClient	1.0.1b8
>IOImageLoader	1.0.0
>corecapture	1.0.4
>!AXsanScheme	3
>usb.!UVHCIBCE	1.2
>usb.!UVHCICommonBCE	1.0
>usb.!UVHCI	1.2
>usb.!UVHCICommon	1.0
>!AEffaceableNOR	1.0
|IOBufferCopy!C	1.1.0
|IOBufferCopyEngine!F	1
|IONVMe!F	2.1.0
>!AThunderboltNHI	7.2.8
|IOThunderbolt!F	9.3.2
>usb.!UHostPacketFilter	1.0
|IOUSB!F	900.4.2
>usb.!UXHCIPCI	1.2
>usb.!UXHCI	1.2
>!AEFINVRAM	2.1
>!AEFIRuntime	2.1
>!ASMCRTC	1.0
|IOSMBus!F	1.1
|IOHID!F	2.0.0
$quarantine	4
$sandbox	300.0
@kext.!AMatch	1.0.0d1
$!AImage4	3.0.0
|IOTimeSync!F	900.8
|IONetworking!F	3.4
>DiskImages	493.0.0
|IO!B!F	8.0.0d41
|IOReport!F	47
|IO!BPacketLogger	8.0.0d41
|CoreAnalytics!F	1
>!ASSE	1.0
>!AKeyStore	2
>!UTDM	511
|IOUSBMass!SDriver	183.0.0
|IOSCSIBlockCommandsDevice	435
|IO!S!F	2.1
|IOSCSIArchitectureModel!F	435
>!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	1.0
@kec.Libm	1
@syscl
Copy link
Owner

syscl commented Aug 4, 2020

Thanks for the report! Will take a look!

@syscl
Copy link
Owner

syscl commented Aug 4, 2020

@nk2IsHere I saw the version you are using is 2.1.7, could you try to build a latest 2.2.1 and see if it work with 11.0?

@syscl
Copy link
Owner

syscl commented Aug 4, 2020

In the meantime, could you please give v2.2.3 a try which attempt to fix the memory leak in your case. Thanks in advance!

@nk2IsHere
Copy link
Author

Unfortunately, it does not compile anymore on Xcode-beta 3:

/Users/nk2/Desktop/CPUTune/CPUTuneCore/CPUTune/kern_util.hpp:109:10: Conflicting types for 'kern_os_free'

@nk2IsHere
Copy link
Author

Commenting out line 107 in kern_util.hpp: void kern_os_free(void* addr, size_t nsize);
And casting void* to uint8_t* in kern_util.cpp: buffer = (uint8_t*) kern_os_malloc(sizeof(uint8_t) * (bytes + 1));
Seems to fix compiling error, will give more info when I'll start my system with this kext.

@syscl
Copy link
Owner

syscl commented Aug 4, 2020

Thanks for pointing out! Feel free to give the latest version a try!

@nk2IsHere
Copy link
Author

I've built the latest version you've provided.
Unfortunately, it still crashes

panic(cpu 0 caller 0xffffff801d3e6f86): Kernel trap at 0xffffff7fbc49e2b0, type 13=general protection, registers:
CR0: 0x0000000080010033, CR2: 0xffffffa0a8185000, CR3: 0x0000000031561000, CR4: 0x00000000003626e0
RAX: 0x000000000064005f, RBX: 0x0000000000000000, RCX: 0x0000000000000774, RDX: 0x0000000000000000
RSP: 0xffffffa0a90ebdd0, RBP: 0xffffffa0a90ebe40, RSI: 0x0000000000000000, RDI: 0x0000000000000000
R8:  0x0000000000000001, R9:  0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000000
R12: 0xffffffa0a90ebdd0, R13: 0x0000000000000000, R14: 0xffffff86d08fa888, R15: 0xffffff86cc171640
RFL: 0x0000000000010202, RIP: 0xffffff7fbc49e2b0, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0xffffffa0a8185000, Error code: 0x0000000000000000, Fault CPU: 0x0, PL: 0, VF: 0

Backtrace (CPU 0), Frame : Return Address
0xffffff801d1561e0 : 0xffffff801d2b70bd 
0xffffff801d156230 : 0xffffff801d3f6053 
0xffffff801d156270 : 0xffffff801d3e6bba 
0xffffff801d1562c0 : 0xffffff801d25ca2f 
0xffffff801d1562e0 : 0xffffff801d2b68fd 
0xffffff801d156400 : 0xffffff801d2b6bf3 
0xffffff801d156470 : 0xffffff801dab7f6a 
0xffffff801d1564e0 : 0xffffff801d3e6f86 
0xffffff801d156660 : 0xffffff801d3e6c6d 
0xffffff801d1566b0 : 0xffffff801d25ca2f 
0xffffff801d1566d0 : 0xffffff7fbc49e2b0 
0xffffffa0a90ebe40 : 0xffffff801d9eaf4d 
0xffffffa0a90ebef0 : 0xffffff801d9ea61f 
0xffffffa0a90ebf50 : 0xffffff801d9ed386 
0xffffffa0a90ebfa0 : 0xffffff801d25c13e 
      Kernel Extensions in backtrace:
         org.syscl.driver.CPUTune(2.2.4)[6CD74DB3-5536-311A-890A-38DBE6A43E46]@0xffffff7fbc49c000->0xffffff7fbc49ffff

Process name corresponding to current thread: kernel_task
Boot args: -v -cputbeta

Mac OS version:
20A5323l

Kernel version:
Darwin Kernel Version 20.0.0: Wed Jul 15 21:07:06 PDT 2020; root:xnu-7155.0.0.131.6~1/RELEASE_X86_64
Kernel UUID: 4246D7A0-FD50-3D38-BCF0-4BB1D86F38F1
KernelCache slide: 0x000000001d000000
KernelCache base:  0xffffff801d200000
Kernel slide:      0x000000001d00c000
Kernel text base:  0xffffff801d20c000
__HIB  text base: 0xffffff801d100000
System model name: MacBookPro16,1 (Mac-E1008331FDC96864)
System shutdown begun: NO
Hibernation exit count: 0

System uptime in nanoseconds: 14219355531
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x00000003520df9b6
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x00000003f80bc276 0x0000000000000000
last started kext at 12749784743: org.syscl.driver.CPUTune	2.2.4 (addr 0xffffff7fbc49c000, size 16384)
loaded kexts:
org.syscl.driver.CPUTune	2.2.4
>pmtelemetry	1
>LuaHardwareAccess	1.0.16
|IOUserEthernet	1.0.1
>usb.!UUserHCI	1
|IO!BSerialManager	8.0.0d41
@Dont_Steal_Mac_OS_X	7.0.0
>!AHV	1
>!ADiskImages2	1
>!AFIVRDriver	4.1.0
>BridgeAudioCommunication	6.76
>!AGFXHDA	100.1.429
>!A!IKBLGraphics	16.0.0
>!AMuxControl2	6.1.18
>!ABridgeAudio!C	6.76
>AGDCBacklightControl	6.1.18
>!ABacklight	180.3
>!AMCCSControl	1.14
>!A!IPCHPMC	2.0.1
>!AAVEBridge	6.1
>!A!ISlowAdaptiveClocking	4.0.0
>!AThunderboltIP	4.0.3
>!A!ICFLGraphicsFramebuffer	16.0.0
>ACPI_SMC_PlatformPlugin	1.0.0
>!AFileSystemDriver	3.0.1
>BCMWLANFirmware4378.Hashstore	1
>BCMWLANFirmware4377.Hashstore	1
>BCMWLANFirmware4364.Hashstore	1
>BCMWLANFirmware4355.Hashstore	1
@filesystems.hfs.kext	556
@BootCache	40
>!AVirtIO	72
@!AFSCompression.!AFSCompressionTypeZlib	1.0.0
@!AFSCompression.!AFSCompressionTypeDataless	1.0.0d1
>!ABCMWLANBusInterfacePCIeMac	1
@filesystems.apfs	1667.0.0
@private.KextAudit	1.0
>!ASmartBatteryManager	161.0.0
>!AACPIButtons	6.1
>!ASMBIOS	2.1
>!AACPIEC	6.1
>!AAPIC	1.7
@!ASystemPolicy	2.0.0
@nke.applicationfirewall	310
|IOKitRegistryCompatibility	1
|EndpointSecurity	1
@kext.AMDRadeonX6100HWLibs	1.0
|IOAVB!F	900.10
@kext.AMDRadeonX6000Framebuffer	4.0.0
@plugin.IOgPTPPlugin	900.8
|IOEthernetAVB!C	1.1.0
|IO!BHost!CUARTTransport	8.0.0d41
|IO!BHost!CTransport	8.0.0d41
>!ASMBusPCI	1.0.14d1
>!AGraphicsControl	6.1.18
>!A!ILpssUARTv1	3.0.60
>!A!ILpssUARTCommon	3.0.60
>!AOnboardSerial	1.0
>!AHDA!C	283.15
|IOHDA!F	283.15
>!ABacklightExpert	1.1.0
>!ASMBus!C	1.0.18d1
|IONDRVSupport	583
@!AGPUWrangler	6.1.18
|IOSlowAdaptiveClocking!F	1.0.0
@kext.AMDSupport	4.0.0
>!AThunderboltEDMSink	5.0.1
>!AThunderboltDPOutAdapter	8.1.3
|IOAccelerator!F2	439.34
@!AGraphicsDeviceControl	6.1.18
@kext.AMDRadeonX6000HWServices	4.0.0
|IOGraphics!F	583
>IOPlatformPluginLegacy	1.0.0
>X86PlatformPlugin	1.0.0
>IOPlatformPlugin!F	6.0.0d8
>usb.IOUSBHostHIDDevice	1.2
>usb.cdc.ecm	5.0.0
>usb.cdc.ncm	5.0.0
>usb.cdc	5.0.0
>usb.networking	5.0.0
>usb.!UHostCompositeDevice	1.2
|IOSurface	289
@filesystems.hfs.encodings.kext	1
|IOAudio!F	300.6.1
@vecLib.kext	1.2.0
>!AThunderboltPCIDownAdapter	4.1.1
>!AThunderboltDPInAdapter	8.1.3
>!AThunderboltDPAdapter!F	8.1.3
>!AHPM	3.4.4
>!A!ILpssI2C!C	3.0.60
>!A!ILpssI2C	3.0.60
>!A!ILpssDmac	3.0.60
>!ABCMWLANCoreMac	1.0.0
|IOSerial!F	11
|IO80211!FV2	1200.12.2b1
|IOSkywalk!F	1
>mDNSOffloadUserClient	1.0.1b8
>IOImageLoader	1.0.0
>corecapture	1.0.4
>!AXsanScheme	3
>usb.!UVHCIBCE	1.2
>usb.!UVHCICommonBCE	1.0
>usb.!UVHCI	1.2
>usb.!UVHCICommon	1.0
>!AEffaceableNOR	1.0
|IOBufferCopy!C	1.1.0
|IOBufferCopyEngine!F	1
|IONVMe!F	2.1.0
>!AThunderboltNHI	7.2.8
|IOThunderbolt!F	9.3.2
>usb.!UHostPacketFilter	1.0
|IOUSB!F	900.4.2
>usb.!UXHCIPCI	1.2
>usb.!UXHCI	1.2
>!AEFINVRAM	2.1
>!AEFIRuntime	2.1
>!ASMCRTC	1.0
|IOSMBus!F	1.1
|IOHID!F	2.0.0
$quarantine	4
$sandbox	300.0
@kext.!AMatch	1.0.0d1
$!AImage4	3.0.0
|IOTimeSync!F	900.8
|IONetworking!F	3.4
>DiskImages	493.0.0
|IO!B!F	8.0.0d41
|IOReport!F	47
|IO!BPacketLogger	8.0.0d41
|CoreAnalytics!F	1
>!ASSE	1.0
>!AKeyStore	2
>!UTDM	511
|IOUSBMass!SDriver	183.0.0
|IOSCSIBlockCommandsDevice	435
|IO!S!F	2.1
|IOSCSIArchitectureModel!F	435
>!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	1.0
@kec.Libm	1

If you need more info on this crash, I'll be happy to provide it

@syscl
Copy link
Owner

syscl commented Aug 4, 2020

Thanks! When did the kext crash? Crashed when wake up from sleep or even failed to load?

@syscl
Copy link
Owner

syscl commented Aug 4, 2020

An also, I would like to know what's the config you set for CPUTune.kext

@nk2IsHere
Copy link
Author

This kext is crashing on system boot.
I did not change any prefs in kext, though I will provide defaults below.
Screenshot 2020-08-04 at 23 30 29

@syscl
Copy link
Owner

syscl commented Aug 4, 2020

@nk2IsHere I mean did you create some config in /tmp? For example change the rate limit via /tmp/TurboRateLimit.conf?

@nk2IsHere
Copy link
Author

nk2IsHere commented Aug 5, 2020

No, I didn't create any configs in /tmp
The kext does not load properly and causes kernel panic on system boot, so I can't even start macOS to test things
Edit: to clarify more, I've installed kext, rebooted, and got panic (nothing's changed, no files were created)

@syscl
Copy link
Owner

syscl commented Aug 5, 2020

@nk2IsHere Thanks. I would suggest try to load kext first before install it. Just curious how you install the kext on 11.0? IIRC, there's not allowed to install kext on 11.0 easily.

@nk2IsHere
Copy link
Author

I've disabled secure boot and sip and then I've just pasted it to /S/L/E and rebuilt caches using this utility.
(And added -v -cputbeta to boot-args)

Actually, I can boot a system with CPUTune only if I remove -cputbeta from boot args, but the kext will stay disabled.

I can't for some unknown reasons load kexts in macOS 11 (I think it is related to codesigning)
Here's the example of me trying to load CPUTune using cli tools:

➜  Desktop sudo kextload CPUTuneCore.kext 
Executing: /usr/bin/kmutil load -p /Users/nk2/Desktop/CPUTuneCore.kext
Error: Error Domain=KMErrorDomain Code=1 "Unable to stage extension: KernelExtension org.syscl.driver.CPUTune v2.2.4 in bundle at /private/var/db/KernelExtensionManagement/Staging/org.syscl.driver.CPUTune.ukc1y1/CPUTuneCore.kext is either invalid or inauthentic." UserInfo={NSLocalizedDescription=Unable to stage extension: KernelExtension org.syscl.driver.CPUTune v2.2.4 in bundle at /private/var/db/KernelExtensionManagement/Staging/org.syscl.driver.CPUTune.ukc1y1/CPUTuneCore.kext is either invalid or inauthentic.}

@syscl
Copy link
Owner

syscl commented Aug 5, 2020

I see, so the kext cannot be loaded via kmutil due to the signature issue.

@abarsotini
Copy link

abarsotini commented Oct 19, 2020

Hi,

Is it possible to use CPUTune on MacOS BigSur Beta 10?

Is there a version of CPUTune already compiled for Download, Or some kind of tutorial on how to compile the source code by XCODE?

Tks.
Armando

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants