MAMP PRO crashes on launch (Monterey 12.0.1) - macos

Not sure if it's the fault of the new system since I have seen others successfully run mamp pro from MacRumors.
And I have tried to give full disk access via system preference, also, I ran sudo /Applications/MAMP/bin/startApache.sh in the terminal with no luck to fix.
From the problem report EXC_BAD_ACCESS (SIGBUS), I guess it's something about memory or index problem?
I don't know how to fix this problem, please help me,
here's the full crash report:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: MAMP PRO [51611]
Path: /Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO
Identifier: de.appsolute.mamppro
Version: 6.6 (33836)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2021-10-26 12:26:16.4555 +0800
OS Version: macOS 12.0.1 (21A559)
Report Version: 12
Bridge OS Version: 3.0 (14Y908)
Anonymous UUID: 2F9EDB7E-C40F-322A-A424-13F4D70BBC05
Sleep/Wake UUID: DF0A7272-42C0-43BE-A25D-C5F5AB3C5DF6
Time Awake Since Boot: 6500 seconds
Time Since Wake: 4085 seconds
System Integrity Protection: disabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ff8465e2450
Exception Codes: 0x0000000000000002, 0x00007ff8465e2450
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [51611]
VM Region Info: 0x7ff8465e2450 is in 0x7ff8465e18a0-0x7ff84661bbd0; bytes after start: 2992 bytes before end: 235391
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
unused shlib __TEXT 7ff8465e1898-7ff8465e18a0 [ 8] r--/rw- SM=COW ... this process
---> __DATA_CONST 7ff8465e18a0-7ff84661bbd0 [ 233K] r--/rw- SM=COW ...aunchServices
__DATA_CONST 7ff84661bbd0-7ff846658a48 [ 244K] r--/rw- SM=COW .../A/MetalTools
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libConfigurer64.dylib 0x10d79faf8 0x10d77a000 + 154360
1 ??? 0x7ff8890bc518 ???
2 libConfigurer64.dylib 0x10d79f96d 0x10d77a000 + 153965
3 dyld 0x111648759 invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long)) + 175
4 dyld 0x111630649 dyld4::RuntimeState::withLoadersReadLock(void () block_pointer) + 41
5 dyld 0x11164865a dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long)) + 116
6 libConfigurer64.dylib 0x10d7a87d3 0x10d77a000 + 190419
7 libobjc.A.dylib 0x7ff806767c6e load_images + 1546
8 dyld 0x11163541c dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*) + 170
9 dyld 0x11163abfd dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 167
10 dyld 0x11163abeb dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149
11 dyld 0x11163abeb dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149
12 dyld 0x11163acac dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
13 dyld 0x11164e32e dyld4::APIs::runAllInitializersForMain() + 222
14 dyld 0x11162c358 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3438
15 dyld 0x11162b4b4 start + 388
Thread 1:
0 libsystem_pthread.dylib 0x7ff8068cc00c start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x7ff8068cc00c start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000010d79e91b rbx: 0x0000000000000176 rcx: 0x00007ff8465e18a0 rdx: 0xffffffffffffffff
rdi: 0x00007ff88b9b1a60 rsi: 0x0000600002c4866f rbp: 0x00007ff7b35f90a0 rsp: 0x00007ff7b35f9030
r8: 0x0000000000000000 r9: 0x0000000000000990 r10: 0x0000000000000005 r11: 0x0000000000000005
r12: 0x00007ff806e1a510 r13: 0x0000000000000000 r14: 0x00007ff88b9b1a51 r15: 0x00006000008481e0
rip: 0x000000010d79faf8 rfl: 0x0000000000010246 cr2: 0x00007ff8465e2450
Logical CPU: 6
Error Code: 0x00000006 (no mapping for user data write)
Trap Number: 14
Thread 0 instruction stream:
e1 48 8b 45 b8 48 8b 40-10 48 85 c0 4c 8b 65 c8 .H.E.H.#.H..L.e.
4c 8b 7d a8 48 8b 5d c0-41 bd 00 00 00 80 75 a6 L.}.H.].A.....u.
eb 4c 4b 8b 44 ef 10 48-85 c0 74 23 48 8b 4d d0 .LK.D..H..t#H.M.
48 8b 55 c0 48 8b 0c d1-4b 3b 4c ef 08 4c 8b 65 H.U.H...K;L..L.e
c8 74 10 48 89 08 48 8b-45 b8 4c 8b 38 eb 04 4c .t.H..H.E.L.8..L
8b 65 c8 4b 8b 44 ef 08-48 8b 4d d0 48 8b 5d c0 .e.K.D..H.M.H.].
[48]89 04 d9 4c 8b 7d a8-41 bd 00 00 00 80 ff c3 H...L.}.A....... <==
49 8b 44 24 28 48 c1 e8-03 48 39 d8 0f 87 e4 fe I.D$(H...H9.....
ff ff 48 83 c4 48 5b 41-5c 41 5d 41 5e 41 5f 5d ..H..H[A\A]A^A_]
c3 55 48 89 e5 48 89 f2-48 89 fe 48 8b 3d ae d5 .UH..H..H..H.=..
08 00 5d e9 a3 fc ff ff-55 48 89 e5 41 57 41 56 ..].....UH..AWAV
41 55 41 54 53 48 81 ec-b8 11 00 00 48 89 bd 30 AUATSH......H..0
Binary Images:
0x10d77a000 - 0x10d829fff libConfigurer64.dylib (*) <ae387cc4-9425-3323-ac9f-ba486703833b> /Applications/MAMP PRO.app/Contents/Resources/libConfigurer64.dylib
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x111626000 - 0x111691fff dyld (*) <1a6ae033-9438-33c0-8077-988fd885250a> /usr/lib/dyld
0x7ff80675e000 - 0x7ff806797fff libobjc.A.dylib (*) <7cfcdc89-2bee-3784-b7af-c676f60fe211> /usr/lib/libobjc.A.dylib
0x7ff8068ca000 - 0x7ff8068d5fff libsystem_pthread.dylib (*) <29a2750e-f31b-3630-8761-242a6bc3e99e> /usr/lib/system/libsystem_pthread.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=634.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=634.4M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
Kernel Alloc Once 8K 1
MALLOC 240.1M 38
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.0M 3
Stack 9232K 3
VM_ALLOCATE 8K 2
__DATA 31.0M 457
__DATA_CONST 27.9M 298
__DATA_DIRTY 1535K 193
__FONT_DATA 4K 1
__LINKEDIT 641.2M 10
__OBJC_RO 81.5M 1
__OBJC_RW 3120K 2
__TEXT 471.8M 501
__UNICODE 588K 1
dyld private memory 1024K 1
mapped file 28.3M 2
shared memory 44K 4
=========== ======= =======
TOTAL 1.9G 1524
TOTAL, minus reserved VM space 1.6G 1524
-----------
Full Report
-----------
{"app_name":"MAMP PRO","timestamp":"2021-10-26 12:26:16.00 +0800","app_version":"6.6","slice_uuid":"5878e976-c589-3c37-a57d-1944c5b9a8f5","build_version":"33836","platform":1,"bundleID":"de.appsolute.mamppro","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.0.1 (21A559)","incident_id":"360E81F0-70F6-4779-A485-FE8587745FEF","name":"MAMP PRO"}
{
"uptime" : 6500,
"procLaunch" : "2021-10-26 12:26:16.2837 +0800",
"procRole" : "Background",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro14,3",
"procStartAbsTime" : 6564479054579,
"coalitionID" : 1333,
"osVersion" : {
"train" : "macOS 12.0.1",
"build" : "21A559",
"releaseType" : "User"
},
"captureTime" : "2021-10-26 12:26:16.4555 +0800",
"incident" : "360E81F0-70F6-4779-A485-FE8587745FEF",
"bug_type" : "309",
"pid" : 51611,
"procExitAbsTime" : 6564650188612,
"cpuType" : "X86-64",
"procName" : "MAMP PRO",
"procPath" : "\/Applications\/MAMP PRO.app\/Contents\/MacOS\/MAMP PRO",
"bundleInfo" : {"CFBundleShortVersionString":"6.6","CFBundleVersion":"33836","CFBundleIdentifier":"de.appsolute.mamppro"},
"storeInfo" : {"deviceIdentifierForVendor":"4883B9B5-EDFA-5C8A-88FB-B55B61A3932A","thirdParty":true},
"parentProc" : "launchd",
"parentPid" : 1,
"coalitionName" : "de.appsolute.mamppro",
"crashReporterKey" : "2F9EDB7E-C40F-322A-A424-13F4D70BBC05",
"wakeTime" : 4085,
"bridgeVersion" : {"build":"14Y908","train":"3.0"},
"sleepWakeUUID" : "DF0A7272-42C0-43BE-A25D-C5F5AB3C5DF6",
"sip" : "disabled",
"vmRegionInfo" : "0x7ff8465e2450 is in 0x7ff8465e18a0-0x7ff84661bbd0; bytes after start: 2992 bytes before end: 235391\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n unused shlib __TEXT 7ff8465e1898-7ff8465e18a0 [ 8] r--\/rw- SM=COW ... this process\n---> __DATA_CONST 7ff8465e18a0-7ff84661bbd0 [ 233K] r--\/rw- SM=COW ...aunchServices\n __DATA_CONST 7ff84661bbd0-7ff846658a48 [ 244K] r--\/rw- SM=COW ...\/A\/MetalTools",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000002, 0x00007ff8465e2450","rawCodes":[2,140704309191760],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x00007ff8465e2450"},
"termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":51611},
"vmregioninfo" : "0x7ff8465e2450 is in 0x7ff8465e18a0-0x7ff84661bbd0; bytes after start: 2992 bytes before end: 235391\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n unused shlib __TEXT 7ff8465e1898-7ff8465e18a0 [ 8] r--\/rw- SM=COW ... this process\n---> __DATA_CONST 7ff8465e18a0-7ff84661bbd0 [ 233K] r--\/rw- SM=COW ...aunchServices\n __DATA_CONST 7ff84661bbd0-7ff846658a48 [ 244K] r--\/rw- SM=COW ...\/A\/MetalTools",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":187807,"instructionState":{"instructionStream":{"bytes":[225,72,139,69,184,72,139,64,16,72,133,192,76,139,101,200,76,139,125,168,72,139,93,192,65,189,0,0,0,128,117,166,235,76,75,139,68,239,16,72,133,192,116,35,72,139,77,208,72,139,85,192,72,139,12,209,75,59,76,239,8,76,139,101,200,116,16,72,137,8,72,139,69,184,76,139,56,235,4,76,139,101,200,75,139,68,239,8,72,139,77,208,72,139,93,192,72,137,4,217,76,139,125,168,65,189,0,0,0,128,255,195,73,139,68,36,40,72,193,232,3,72,57,216,15,135,228,254,255,255,72,131,196,72,91,65,92,65,93,65,94,65,95,93,195,85,72,137,229,72,137,242,72,137,254,72,139,61,174,213,8,0,93,233,163,252,255,255,85,72,137,229,65,87,65,86,65,85,65,84,83,72,129,236,184,17,0,0,72,137,189,48],"offset":96}},"threadState":{"r13":{"value":0},"rax":{"value":4521060635},"rflags":{"value":66118},"cpu":{"value":6},"r14":{"value":140705470814801},"rsi":{"value":105553162700399},"r8":{"value":0},"cr2":{"value":140704309191760},"rdx":{"value":18446744073709551615},"r10":{"value":5},"r9":{"value":2448},"r15":{"value":105553124950496},"rbx":{"value":374},"trap":{"value":14,"description":"(no mapping for user data write)"},"err":{"value":6},"r11":{"value":5},"rip":{"value":4521065208,"matchesCrashFrame":1},"rbp":{"value":140701843034272},"rsp":{"value":140701843034160},"r12":{"value":140703244068112},"rcx":{"value":140704309188768},"flavor":"x86_THREAD_STATE","rdi":{"value":140705470814816}},"queue":"com.apple.main-thread","frames":[{"imageOffset":154360,"imageIndex":0},{"imageOffset":140705427866904,"imageIndex":1},{"imageOffset":153965,"imageIndex":0},{"imageOffset":141145,"symbol":"invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long))","symbolLocation":175,"imageIndex":2},{"imageOffset":42569,"symbol":"dyld4::RuntimeState::withLoadersReadLock(void () block_pointer)","symbolLocation":41,"imageIndex":2},{"imageOffset":140890,"symbol":"dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long))","symbolLocation":116,"imageIndex":2},{"imageOffset":190419,"imageIndex":0},{"imageOffset":40046,"symbol":"load_images","symbolLocation":1546,"imageIndex":3},{"imageOffset":62492,"symbol":"dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*)","symbolLocation":170,"imageIndex":2},{"imageOffset":84989,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":167,"imageIndex":2},{"imageOffset":84971,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":149,"imageIndex":2},{"imageOffset":84971,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":149,"imageIndex":2},{"imageOffset":85164,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const","symbolLocation":108,"imageIndex":2},{"imageOffset":164654,"symbol":"dyld4::APIs::runAllInitializersForMain()","symbolLocation":222,"imageIndex":2},{"imageOffset":25432,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":3438,"imageIndex":2},{"imageOffset":21684,"symbol":"start","symbolLocation":388,"imageIndex":2}]},{"id":187837,"frames":[{"imageOffset":8204,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":187838,"frames":[{"imageOffset":8204,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "x86_64",
"base" : 4520910848,
"size" : 720896,
"uuid" : "ae387cc4-9425-3323-ac9f-ba486703833b",
"path" : "\/Applications\/MAMP PRO.app\/Contents\/Resources\/libConfigurer64.dylib",
"name" : "libConfigurer64.dylib"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 4586627072,
"size" : 442368,
"uuid" : "1a6ae033-9438-33c0-8077-988fd885250a",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "x86_64h",
"base" : 140703237005312,
"size" : 237568,
"uuid" : "7cfcdc89-2bee-3784-b7af-c676f60fe211",
"path" : "\/usr\/lib\/libobjc.A.dylib",
"name" : "libobjc.A.dylib"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 140703238496256,
"size" : 49152,
"uuid" : "29a2750e-f31b-3630-8761-242a6bc3e99e",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
}
],
"sharedCache" : {
"base" : 140703235268608,
"size" : 15213641728,
"uuid" : "3d05845f-3f65-358f-9ebf-2236e772ac01"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=634.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=634.4M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nKernel Alloc Once 8K 1 \nMALLOC 240.1M 38 \nMALLOC guard page 16K 4 \nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.0M 3 \nStack 9232K 3 \nVM_ALLOCATE 8K 2 \n__DATA 31.0M 457 \n__DATA_CONST 27.9M 298 \n__DATA_DIRTY 1535K 193 \n__FONT_DATA 4K 1 \n__LINKEDIT 641.2M 10 \n__OBJC_RO 81.5M 1 \n__OBJC_RW 3120K 2 \n__TEXT 471.8M 501 \n__UNICODE 588K 1 \ndyld private memory 1024K 1 \nmapped file 28.3M 2 \nshared memory 44K 4 \n=========== ======= ======= \nTOTAL 1.9G 1524 \nTOTAL, minus reserved VM space 1.6G 1524 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "607844aa04477260f58a8077",
"factorPackIds" : {
"SIRI_MORPHUN_ASSETS" : "60ef663fa2f864203caf575c"
},
"deploymentId" : 250000055
},
{
"rolloutId" : "60da5e84ab0ca017dace9abf",
"factorPackIds" : {
},
"deploymentId" : 250000007
},
{
"rolloutId" : "60356660bbe37970735c5624",
"factorPackIds" : {
},
"deploymentId" : 250000013
},
{
"rolloutId" : "602ad4dac86151000cf27e46",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "6164895c201f677a9a4cb9e7"
},
"deploymentId" : 250000232
},
{
"rolloutId" : "5fc94383418129005b4e9ae0",
"factorPackIds" : {
},
"deploymentId" : 250000144
},
{
"rolloutId" : "5ffde50ce2aacd000d47a95f",
"factorPackIds" : {
},
"deploymentId" : 250000063
},
{
"rolloutId" : "601d9415f79519000ccd4b69",
"factorPackIds" : {
"SIRI_TEXT_TO_SPEECH" : "61704b7f20024a1072784bb1"
},
"deploymentId" : 250000291
}
],
"experiments" : [
]
}
}
Model: MacBookPro14,3, BootROM 447.40.12.0.0, 4 processors, Quad-Core Intel Core i7, 3.1 GHz, 16 GB, SMC 2.45f5
Graphics: Intel HD Graphics 630, Intel HD Graphics 630, Built-In
Display: Color LCD, 2880 x 1800 Retina, Main, MirrorOff, Online
Graphics: Radeon Pro 560, Radeon Pro 560, PCIe, 4 GB
Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445424533303445422D45474347202020
Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445424533303445422D45474347202020
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x173), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1710.2)
AirPort:
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB30Bus
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.5
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.5

I downloaded a new version of MAMP from this site - https://appstorrent.ru/269-mamp-pro.html
turned off the ISP. Instruction here - https://appstorrent.ru/510-sip.html
And MAMP started working (MacBook Pro m1. Monterey)

I face a similar issue, though I was not using pro. I could not even launch MAMP at all without a crash and error report like yours. My report was a little different, the reason was EXC_BAD_ACCESS (SIGSEGV)
I was able to determine the issue was MAMP trying to launch using nginx instead of apache. I opened the Applications > MAMP > conf folder and deleted the nginx folder and was then able to launch MAMP. Before starting the server I switched from nginx to apache, and it has worked since.

Actually, the PRO feature of mamp isn't necessary for my personal use, but still I felt like building my host from scratch.
For those who don't want to spend time on this, try XAMPP
After some research, these are what I learned:
macOS has PHP and httpd(AKA apache) pre-installed
if you want to install the latest version you need brew installed
DIY an httpd.conf file needs some Googles, if you are not familiar with the computer and just want things to get to work, try XMAPP then.

Related

why it dumped stack twice when my linux driver failed at the second time while first time being insmod ran normally

i started learning linux driver a few days ago and i write a simple driver.fisrt i insmod my driver ,it showed it runs well ,and normal when i rmmod. but when i insmod it again, console log showed "killed", and then i use dmesg. The kernel log showed twice stackdump which surprised me so that i don't how to debug(use printk (●'◡'●)).
Many times tried on search machine, i got nothing. so i throwed it here, needing your guys help very very desperate. i truely wanna know why it failed at second time, why stackdump happened twice and how could i fix this driver. thanks very very much!
my vm linux kernel version is : 5.13.0
driver code is here:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/printk.h>
#include <linux/fs.h>
#include <linux/kdev_t.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/kobject.h>
static ssize_t my_file_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return snprintf(buf, 64, "%s", __func__);
}
static ssize_t my_file_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
pr_info("going to my_file_store\n");
return count;
}
static DEVICE_ATTR(my_file, 0664, my_file_show, my_file_store);
static int my_devid = -1;
static struct class *my_class = NULL;
static struct device *my_device = NULL;
static int __init my_init(void){
pr_info("going to %s\n", __func__);
int ret = 0;
ret = alloc_chrdev_region(&my_devid, 0, 1, "my_devid");
if(ret < 0){
my_devid = -1;
pr_err("[%s,%d]alloc_chrdev_region failed\n", __func__, __LINE__);
goto FAULT;
}
pr_info("my devid %d\n", my_devid);
my_class = class_create(THIS_MODULE, "my_class");
if(my_class == NULL){
pr_err("[%s,%d]class_create failed\n", __func__, __LINE__);
goto FAULT;
}
pr_info("[%s,%d]goes here\n", __func__, __LINE__);
my_device = device_create(my_class, NULL, my_devid, "%s", "my_dev");
if(my_device == NULL){
pr_err("[%s,%d] device_create failed\n", __func__, __LINE__);
goto FAULT;
}
pr_info("[%s,%d]goes here\n", __func__, __LINE__);
ret = device_create_file(my_device, &dev_attr_my_file);
if(ret < 0){
pr_err("sysfs_create_file failed\n");
goto FAULT;
}
pr_info("go to init tail now\n");
return 0;
FAULT:
if(my_devid != -1){
unregister_chrdev_region(my_devid, "my_devid");
my_devid = -1;
}
if(my_device != NULL){
device_destroy(my_class, my_devid);
my_device = NULL;
}
if(my_class != NULL){
class_destroy(my_class);
my_class = NULL;
}
return 0;
}
static void __exit my_exit(void){
pr_info("going to %s\n", __func__);
device_remove_file(my_device, &dev_attr_my_file);
if(my_devid != -1){
unregister_chrdev_region(my_devid, "my_devid");
my_devid = -1;
}
if(my_device != NULL){
device_destroy(my_class, my_devid);
my_device = NULL;
}
if(my_class != NULL){
class_destroy(my_class);
my_class = NULL;
}
}
module_init(my_init);
module_exit(my_exit);
MODULE_AUTHOR("tid");
MODULE_LICENSE("GPL");
this is dmesg:
going to my_init
[87682.699433] my devid 247463936
[87682.700041] [my_init,47]goes here
[87682.706933] [my_init,54]goes here
[87682.706937] go to init tail now
[87704.903499] going to my_exit
[87747.424115] going to my_init
[87747.424385] my devid 262144000
[87747.424418] [my_init,47]goes here
[87747.424784] sysfs: cannot create duplicate filename '/devices/virtual/my_class'
[87747.424989] CPU: 1 PID: 462167 Comm: insmod Tainted: G OE 5.13.0-27-generic #29~20.04.1-Ubuntu
[87747.424992] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
[87747.425172] Call Trace:
[87747.426055] dump_stack+0x7d/0x9c
[87747.427617] sysfs_warn_dup.cold+0x17/0x27
[87747.427889] sysfs_create_dir_ns+0xb8/0xd0
[87747.428703] kobject_add_internal+0xbd/0x2b0
[87747.429021] kobject_add+0x7e/0xb0
[87747.429023] ? kmem_cache_alloc_trace+0x37c/0x440
[87747.429671] get_device_parent.isra.0+0x179/0x1b0
[87747.429943] device_add+0xe3/0x8e0
[87747.429945] device_create_groups_vargs+0xd4/0xf0
[87747.429946] ? 0xffffffffc09b1000
[87747.429948] device_create+0x49/0x60
[87747.429950] my_init+0xf0/0x1000 [test]
[87747.430241] do_one_initcall+0x46/0x1d0
[87747.430632] ? __cond_resched+0x19/0x30
[87747.430866] ? kmem_cache_alloc_trace+0x37c/0x440
[87747.430869] do_init_module+0x62/0x260
[87747.430898] load_module+0x125d/0x1440
[87747.431183] __do_sys_finit_module+0xc2/0x120
[87747.431185] ? __do_sys_finit_module+0xc2/0x120
[87747.431186] __x64_sys_finit_module+0x1a/0x20
[87747.431188] do_syscall_64+0x61/0xb0
[87747.431260] ? __x64_sys_newfstat+0x16/0x20
[87747.431361] ? do_syscall_64+0x6e/0xb0
[87747.431363] ? __x64_sys_lseek+0x1a/0x20
[87747.431380] ? do_syscall_64+0x6e/0xb0
[87747.431382] ? exc_page_fault+0x8f/0x170
[87747.431383] ? asm_exc_page_fault+0x8/0x30
[87747.431385] entry_SYSCALL_64_after_hwframe+0x44/0xae
[87747.431386] RIP: 0033:0x7fd6b8d3789d
[87747.431388] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c3 f5 0c 00 f7 d8 64 89 01 48
[87747.431390] RSP: 002b:00007ffe09073bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[87747.431405] RAX: ffffffffffffffda RBX: 0000557d4fa68760 RCX: 00007fd6b8d3789d
[87747.431405] RDX: 0000000000000000 RSI: 0000557d4db48358 RDI: 0000000000000003
[87747.431406] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fd6b8e0b260
[87747.431407] R10: 0000000000000003 R11: 0000000000000246 R12: 0000557d4db48358
[87747.431407] R13: 0000000000000000 R14: 0000557d4fa683d0 R15: 0000000000000000
[87747.431503] kobject_add_internal failed for my_class with -EEXIST, don't try to register things with the same name in the same directory.
[87747.431713] [my_init,54]goes here
[87747.431749] BUG: kernel NULL pointer dereference, address: 000000000000001f
[87747.431765] #PF: supervisor read access in kernel mode
[87747.431780] #PF: error_code(0x0000) - not-present page
[87747.431819] PGD 0 P4D 0
[87747.431821] Oops: 0000 [#1] SMP NOPTI
[87747.431823] CPU: 1 PID: 462167 Comm: insmod Tainted: G OE 5.13.0-27-generic #29~20.04.1-Ubuntu
[87747.431825] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
[87747.431826] RIP: 0010:sysfs_create_file_ns+0x26/0x90
[87747.431829] Code: 9c 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 45 e0 31 c0 48 85 ff 74 5b <48> 83 7f 30 00 48 89 fb 74 51 49 89 f4 48 85 f6 74 49 49 89 d5 48
[87747.431831] RSP: 0018:ffffa39a0406fbe0 EFLAGS: 00010282
[87747.431832] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027
[87747.431833] RDX: 0000000000000000 RSI: ffffffffc09ae020 RDI: ffffffffffffffef
[87747.431834] RBP: ffffa39a0406fc08 R08: ffff8e77b9e589c0 R09: ffffa39a0406fa18
[87747.431835] R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffc09ae020
[87747.431836] R13: ffffffffffffffef R14: ffffffffc09ae040 R15: 0000000000000000
[87747.431837] FS: 00007fd6b8bf2540(0000) GS:ffff8e77b9e40000(0000) knlGS:0000000000000000
[87747.431838] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[87747.432290] CR2: 000000000000001f CR3: 000000001f4c8005 CR4: 00000000003706e0
[87747.432721] Call Trace:
[87747.432724] device_create_file+0x42/0x80
[87747.432726] ? 0xffffffffc09b1000
[87747.432728] my_init+0x141/0x1000 [test]
[87747.432730] do_one_initcall+0x46/0x1d0
[87747.432732] ? __cond_resched+0x19/0x30
[87747.432734] ? kmem_cache_alloc_trace+0x37c/0x440
[87747.432737] do_init_module+0x62/0x260
[87747.432739] load_module+0x125d/0x1440
[87747.432741] __do_sys_finit_module+0xc2/0x120
[87747.432742] ? __do_sys_finit_module+0xc2/0x120
[87747.432743] __x64_sys_finit_module+0x1a/0x20
[87747.432745] do_syscall_64+0x61/0xb0
[87747.432747] ? __x64_sys_newfstat+0x16/0x20
[87747.432749] ? do_syscall_64+0x6e/0xb0
[87747.432750] ? __x64_sys_lseek+0x1a/0x20
[87747.432752] ? do_syscall_64+0x6e/0xb0
[87747.432754] ? exc_page_fault+0x8f/0x170
[87747.432755] ? asm_exc_page_fault+0x8/0x30
[87747.432756] entry_SYSCALL_64_after_hwframe+0x44/0xae
[87747.432758] RIP: 0033:0x7fd6b8d3789d
[87747.432759] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c3 f5 0c 00 f7 d8 64 89 01 48
[87747.432760] RSP: 002b:00007ffe09073bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[87747.432762] RAX: ffffffffffffffda RBX: 0000557d4fa68760 RCX: 00007fd6b8d3789d
[87747.433030] RDX: 0000000000000000 RSI: 0000557d4db48358 RDI: 0000000000000003
[87747.433032] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fd6b8e0b260
[87747.433033] R10: 0000000000000003 R11: 0000000000000246 R12: 0000557d4db48358
[87747.433033] R13: 0000000000000000 R14: 0000557d4fa683d0 R15: 0000000000000000
[87747.433036] Modules linked in: test(OE+) vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock nls_iso8859_1 intel_rapl_msr intel_rapl_common crct10dif_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd rapl vmw_balloon snd_ens1371 snd_ac97_codec gameport ac97_bus snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi joydev input_leds serio_raw snd_seq snd_seq_device snd_timer snd soundcore vmw_vmci mac_hid sch_fq_codel vmwgfx ttm drm_kms_helper cec rc_core fb_sys_fops syscopyarea sysfillrect sysimgblt msr nfsd parport_pc auth_rpcgss ppdev nfs_acl lockd lp grace parport drm sunrpc ip_tables x_tables autofs4 hid_generic ahci e1000 libahci usbhid hid mptspi mptscsih mptbase crc32_pclmul psmouse scsi_transport_spi i2c_piix4 pata_acpi [last unloaded: test]
[87747.433869] CR2: 000000000000001f
[87747.434327] ---[ end trace d7785aaa07b44309 ]---
[87747.434352] RIP: 0010:sysfs_create_file_ns+0x26/0x90
[87747.434357] Code: 9c 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 45 e0 31 c0 48 85 ff 74 5b <48> 83 7f 30 00 48 89 fb 74 51 49 89 f4 48 85 f6 74 49 49 89 d5 48
[87747.434359] RSP: 0018:ffffa39a0406fbe0 EFLAGS: 00010282
[87747.434361] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027
[87747.434362] RDX: 0000000000000000 RSI: ffffffffc09ae020 RDI: ffffffffffffffef
[87747.434363] RBP: ffffa39a0406fc08 R08: ffff8e77b9e589c0 R09: ffffa39a0406fa18
[87747.434363] R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffc09ae020
[87747.434364] R13: ffffffffffffffef R14: ffffffffc09ae040 R15: 0000000000000000
[87747.434365] FS: 00007fd6b8bf2540(0000) GS:ffff8e77b9e40000(0000) knlGS:0000000000000000
[87747.434366] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[87747.434368] CR2: 000000000000001f CR3: 000000001f4c8005 CR4: 00000000003706e0

QtCreator doesn't open on Mac

Problem:
I need to install Qt Creator for my university course on my mac and it doesn't open. I've tried reinstalling different versions a lot of times but it gives me a Segmentation Fault everytime.
Everything else is updated to the latest Version and i don't know what to try anymore.
Any tips and solutions would be appreciated.
This is one of the error messages:
DebuggerItem \"/Applications/Xcode.app/Contents/Developer/usr/bin/lldb\" ({8999bbd1-bcb9-4fd1-843a-47fec36eb8b6}) read from \"/Users/Samy/.config/QtProject/qtcreator/debuggers.xml\" dropped since the command is not executable."
zsh: segmentation fault /Applications/Qt\ Creator.app/Contents/MacOS/Qt\ Creator
Here is the Report if I try opening the App:
Process: Qt Creator [54924]
Path: /Applications/Qt Creator.app/Contents/MacOS/Qt Creator
Identifier: org.qt-project.qtcreator
Version: 4.11.0 (4.11.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Qt Creator [54924]
User ID: 501
Date/Time: 2020-01-08 22:12:42.699 +0100
OS Version: Mac OS X 10.15 (19A602)
Report Version: 12
Anonymous UUID: 103F9158-D5E0-F1B8-BA89-222AB7C6F587
Sleep/Wake UUID: 3FB53B09-90D6-4FB8-AB3A-2D663E75701E
Time Awake Since Boot: 170000 seconds
Time Since Wake: 15000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [54924]
VM Regions Near 0:
-->
__TEXT 000000010d082000-000000010d096000 [ 80K] r-x/rwx SM=COW /Applications/Qt Creator.app/Contents/MacOS/Qt Creator
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libUtils.4.11.0.dylib 0x000000010d1ab7b0 QtPrivate::QFunctorSlotObject<Utils::FancyMainWindowPrivate::FancyMainWindowPrivate(Utils::FancyMainWindow*)::$_2, 1, QtPrivate::List<bool>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) + 48
1 org.qt-project.QtCore 0x000000010e3369b5 0x10e10f000 + 2259381
2 org.qt-project.QtWidgets 0x000000010d3f040e QAction::setChecked(bool) + 174
3 libDebugger.dylib 0x0000000114a1a2ef Utils::DebuggerMainWindow::restorePersistentSettings() + 1151
4 libDebugger.dylib 0x0000000114a19c5d Utils::DebuggerMainWindow::DebuggerMainWindow() + 925
5 libDebugger.dylib 0x0000000114a218fb Utils::Perspective::Perspective(QString const&, QString const&, QString const&, QString const&) + 267
6 libDebugger.dylib 0x0000000114a24d25 Debugger::Internal::DebuggerPluginPrivate::DebuggerPluginPrivate(QStringList const&) + 1781
7 libDebugger.dylib 0x0000000114a36747 Debugger::Internal::DebuggerPlugin::initialize(QStringList const&, QString*) + 39
8 libExtensionSystem.4.11.0.dylib 0x000000010d0cbecb ExtensionSystem::Internal::PluginSpecPrivate::initializePlugin() + 107
9 libExtensionSystem.4.11.0.dylib 0x000000010d0be6a0 ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin(ExtensionSystem::PluginSpec*, ExtensionSystem::PluginSpec::State) + 656
10 libExtensionSystem.4.11.0.dylib 0x000000010d0b6f90 ExtensionSystem::Internal::PluginManagerPrivate::loadPlugins() + 592
11 org.qt-project.qtcreator 0x000000010d08de28 main + 14520
12 libdyld.dylib 0x00007fff6e91b405 start + 1
Thread 1:
0 libsystem_pthread.dylib 0x00007fff6eb245b4 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00007fff6eb245b4 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fff6eb245b4 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x00007fff6eb245b4 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x00007fff6eb245b4 start_wqthread + 0
Thread 6:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff6ea6b7c6 __select + 10
1 com.apple.CoreFoundation 0x00007fff3764a92a __CFSocketManager + 632
2 libsystem_pthread.dylib 0x00007fff6eb27d76 _pthread_start + 125
3 libsystem_pthread.dylib 0x00007fff6eb245d7 thread_start + 15
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x00007ffee2b7cf50 rdx: 0x0000600000d5a3c0
rdi: 0x0000000000000000 rsi: 0x000060000184bba0 rbp: 0x00007ffee2b7ce70 rsp: 0x00007ffee2b7ce60
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x000000011c7d7be0 r11: 0x000000010d5461d0
r12: 0x0000600003c9bea0 r13: 0x000000011c805d40 r14: 0x0000000000000001 r15: 0x0000600000d5a3c0
rip: 0x000000010d1ab7b0 rfl: 0x0000000000010246 cr2: 0x0000000000000000
Logical CPU: 2
Error Code: 0x00000004 (no mapping for user data write)
Trap Number: 14
[Number jibberish]`enter code here`
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 114998
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=780.0M resident=0K(0%) swapped_out_or_unallocated=780.0M(100%)
Writable regions: Total=573.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=573.9M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 128K 1
Activity Tracing 256K 1
CG backing stores 248K 2
CoreImage 8K 2
CoreUI image data 72K 1
JS VM register file 4360K 4
JS VM register file (reserved) 2040K 1 reserved VM address space (unallocated)
Kernel Alloc Once 8K 1
MALLOC 167.2M 43
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.0M 7
Stack 11.0M 7
VM_ALLOCATE 132K 9
WebAssembly memory 4096K 1
__DATA 39.4M 428
__DATA_CONST 41K 3
__FONT_DATA 4K 1
__GLSLBUILTINS 5176K 1
__LINKEDIT 382.9M 106
__OBJC_RO 31.8M 1
__OBJC_RW 1764K 2
__TEXT 397.2M 410
__UNICODE 564K 1
mapped file 332.3M 43
shared memory 640K 15
=========== ======= =======
TOTAL 1.8G 1096
TOTAL, minus reserved VM space 1.4G 1096
Model: MacBookAir7,2, BootROM 190.0.0.0.0, 2 processors, Dual-Core Intel Core i5, 1,6 GHz, 8 GB, SMC 2.27f2
Graphics: kHW_IntelHDGraphics6000Item, Intel HD Graphics 6000, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x02FE, -
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x02FE, -
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.105.1 AirPortDriverBrcmNIC-1429)
Bluetooth: Version 7.0.0f8, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0128G, 121,33 GB
USB Device: USB 3.0 Bus
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 27.2

Mac Os 10.13 logs me out randomly | Help reading logs

Apparently out of the blue, I have started to experience random crashes on my Mac Pro 4.1, flashed to 5.1. It's running High Sierra 10.13.6 (17G9016), with 48Gb of Ram and two cards (one GT120 and a flashed MacVidCard Titan X Pascal). It is a soft crash in the sense that it just logs me out of my session and then I need to log in again, so it doesn't completely reboot.
However it's very annoying since I can't finish any task properly and need to reopen all the files I might be working with, which generally deal with heavy graphics (CAD applications or video editing).
I am not fluent in reading crash logs, so any help reading this one is much appreciated.
Here's the last crash log:
Process: WindowServer [144]
Path: /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
Identifier: WindowServer
Version: 600.00 (312.103.11)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
Responsible: WindowServer [144]
User ID: 88
Date/Time: 2019-11-17 18:15:12.313 +0000
OS Version: Mac OS X 10.13.6 (17G9016)
Report Version: 12
Anonymous UUID: B4B1B7C1-08E2-6A09-6684-E949A6C2D95F
Time Awake Since Boot: 230 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000016
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x16:
-->
__TEXT 0000000108ebe000-0000000108ebf000 [ 4K] r-x/rwx SM=COW [/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer]
Application Specific Information:
StartTime:2019-11-17 18:11:36
GPU:NV
MetalDevice for accelerator(0x4507): 0x7fb86ae03ef8 (MTLDevice: 0x7fb86c004800)
MetalDevice for accelerator(0x4e07): 0x7fb86d00d858 (MTLDevice: 0x7fb86c004800)
IOService:/AppleACPIPlatformExpert/PCI0#0/AppleACPIPCI/IOU0#3/IOPP/PXS1#0/NVDA,Display-B#1/NVDA
IOService:/AppleACPIPlatformExpert/PCI0#0/AppleACPIPCI/IOU1#7/IOPP/PXS2#0/NVDA,Display-A#0/NVDATesla
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libGPUSupport.dylib 0x00007fff6606b10c gpumRestoreTextureData + 60
1 libGFXShared.dylib 0x00007fff56f366d9 gfxUploadPluginTextureLevel + 111
2 GLEngine 0x00007fff57bf55e7 gleSynchronizePluginTextureLevels + 279
3 GLEngine 0x00007fff57bbfaaf gleBindFramebuffer + 321
4 GLEngine 0x00007fff57b0855c glBindFramebuffer_Exec + 142
5 com.apple.SkyLight 0x00007fff6f32ec24 CaptureSurfaceGL::CreateAndAttachTextureToFBO() + 162
6 com.apple.SkyLight 0x00007fff6f32e3d8 CaptureSurfaceGL::PrepareForPopulation(CGRect, WSPixelFormat, float, bool, CGColorSpace*, CGXDisplayDevice*, unsigned int) + 74
7 com.apple.SkyLight 0x00007fff6f444601 WSCALayerBackingUpdateFlatteningIfNeeded + 1284
8 com.apple.SkyLight 0x00007fff6f3cd2b3 CGXNextSurface + 3246
9 com.apple.SkyLight 0x00007fff6f472211 generate_layers_for_window_surfaces(CGXRedrawState*, CGXWindow*, CGSOrderOp, unsigned int, int*, WSCompositeSourceLayer**, CGSRegionObject*) + 5581
10 com.apple.SkyLight 0x00007fff6f46cca6 generate_layers_for_window(CGXRedrawState*, CGXWindow*) + 3193
11 com.apple.SkyLight 0x00007fff6f46afc1 CGXUpdateDisplay + 13505
12 com.apple.SkyLight 0x00007fff6f467882 update_display_callback(void*, double) + 257
13 com.apple.SkyLight 0x00007fff6f4ae552 run_timer_pass + 495
14 com.apple.SkyLight 0x00007fff6f4dc1c9 CGXRunOneServicesPass + 247
15 com.apple.SkyLight 0x00007fff6f4dcd84 SLXServer + 832
16 WindowServer 0x0000000108ebedde 0x108ebe000 + 3550
17 libdyld.dylib 0x00007fff75559015 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff756aa28a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff75871009 _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff75870be9 start_wqthread + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fff756a020a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff7569f724 mach_msg + 60
2 com.apple.CoreDisplay 0x00007fff4d4cb685 0x7fff4d41c000 + 718469
3 com.apple.CoreDisplay 0x00007fff4d4cb813 0x7fff4d41c000 + 718867
4 libsystem_pthread.dylib 0x00007fff75871661 _pthread_body + 340
5 libsystem_pthread.dylib 0x00007fff7587150d _pthread_start + 377
6 libsystem_pthread.dylib 0x00007fff75870bf9 thread_start + 13
Thread 3:: com.apple.coreanimation.render-server
0 libsystem_kernel.dylib 0x00007fff756a020a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff7569f724 mach_msg + 60
2 com.apple.QuartzCore 0x00007fff5890ae62 CA::Render::Server::server_thread(void*) + 870
3 com.apple.QuartzCore 0x00007fff5890aae6 thread_fun + 25
4 libsystem_pthread.dylib 0x00007fff75871661 _pthread_body + 340
5 libsystem_pthread.dylib 0x00007fff7587150d _pthread_start + 377
6 libsystem_pthread.dylib 0x00007fff75870bf9 thread_start + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff756aa28a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff75871009 _pthread_wqthread + 1035
2 libsystem_pthread.dylib 0x00007fff75870be9 start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007fb871800000 rbx: 0x00007fb86c0e8800 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x00007fb86f832a00 rsi: 0x00007fb86c0e8800 rbp: 0x00007ffee6d40380 rsp: 0x00007ffee6d40320
r8: 0x0000000000000000 r9: 0x000000016f236ee7 r10: 0x0000000000000003 r11: 0x0000000000000206
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x00007fb86f832a00
rip: 0x00007fff6606b10c rfl: 0x0000000000010246 cr2: 0x0000000000000016
Logical CPU: 4
Error Code: 0x00000004
Trap Number: 14
Binary Images:
[…]
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 3
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 318
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=380.3M resident=0K(0%) swapped_out_or_unallocated=380.3M(100%)
Writable regions: Total=1.6G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.6G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 2
CG backing stores 173.6M 139
CG framebuffers 1.0G 9
CG framebuffers (reserved) 56.1M 9 reserved VM address space (unallocated)
CG image 668K 9
CoreAnimation 64.1M 53
CoreGraphics 4K 2
Dispatch continuations 32.0M 2
Kernel Alloc Once 8K 2
MALLOC 321.3M 146
MALLOC guard page 48K 13
MALLOC_LARGE (reserved) 160K 2 reserved VM address space (unallocated)
OpenGL GLSL 256K 4
STACK GUARD 56.0M 6
Stack 10.0M 6
VM_ALLOCATE 1352K 50
__CGSERVER 4K 2
__DATA 51.1M 249
__FONT_DATA 4K 2
__GLSLBUILTINS 2588K 2
__LINKEDIT 194.5M 10
__SLSERVER 4K 2
__TEXT 185.8M 250
__UNICODE 560K 2
mapped file 25.8M 3
shared memory 180K 15
=========== ======= =======
TOTAL 2.1G 965
TOTAL, minus reserved VM space 2.1G 965

Kernel Crash with following code to clear process cache in Linux kernel

I am doing a Linux kernel module to cleanup a process cache.
Below is the code I am using to do that.
static void clear_process_cache(struct task_struct *p)
{
struct mm_struct *mm;
struct vm_area_struct *vma;
struct page *page;
char *my_page_address;
unsigned long uaddr, paddr;
long res;
unsigned int level;
pte_t *pte;
mm = p->mm;
for (vma = mm->mmap; vma; vma = vma->vm_next) {
for(uaddr = vma->vm_start; uaddr < vma->vm_end; uaddr += PAGE_SIZE) {
down_read(&p->mm->mmap_sem);
res = get_user_pages(p, mm, uaddr, 1, 0, 1, &page, NULL);
if (res == 1) {
my_page_address = kmap(page);
paddr = (unsigned long)page_address(page);
pte = lookup_address(paddr, &level);
if (pte && (pte_val(*pte) &_PAGE_PRESENT)) {
clflush_cache_range(my_page_address, PAGE_SIZE);
}
kunmap(page);
put_page(page);
}
up_read(&p->mm->mmap_sem);
}
}
}
When the code is called intensively, the Linux kernel crashed.
I checked my code, but could NOT find why it caused kernel crash.
Would you like to help on it, or is there any other high performance way to do that ??
Here is the crash dump.
[ 391.693385] general protection fault: 0000 [#1] SMP
[ 391.694435] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables vmw_vsock_vmci_transport vsock kvm_intel kvm irqbypass vmw_balloon input_leds joydev serio_raw shpchp vmw_vmci i2c_piix4 mac_hid ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper vmwgfx ablk_helper
[ 391.702930] cryptd ttm drm_kms_helper syscopyarea psmouse sysfillrect pata_acpi sysimgblt mptspi fb_sys_fops mptscsih drm mptbase vmxnet3 scsi_transport_spi floppy fjes
[ 391.705034] CPU: 3 PID: 1716 Comm: java Not tainted 4.4.131 #4
[ 391.706080] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/28/2017
[ 391.708180] task: ffff88042607c600 ti: ffff8804292b8000 task.ti: ffff8804292b8000
[ 391.709244] RIP: 0010:[<ffffffff811a34dc>] [<ffffffff811a34dc>] put_compound_page+0x5c/0x1b0
[ 391.710358] RSP: 0000:ffff8804292bbcc8 EFLAGS: 00210202
[ 391.711439] RAX: 00d0a78b4c535441 RBX: ffffffff810dc4f9 RCX: 000507e043713000
[ 391.712523] RDX: ffff8804292bbd44 RSI: 000507e043713000 RDI: ffffffff810dc4f9
[ 391.713586] RBP: ffff8804292bbcd8 R08: ffff880002213cf0 R09: 00003ffffffff000
[ 391.714653] R10: 0000000000000080 R11: 0000000000000000 R12: 00d0a78b4c535440
[ 391.715712] R13: 0000160000000000 R14: ffff8804292bbd88 R15: ffffffff810dc4f9
[ 391.716764] FS: 00007fb138d5b700(0000) GS:ffff88042d6c0000(0000) knlGS:0000000000000000
[ 391.717829] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 391.718877] CR2: 0000000000000000 CR3: 00000000351d1000 CR4: 00000000001606f0
[ 391.719972] Stack:
[ 391.720993] ffffffff810dc4f9 ffff880000000000 ffff8804292bbcf0 ffffffff811a364d
[ 391.722055] ffff8804292bbdc8 ffff8804292bbdf8 ffffffff8102e21e ffff8804292bbd48
[ 391.723122] 0000000000000000 ffff88042607c600 ffff880429e6ac00 ffff880425e9f388
[ 391.724165] Call Trace:
[ 391.725190] [<ffffffff810dc4f9>] ? vprintk_default+0x29/0x40
[ 391.726222] [<ffffffff811a364d>] put_page+0x1d/0x50
[ 391.727259] [<ffffffff8102e21e>] clear_process_cache+0x11e/0x1f0
[ 391.728298] [<ffffffff810dc4f9>] ? vprintk_default+0x29/0x40
[ 391.729318] [<ffffffff811918d0>] ? printk+0x5a/0x76
[ 391.730328] [<ffffffff8102e93d>] do_signal+0x20d/0x770
[ 391.731310] [<ffffffff81193459>] ? unlock_page+0x69/0x70
[ 391.732297] [<ffffffff811972c0>] ? __probe_kernel_read+0x40/0x90
[ 391.733271] [<ffffffff8106d3c3>] ? bad_area+0x43/0x50
[ 391.734220] [<ffffffff810034fc>] exit_to_usermode_loop+0x8c/0xd0
[ 391.735143] [<ffffffff81003c26>] prepare_exit_to_usermode+0x26/0x30
[ 391.736062] [<ffffffff8185184e>] retint_user+0x8/0x34
[ 391.736941] Code: ff 5b 41 5c 5d c3 48 89 df e8 01 f6 ff ff 48 89 df 31 f6 e8 17 76 ff ff 5b 41 5c 5d c3 48 8b 47 20 4c 8d 60 ff a8 01 4c 0f 44 e7 <41> f6 44 24 08 01 74 08 49 8b 04 24 a8 80 74 1a 48 8b 43 20 a8
[ 391.739698] RIP [<ffffffff811a34dc>] put_compound_page+0x5c/0x1b0
[ 391.740571] RSP <ffff8804292bbcc8>

Xcode keeps on crashing when indexing process starts

I'm on my latest beta on both Xcode and
Mac - macOS High Sierra 10.13 beta 7
XCode - XCode 9 beta 6
Since yesterday after updating Xcode crashes when opening my project and when indexing starts. Other answers in stack overflow do not fix the issue.
Have attached full log here
Part of Crash log as follows
Process: Xcode [665]
Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode
Identifier: Xcode
Version: 9.0 (13238.4)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [665]
User ID: 1105600005
Date/Time: 2017-08-24 07:59:26.512 +0530
OS Version: Mac OS X 10.13 (17A352a)
Report Version: 12
Bridge OS Version: 3.0 (14Y661)
Anonymous UUID: B0A9A8FC-BC57-8953-BB69-E279B3226BBF
Time Awake Since Boot: 630 seconds
System Integrity Protection: enabled
Crashed Thread: 19
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]
Application Specific Information:
ProductBuildVersion: 9M214v
mcount overflow
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff796ece76 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff796ec390 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff52083445 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff52082797 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff52081e13 CFRunLoopRunSpecific + 483
5 com.apple.HIToolbox 0x00007fff513a1876 RunCurrentEventLoopInMode + 286
6 com.apple.HIToolbox 0x00007fff513a15e6 ReceiveNextEventCommon + 613
7 com.apple.HIToolbox 0x00007fff513a1364 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8 com.apple.AppKit 0x00007fff4f69f783 _DPSNextEvent + 2085
9 com.apple.AppKit 0x00007fff4fe34688 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
10 com.apple.dt.DVTKit 0x000000010b45c8be -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
11 com.apple.AppKit 0x00007fff4f694591 -[NSApplication run] + 764
12 com.apple.AppKit 0x00007fff4f663736 NSApplicationMain + 804
13 libdyld.dylib 0x00007fff795a6145 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff796ece76 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff796ec390 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff52083445 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff52082797 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff52081e13 CFRunLoopRunSpecific + 483
5 com.apple.Foundation 0x00007fff540ec3f6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
6 com.apple.DTDeviceKitBase 0x000000011d2e94f8 +[DTDKRemoteDeviceConnection startServiceBrowsers] + 217
7 com.apple.Foundation 0x00007fff540fa6d8 __NSThread__start__ + 1197
8 libsystem_pthread.dylib 0x00007fff798306c1 _pthread_body + 340
9 libsystem_pthread.dylib 0x00007fff7983056d _pthread_start + 377
10 libsystem_pthread.dylib 0x00007fff7982fc5d thread_start + 13
0x7fff7983f000 - 0x7fff79846ff7 libsystem_symptoms.dylib (820.1.4) <24FD262C-9701-388A-AEDC-D675747F8CBD> /usr/lib/system/libsystem_symptoms.dylib
0x7fff79847000 - 0x7fff7985aff7 libsystem_trace.dylib (829.1.2) <10955EBB-1AC8-3085-9A2D-F3088CA2DF71> /usr/lib/system/libsystem_trace.dylib
0x7fff7985c000 - 0x7fff79861ff7 libunwind.dylib (35.3) <6D4FCD49-D2A9-3233-95C7-A7635CE265F2> /usr/lib/system/libunwind.dylib
0x7fff79862000 - 0x7fff7988dff7 libxpc.dylib (1205.1.10) <E7C5DB12-6D0E-3D1E-A743-F750DF112F5F> /usr/lib/system/libxpc.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 4
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 7883
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=871.0M resident=0K(0%) swapped_out_or_unallocated=871.0M(100%)
Writable regions: Total=1.6G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.6G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 384K 3
Activity Tracing 256K 2
CG backing stores 79.9M 5
CG image 1432K 57
CG raster data 104K 5
CoreAnimation 53.0M 357
CoreGraphics 8K 2
CoreImage 244K 28
CoreServices 3540K 2
CoreUI image data 4892K 30
CoreUI image file 308K 11
Dispatch continuations 16.0M 2
Foundation 348K 5
Image IO 1956K 45
JS JIT generated code 8K 3
JS JIT generated code (reserved) 1.0G 2 reserved VM address space (unallocated)
Kernel Alloc Once 8K 2
MALLOC 444.7M 110
MALLOC guard page 192K 44
MALLOC_LARGE (reserved) 7684K 3 reserved VM address space (unallocated)
Memory Tag 242 12K 2
Memory Tag 244 128K 3
Memory Tag 251 60K 3
Memory Tag 255 32K 2
SQLite page cache 4928K 11
STACK GUARD 56.1M 28
Stack 21.2M 28
VM_ALLOCATE 116K 17
WebKit Malloc 1056K 3
__DATA 79.7M 619
__FONT_DATA 4K 2
__GLSLBUILTINS 2588K 2
__LINKEDIT 264.7M 200
__TEXT 606.4M 594
__UNICODE 556K 2
libnetwork 128K 2
mapped file 228.4M 231
shared memory 704K 21
=========== ======= =======
TOTAL 2.8G 2450
TOTAL, minus reserved VM space 1.8G 2450
I would review recent changes to your .xcodeproj on the disk vs those in your repo. Xcode has crashed for me when I accidentally added a character to the xcproj file.
Use the Terminal to go back in Git history to a previous commit until you find one where indexing works.
Let it finish indexing and then go back to head.

Resources