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

[Apple ARM64] dotnet crashing when debugging in .NET 7 (7.0.100-preview.2.22101.4) #65341

Closed
WardenGnaw opened this issue Feb 14, 2022 · 34 comments · Fixed by #67118
Closed

[Apple ARM64] dotnet crashing when debugging in .NET 7 (7.0.100-preview.2.22101.4) #65341

WardenGnaw opened this issue Feb 14, 2022 · 34 comments · Fixed by #67118
Assignees
Milestone

Comments

@WardenGnaw
Copy link
Contributor

Description

dotnet is crashing when debugging a .NET 7 app. See Crash Log below.

Reproduction Steps

  1. Clean M1 machine
  2. Install version 1.64.2:https://code.visualstudio.com/download
  3. Install C# extension 1.24.0 arm64: https://github.com/OmniSharp/omnisharp-vscode/releases/download/v1.24.0/csharp-1.24.0-darwin-arm64.vsix
  4. Install SDK arm64-7.0.100-preview.2.22101.4 (runtime-7.0.0-preview.1.22076.8)
  5. Create new .NET 7.0 console application with reference to a .NET Standard class library
  6. Open the project and put breakpoint in the code, then debug.

Expected behavior

I can debug

Actual behavior

Debug failed

Regression?

Yes. This issue is not present in .NET 6.

Known Workarounds

No response

Configuration

Version: 7.0.100-preview.2.22111.4
OS: Apple M1 macOS Big Sur
Architecture: ARM64
Do you know whether it is specific to that configuration? Yes, unable to reproduce this on Windows x64 and Linux x64.

Other information

Crash Log

Process: dotnet [998]
Path: /usr/local/share/dotnet/dotnet
Identifier: dotnet
Version: 0
Code Type: ARM-64 (Native)
Parent Process: vsdbg-ui [994]
Responsible: Terminal [420]
User ID: 501

Date/Time: 2022-02-14 15:30:03.078 -0800
OS Version: macOS 11.5.2 (20G95)
Report Version: 12
Anonymous UUID: 14CA5A3C-B4A6-3B88-40BD-01545D5C2061

Time Awake Since Boot: 950 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 0x000000028034bf70
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [998]

VM Regions Near 0x28034bf70:
VM_ALLOCATE 2801f4000-280200000 [ 48K] ---/rwx SM=ZER
--> VM_ALLOCATE 280200000-280b5c000 [ 9584K] r-x/rwx SM=ZER
VM_ALLOCATE 280b5c000-280b68000 [ 48K] ---/rwx SM=ZER

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libcoreclr.dylib 0x0000000102fd539c DebuggerController::ApplyPatch(DebuggerControllerPatch*) + 92
1 libcoreclr.dylib 0x0000000102fd5398 DebuggerController::ApplyPatch(DebuggerControllerPatch*) + 88
2 libcoreclr.dylib 0x0000000102fd5ba0 DebuggerController::AddBindAndActivatePatchForMethodDesc(MethodDesc*, DebuggerJitInfo*, unsigned long, DebuggerPatchKind, FramePointer, AppDomain*) + 332
3 libcoreclr.dylib 0x0000000102fd59d8 DebuggerController::AddBindAndActivateILSlavePatch(DebuggerControllerPatch*, DebuggerJitInfo*) + 268
4 libcoreclr.dylib 0x0000000102fe15d0 Debugger::MapAndBindFunctionPatches(DebuggerJitInfo*, MethodDesc*, unsigned char const*) + 1056
5 libcoreclr.dylib 0x0000000102fe1064 Debugger::JITComplete(NativeCodeVersion, unsigned long) + 232
6 libcoreclr.dylib 0x0000000102e06e70 ReadyToRunInfo::GetEntryPoint(MethodDesc*, PrepareCodeConfig*, int) + 1004
7 libcoreclr.dylib 0x0000000102dbb164 MethodDesc::GetPrecompiledR2RCode(PrepareCodeConfig*) + 52
8 libcoreclr.dylib 0x0000000102dbae24 MethodDesc::PrepareILBasedCode(PrepareCodeConfig*) + 172
9 libcoreclr.dylib 0x0000000102d3f974 CodeVersionManager::PublishVersionableCodeIfNecessary(MethodDesc*, CallerGCMode, bool*, bool*) + 416
10 libcoreclr.dylib 0x0000000102dbe0bc MethodDesc::DoPrestub(MethodTable*, CallerGCMode) + 212
11 libcoreclr.dylib 0x0000000102dbdbb4 PreStubWorker + 556
12 libcoreclr.dylib 0x0000000102fa0350 ThePreStub + 80
13 libcoreclr.dylib 0x0000000102fa0e48 CallDescrWorkerInternal + 132
14 libcoreclr.dylib 0x0000000102e16388 MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) + 852
15 libcoreclr.dylib 0x0000000102d42f64 CorHost2::CreateAppDomainWithManager(char16_t const*, unsigned int, char16_t const*, char16_t const*, int, char16_t const**, char16_t const**, unsigned int*) + 620
16 libcoreclr.dylib 0x0000000102d015e8 coreclr_initialize + 784
17 libhostpolicy.dylib 0x00000001029615ac coreclr_t::create(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*, char const*, coreclr_property_bag_t const&, std::__1::unique_ptr<coreclr_t, std::__1::default_delete<coreclr_t> >&) + 420
18 libhostpolicy.dylib 0x000000010296f150 (anonymous namespace)::create_coreclr() + 432
19 libhostpolicy.dylib 0x000000010296ec24 corehost_main + 160
20 libhostfxr.dylib 0x00000001028fdd74 fx_muxer_t::handle_exec_host_command(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, host_startup_info_t const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::unordered_map<known_options, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, known_options_hash, std::__1::equal_to<known_options>, std::__1::allocator<std::__1::pair<known_options const, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > > > const&, int, char const**, int, host_mode_t, bool, char*, int, int*) + 1328
21 libhostfxr.dylib 0x00000001028fce50 fx_muxer_t::execute(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int, char const**, host_startup_info_t const&, char*, int, int*) + 860
22 libhostfxr.dylib 0x00000001028f9ab4 hostfxr_main_startupinfo + 152
23 dotnet 0x0000000102891654 exe_start(int, char const**) + 1176
24 dotnet 0x0000000102891804 main + 160
25 libdyld.dylib 0x00000001941f1430 start + 4

Thread 1:
0 libsystem_kernel.dylib 0x0000000194198dd4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000194199184 mach_msg + 76
2 libcoreclr.dylib 0x0000000102cff7b8 MachMessage::Receive(unsigned int) + 80
3 libcoreclr.dylib 0x0000000102cfeb38 SEHExceptionThread(void*) + 144
4 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
5 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 2:
0 libsystem_kernel.dylib 0x000000019419ed54 kevent + 8
1 libcoreclr.dylib 0x0000000102cf3a54 CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 396
2 libcoreclr.dylib 0x0000000102cf31c0 CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 140
3 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
4 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
5 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 3:
0 libsystem_kernel.dylib 0x00000001941a0f80 poll + 8
1 libcoreclr.dylib 0x000000010300595c ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void ()(char const, unsigned int)) + 184
2 libcoreclr.dylib 0x00000001030bc7ac ds_ipc_stream_factory_get_next_available_stream(void ()(char const, unsigned int)) + 908
3 libcoreclr.dylib 0x00000001030ba79c server_thread(void*) + 324
4 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
5 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
6 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 4:
0 libsystem_kernel.dylib 0x00000001941999bc read + 8
1 libcoreclr.dylib 0x0000000103006858 TwoWayPipe::Read(void*, unsigned int) + 44
2 libcoreclr.dylib 0x0000000103000b28 DbgTransportSession::TransportWorker() + 1660
3 libcoreclr.dylib 0x0000000102fff684 DbgTransportSession::TransportWorkerStatic(void*) + 12
4 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
5 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
6 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 5:
0 libsystem_kernel.dylib 0x000000019419c548 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001941d3dac _pthread_cond_wait + 1248
2 libcoreclr.dylib 0x0000000102cf1788 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 308
3 libcoreclr.dylib 0x0000000102cf13f8 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x0000000102cf550c CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x0000000102ffde9c DebuggerRCThread::MainLoop() + 208
6 libcoreclr.dylib 0x0000000102ffdd68 DebuggerRCThread::ThreadProc() + 232
7 libcoreclr.dylib 0x0000000102ffdb40 DebuggerRCThread::ThreadProcStatic(void*) + 32
8 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
9 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
10 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 6:
0 libsystem_kernel.dylib 0x000000019419c548 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001941d3dac _pthread_cond_wait + 1248
2 libcoreclr.dylib 0x0000000102cf1788 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 308
3 libcoreclr.dylib 0x0000000102cf13f8 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x0000000102cf550c CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x0000000102cf4e84 WaitForSingleObject + 76
6 libcoreclr.dylib 0x0000000102ffef34 HelperCanary::ThreadProc() + 44
7 libcoreclr.dylib 0x0000000102ffeed0 HelperCanary::ThreadProc(void*) + 64
8 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
9 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
10 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 7:
0 libsystem_kernel.dylib 0x000000019419c548 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001941d3dac _pthread_cond_wait + 1248
2 libcoreclr.dylib 0x0000000102cf176c CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 280
3 libcoreclr.dylib 0x0000000102cf13f8 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x0000000102cf550c CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x0000000102cf56ec WaitForSingleObjectEx + 80
6 libcoreclr.dylib 0x0000000102ee0128 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 192
7 libcoreclr.dylib 0x0000000102e54f00 FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 48
8 libcoreclr.dylib 0x0000000102e55118 FinalizerThread::FinalizerThreadWorker(void*) + 252
9 libcoreclr.dylib 0x0000000102de2208 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 260
10 libcoreclr.dylib 0x0000000102de27d0 ManagedThreadBase::FinalizerBase(void ()(void)) + 36
11 libcoreclr.dylib 0x0000000102e55250 FinalizerThread::FinalizerThreadStart(void*) + 88
12 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
13 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
14 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x2010000030300000 x1: 0x0000000fffffc110 x2: 0x000000012f02a4a0 x3: 0x0000000000000002
x4: 0x0000000000000000 x5: 0x0000000102d4dc54 x6: 0x0000000000000000 x7: 0x0000000000000001
x8: 0x00000000d43e0000 x9: 0x0000000000000000 x10: 0x2010000030300000 x11: 0x0000000000000000
x12: 0x00000000ffffffff x13: 0x00000000ffffffff x14: 0x000000000000002d x15: 0x0000000000000008
x16: 0x00000001941d44ec x17: 0x000000012e721320 x18: 0x0000000000000000 x19: 0x000000028034bf70
x20: 0x0000000000000001 x21: 0x00000000060009ea x22: 0x0000000000000000 x23: 0x000000012e734b40
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x000000011e6045d0 x27: 0x00000002800e0000
x28: 0x000000012f02a4a0 fp: 0x000000016d576420 lr: 0x786e800102fd5398
sp: 0x000000016d576410 pc: 0x0000000102fd539c cpsr: 0x60000000
far: 0x000000028034bf70 esr: 0x9200004f

Binary Images:
0x102888000 - 0x102893fff +dotnet (0) /usr/local/share/dotnet/dotnet
0x1028f0000 - 0x102933fff +libhostfxr.dylib (0) /usr/local/share/dotnet/host/fxr/7.0.0-preview.2.22103.2/libhostfxr.dylib
0x10295c000 - 0x102997fff +libhostpolicy.dylib (0) /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.2.22103.2/libhostpolicy.dylib
0x102bb8000 - 0x102c37fff dyld (852.2) <17D14D9B-B6B2-35DC-B157-4FD60213BE99> /usr/lib/dyld
0x102cc0000 - 0x10317ffff +libcoreclr.dylib (0) <209161BA-BE49-37B5-A3AA-BB4AD1380446> /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.2.22103.2/libcoreclr.dylib
0x104388000 - 0x104567fff +libclrjit.dylib (0) /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.2.22103.2/libclrjit.dylib
0x193f2e000 - 0x193f2ffff libsystem_blocks.dylib (79) /usr/lib/system/libsystem_blocks.dylib
0x193f30000 - 0x193f67fff libxpc.dylib (2038.120.1) <33FB2ED1-AB10-3900-BA93-5767A5086AD7> /usr/lib/system/libxpc.dylib
0x193f68000 - 0x193f7ffff libsystem_trace.dylib (1277.120.1) <59FD0CCA-0321-3A28-A2FB-80CCBDDFEC82> /usr/lib/system/libsystem_trace.dylib
0x193f80000 - 0x193ff3fff libcorecrypto.dylib (1000.140.4) /usr/lib/system/libcorecrypto.dylib
0x193ff4000 - 0x19401ffff libsystem_malloc.dylib (317.140.5) <816E435C-D24C-3EF5-8932-5B7C8EAE4AEC> /usr/lib/system/libsystem_malloc.dylib
0x194020000 - 0x194064fff libdispatch.dylib (1271.120.2) <7FAD1391-1E49-3CF2-9936-E808F815AA8F> /usr/lib/system/libdispatch.dylib
0x194065000 - 0x19409efff libobjc.A.dylib (824) <3478ECD1-A8BB-38DC-BC97-966A244DB668> /usr/lib/libobjc.A.dylib
0x19409f000 - 0x1940a1fff libsystem_featureflags.dylib (28.60.1) /usr/lib/system/libsystem_featureflags.dylib
0x1940a2000 - 0x194123fff libsystem_c.dylib (1439.141.1) <33167920-470B-366B-8EDC-C138EE669785> /usr/lib/system/libsystem_c.dylib
0x194124000 - 0x19417ffff libc++.1.dylib (905.6) <95188C52-741C-3F57-A78F-90334F6518B1> /usr/lib/libc++.1.dylib
0x194180000 - 0x194197fff libc++abi.dylib (905.6) <0EB11B11-F4A5-355E-B44C-955ADD774E61> /usr/lib/libc++abi.dylib
0x194198000 - 0x1941cbfff libsystem_kernel.dylib (7195.141.2) <1E1E6F44-01BC-3994-A907-61288C3D7BFD> /usr/lib/system/libsystem_kernel.dylib
0x1941cc000 - 0x1941d8fff libsystem_pthread.dylib (454.120.2) <85E14929-1F9B-3E79-ABDE-06EB161F9574> /usr/lib/system/libsystem_pthread.dylib
0x1941d9000 - 0x19421afff libdyld.dylib (852.2) /usr/lib/system/libdyld.dylib
0x19421b000 - 0x194221fff libsystem_platform.dylib (254.80.2) <17522FB4-6BA9-31D4-8222-699B80714CC3> /usr/lib/system/libsystem_platform.dylib
0x194222000 - 0x19424dfff libsystem_info.dylib (542.40.3) <93ED568C-DBDC-3F74-9434-834B5DF0E2EC> /usr/lib/system/libsystem_info.dylib
0x19424e000 - 0x1946fcfff com.apple.CoreFoundation (6.9 - 1777.103) <0EE241E3-3A80-3F15-AB1E-B5C18CA7E4B1> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1946fd000 - 0x194935fff com.apple.LaunchServices (1122.41 - 1122.41) <8846ED26-47F7-3C95-A12D-C0187D05059E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x194936000 - 0x194a10fff com.apple.gpusw.MetalTools (1.0 - 1) /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
0x194a11000 - 0x194c7bfff libBLAS.dylib (1336.140.1) <01B7A91B-31CB-348C-BCAE-DAF215B566C2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x194c7c000 - 0x194cc6fff com.apple.Lexicon-framework (1.0 - 86.2) <5F8A23F6-6713-3BC5-A59A-571972D88022> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
0x194cc7000 - 0x194d2afff libSparse.dylib (106) <02748559-0716-35CC-8E70-22FF91D0CE47> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
0x194d2b000 - 0x194db2fff com.apple.SystemConfiguration (1.20 - 1.20) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x194db3000 - 0x194de6fff libCRFSuite.dylib (50) /usr/lib/libCRFSuite.dylib
0x194de7000 - 0x195015fff libmecabra.dylib (929.10) /usr/lib/libmecabra.dylib
0x195016000 - 0x1953a2fff com.apple.Foundation (6.9 - 1777.103) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x1953a3000 - 0x195492fff com.apple.LanguageModeling (1.0 - 247.3) /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
0x19600a000 - 0x196370fff com.apple.security (7.0 - 59754.140.13) <6A354A87-B586-3575-B518-CA046B4A2B36> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x196371000 - 0x1965e2fff libicucore.A.dylib (66112) <17E0A41B-60CE-3DC1-9842-D6FF595C55FC> /usr/lib/libicucore.A.dylib
0x1965e3000 - 0x1965edfff libsystem_darwin.dylib (1439.141.1) <7E7806F7-0442-3280-97A1-2D6364FAF68B> /usr/lib/system/libsystem_darwin.dylib
0x1965ee000 - 0x1968e1fff com.apple.CoreServices.CarbonCore (1307.3 - 1307.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x19691e000 - 0x196959fff com.apple.CSStore (1122.41 - 1122.41) <724E19B8-926D-3BE2-8577-5B94F7F51E78> /System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore
0x19695a000 - 0x196a25fff com.apple.framework.IOKit (2.0.2 - 1845.120.6) <63CEB2C2-F60A-39BB-BEBD-0255154452CD> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x196a26000 - 0x196a31fff libsystem_notify.dylib (279.40.4) /usr/lib/system/libsystem_notify.dylib
0x197e33000 - 0x19857bfff libnetwork.dylib (2288.140.7) /usr/lib/libnetwork.dylib
0x19857c000 - 0x198a04fff com.apple.CFNetwork (1240.0.4 - 1240.0.4) <496FEA2B-9B13-3881-ADB8-AACE980425D7> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x198a05000 - 0x198a14fff libsystem_networkextension.dylib (1295.140.3) <52A5D26E-D9D2-3ECE-8015-B31B1B9F7FC9> /usr/lib/system/libsystem_networkextension.dylib
0x198a15000 - 0x198a16fff libenergytrace.dylib (22.100.1) <1BA088D7-0DAD-3F5E-80A5-5FD4E9EBEBF9> /usr/lib/libenergytrace.dylib
0x198a17000 - 0x198a69fff libMobileGestalt.dylib (978.140.1) <44B6E4D5-AC61-37AA-A775-2F89116772C2> /usr/lib/libMobileGestalt.dylib
0x198a6a000 - 0x198a81fff libsystem_asl.dylib (385) <55CF534F-17B2-3119-BCFB-A2F945CA3272> /usr/lib/system/libsystem_asl.dylib
0x198a82000 - 0x198a9bfff com.apple.TCC (1.0 - 1) <28C932A1-B171-36DC-8F03-803A53DB8865> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x199c64000 - 0x199e01fff libsqlite3.dylib (321.3) <7FD239FD-B516-37AD-8A4B-510E287523B8> /usr/lib/libsqlite3.dylib
0x199f5f000 - 0x199fd2fff com.apple.AE (918.6 - 918.6) <6747FF69-AF52-38BE-BF25-949838E4CA14> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x199fd3000 - 0x199fdafff libdns_services.dylib (1310.140.1) <2E0F76ED-EF2C-3396-83B6-A51C8B40811B> /usr/lib/libdns_services.dylib
0x199fdb000 - 0x199fe2fff libsystem_symptoms.dylib (1431.140.1) <468E8052-5144-34BE-9923-1185ADDB556B> /usr/lib/system/libsystem_symptoms.dylib
0x19a140000 - 0x19a172fff com.apple.analyticsd (1.0 - 1) <9CC64514-F654-3A1B-AECA-3F26AF210F26> /System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics
0x19a173000 - 0x19a175fff libDiagnosticMessagesClient.dylib (112) /usr/lib/libDiagnosticMessagesClient.dylib
0x19a176000 - 0x19a1c1fff com.apple.spotlight.metadata.utilities (1.0 - 2150.26) /System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities
0x19a1c2000 - 0x19a25bfff com.apple.Metadata (10.7.0 - 2150.26) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x19a25c000 - 0x19a262fff com.apple.DiskArbitration (2.7 - 2.7) <8C067552-F381-3760-AEC2-7638F5C5C5F3> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x19a263000 - 0x19a56dfff com.apple.vImage (8.1 - 544.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x19aa71000 - 0x19aa7efff com.apple.OpenDirectory (11.5 - 230.40.1) <080C6FB5-2BD5-347A-96B0-B76ACA21B2B6> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x19aa7f000 - 0x19aa9efff com.apple.CFOpenDirectory (11.5 - 230.40.1) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x19aa9f000 - 0x19aaabfff com.apple.CoreServices.FSEvents (1290.120.5 - 1290.120.5) <90A90A11-F1E7-392A-90D1-845F2E956769> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
0x19aaac000 - 0x19aacffff com.apple.coreservices.SharedFileList (144 - 144) <74989CAA-FA6B-3739-B4E9-2E6CD4F0680B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
0x19aad0000 - 0x19aad2fff libapp_launch_measurement.dylib (14.1) <933BF613-819C-33B1-9CAD-B41162C60022> /usr/lib/libapp_launch_measurement.dylib
0x19aad3000 - 0x19ab15fff com.apple.CoreAutoLayout (1.0 - 21.10.1) /System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout
0x19ab16000 - 0x19ac02fff libxml2.2.dylib (34.10) <5FAA193C-37F9-3C80-A4B4-EC335DB259F5> /usr/lib/libxml2.2.dylib
0x19be37000 - 0x19be48fff libsystem_containermanager.dylib (318.100.4) <8944B2ED-3F69-36C9-AF47-D037500AE162> /usr/lib/system/libsystem_containermanager.dylib
0x19be49000 - 0x19be5afff com.apple.IOSurface (290.8.1 - 290.8.1) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x19be5b000 - 0x19be64fff com.apple.IOAccelerator (442.9 - 442.9) <88C4B886-3B17-38C6-816A-73105C201DEE> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
0x19be65000 - 0x19bf53fff com.apple.Metal (244.303 - 244.303) <6A26D72C-978C-3174-A467-734CD0D95275> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
0x19ca50000 - 0x19cab4fff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSCore.framework/Versions/A/MPSCore
0x19cab5000 - 0x19cab9fff libsystem_configuration.dylib (1109.140.1) <0C225C5B-FF1B-3C81-B956-2FDA13DAA7DA> /usr/lib/system/libsystem_configuration.dylib
0x19caba000 - 0x19cabefff libsystem_sandbox.dylib (1441.141.1) /usr/lib/system/libsystem_sandbox.dylib
0x19cabf000 - 0x19cac0fff com.apple.AggregateDictionary (1.0 - 1) <0E5213A0-A02B-3227-9BB6-0AE5A753D380> /System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary
0x19cac1000 - 0x19cac4fff com.apple.AppleSystemInfo (3.1.5 - 3.1.5) /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo
0x19cac5000 - 0x19cac6fff liblangid.dylib (136) <1A218183-2268-3E03-B19E-ECBFD41E2087> /usr/lib/liblangid.dylib
0x19cac7000 - 0x19cb54fff com.apple.CoreNLP (1.0 - 245.2) <74F90926-0778-3E2B-AE6B-15D4CDBAEF67> /System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP
0x19cb55000 - 0x19cb5cfff com.apple.LinguisticData (1.0 - 399) <6BE62CC7-6B93-3453-98C7-478D466CDB85> /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
0x19cb5d000 - 0x19d01bfff libBNNS.dylib (288.100.5) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
0x19d01c000 - 0x19d0cafff libvDSP.dylib (760.100.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x19d0cb000 - 0x19d0ddfff com.apple.CoreEmoji (1.0 - 128.4) /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
0x19d0de000 - 0x19d0e8fff com.apple.IOMobileFramebuffer (343.0.0 - 343.0.0) <7D6FD9BF-526D-3503-82C0-F5989D1F775E> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/Versions/A/IOMobileFramebuffer
0x19d3e7000 - 0x19d46afff com.apple.securityfoundation (6.0 - 55240.40.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x19d46b000 - 0x19d474fff com.apple.coreservices.BackgroundTaskManagement (1.0 - 104) <715DCAA5-15D7-3A94-90AF-E7565176CFA8> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
0x19d475000 - 0x19d47afff com.apple.xpc.ServiceManagement (1.0 - 1) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
0x19d47b000 - 0x19d47dfff libquarantine.dylib (119.40.2) /usr/lib/system/libquarantine.dylib
0x19d47e000 - 0x19d48dfff libCheckFix.dylib (31) <94005245-B6CD-3EB8-BB36-DB87CB90B095> /usr/lib/libCheckFix.dylib
0x19d48e000 - 0x19d4a4fff libcoretls.dylib (169.100.1) <012E29AA-D57E-3BDC-9F5B-72A71B233B73> /usr/lib/libcoretls.dylib
0x19d4a5000 - 0x19d4b5fff libbsm.0.dylib (68.40.1) /usr/lib/libbsm.0.dylib
0x19d4b6000 - 0x19d4fbfff libmecab.dylib (929.10) <7E04F6C7-783D-382A-955B-7A9B2DCD5275> /usr/lib/libmecab.dylib
0x19d4fc000 - 0x19d500fff libgermantok.dylib (24) <9BEA18EA-A6FB-32FE-8A89-7D18424DC020> /usr/lib/libgermantok.dylib
0x19d501000 - 0x19d515fff libLinearAlgebra.dylib (1336.140.1) <9F3C0A4B-1971-3E3D-8288-F0A423E98CA7> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x19d516000 - 0x19d719fff com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
0x19d71a000 - 0x19d763fff com.apple.MetalPerformanceShaders.MPSRayIntersector (1.0 - 1) <56E9900D-5CAF-31BE-8F81-CE01622D6AF5> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector
0x19d764000 - 0x19d8b6fff com.apple.MLCompute (1.0 - 1) /System/Library/Frameworks/MLCompute.framework/Versions/A/MLCompute
0x19d8b7000 - 0x19d8e5fff com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) <20C8225F-91A3-31B8-9546-CFDFE3C5CDEF> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
0x19d8e6000 - 0x19d938fff com.apple.MetalPerformanceShaders.MPSNDArray (1.0 - 1) <9F7CB9CE-FCFF-35C9-A7BE-3A2908F60C0B> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray
0x19d939000 - 0x19d9c0fff com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) <59B7BDE6-55F8-3D98-A91D-68DC9FC01573> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSImage.framework/Versions/A/MPSImage
0x19d9c1000 - 0x19d9d0fff com.apple.AppleFSCompression (125 - 1.0) <35F56F2F-1053-3EE4-9DEE-C8805AD528E8> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
0x19d9d1000 - 0x19d9ddfff libbz2.1.0.dylib (44) <452F7FC4-4CD9-33E4-83DB-9B3535010FFC> /usr/lib/libbz2.1.0.dylib
0x19d9de000 - 0x19d9e2fff libsystem_coreservices.dylib (127.1) /usr/lib/system/libsystem_coreservices.dylib
0x19d9e3000 - 0x19da13fff com.apple.CoreServices.OSServices (1122.41 - 1122.41) <6A662259-7AEA-360D-98F5-75EF8E3EC54E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x19dbc8000 - 0x19dbd9fff libz.1.dylib (76) <9DC30F4E-5C37-387C-A16C-A72165922DCC> /usr/lib/libz.1.dylib
0x19dbda000 - 0x19dc07fff libsystem_m.dylib (3186.100.3) /usr/lib/system/libsystem_m.dylib
0x19dc08000 - 0x19dc08fff libcharset.1.dylib (59) <6EA647D8-9615-3AA2-A239-8654E0531E04> /usr/lib/libcharset.1.dylib
0x19dc09000 - 0x19dc0efff libmacho.dylib (980) <0C537BDB-09A5-35F9-9671-0CD7DDED7AB9> /usr/lib/system/libmacho.dylib
0x19dc0f000 - 0x19dc26fff libkxld.dylib (7195.141.2) /usr/lib/system/libkxld.dylib
0x19dc27000 - 0x19dc34fff libcommonCrypto.dylib (60178.120.3) <8AAE1B05-7102-3A67-900E-DF0ACA311EC7> /usr/lib/system/libcommonCrypto.dylib
0x19dc35000 - 0x19dc3ffff libunwind.dylib (201) <1680DD5C-83DD-3A6A-91E8-CE7F4FDF4115> /usr/lib/system/libunwind.dylib
0x19dc40000 - 0x19dc47fff liboah.dylib (203.58) <422ADBB4-0DBD-302E-9740-8B5DB64DF0E1> /usr/lib/liboah.dylib
0x19dc48000 - 0x19dc50fff libcopyfile.dylib (173.40.2) <33FAED67-D5CD-3F2E-8C01-6125EFDA3520> /usr/lib/system/libcopyfile.dylib
0x19dc51000 - 0x19dc54fff libcompiler_rt.dylib (102.2) <10EE20DC-7B0B-3C93-A5C3-B2E35EA95FC1> /usr/lib/system/libcompiler_rt.dylib
0x19dc55000 - 0x19dc57fff libsystem_collections.dylib (1439.141.1) <16EBECBE-D09F-3612-BCCB-26EF80D6AC65> /usr/lib/system/libsystem_collections.dylib
0x19dc58000 - 0x19dc5afff libsystem_secinit.dylib (87.60.1) <8547C446-2A1B-355E-B0A0-1E7752C9EED1> /usr/lib/system/libsystem_secinit.dylib
0x19dc5b000 - 0x19dc5dfff libremovefile.dylib (49.120.1) <1A67C38F-ECC9-3B6C-8F26-2CB92E2FF075> /usr/lib/system/libremovefile.dylib
0x19dc5e000 - 0x19dc5efff libkeymgr.dylib (31) /usr/lib/system/libkeymgr.dylib
0x19dc5f000 - 0x19dc67fff libsystem_dnssd.dylib (1310.140.1) <9E4E2718-1F40-34F3-AC57-A225FB01926F> /usr/lib/system/libsystem_dnssd.dylib
0x19dc68000 - 0x19dc6dfff libcache.dylib (83) <49C0CF24-F396-3250-A254-C90E8C60134C> /usr/lib/system/libcache.dylib
0x19dc6e000 - 0x19dc6ffff libSystem.B.dylib (1292.120.1) /usr/lib/libSystem.B.dylib
0x19dc70000 - 0x19dc73fff libfakelink.dylib (3) /usr/lib/libfakelink.dylib
0x19dc74000 - 0x19dc74fff com.apple.SoftLinking (1.0 - 1) /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking
0x19dc75000 - 0x19dcb0fff libpcap.A.dylib (98.100.3) /usr/lib/libpcap.A.dylib
0x19dcb1000 - 0x19dda6fff libiconv.2.dylib (59) <4BF0362D-E9AF-3794-9E7E-40F07D845229> /usr/lib/libiconv.2.dylib
0x19dda7000 - 0x19ddb9fff libcmph.dylib (8) <826E544C-8026-3F4A-BA90-41C2372608AE> /usr/lib/libcmph.dylib
0x19ddba000 - 0x19de2afff libarchive.2.dylib (83.100.2) <7CC6F0E0-7E0D-30DD-9F66-282E90F54C32> /usr/lib/libarchive.2.dylib
0x19de2b000 - 0x19de9bfff com.apple.SearchKit (1.4.1 - 1.4.1) <639851B8-C3A5-31F5-BE46-D5F0E87C3109> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x19de9c000 - 0x19de9dfff libThaiTokenizer.dylib (3) /usr/lib/libThaiTokenizer.dylib
0x19de9e000 - 0x19dec2fff com.apple.applesauce (1.0 - 16.28) <928E86D6-05A4-3C4E-9733-48F0D936B10A> /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
0x19dec3000 - 0x19ded9fff libapple_nghttp2.dylib (1.41) <18AA1475-8D4D-3DEA-A8AD-C6A0FC6B92AA> /usr/lib/libapple_nghttp2.dylib
0x19deda000 - 0x19deecfff libSparseBLAS.dylib (1336.140.1) <31D093A9-02BC-3365-9171-6BEDEF6AE67D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
0x19deed000 - 0x19deeefff com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) <23F6F104-EE6C-3BE9-A1D4-EDECF349F3D7> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
0x19deef000 - 0x19def3fff libpam.2.dylib (28.40.1) /usr/lib/libpam.2.dylib
0x19def4000 - 0x19df12fff libcompression.dylib (96.120.1) /usr/lib/libcompression.dylib
0x19df13000 - 0x19df17fff libQuadrature.dylib (7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
0x19df18000 - 0x19e3d4fff libLAPACK.dylib (1336.140.1) <90E16293-8B02-3B28-A7C2-B6FAD0EFF8B1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x19e3d5000 - 0x19e427fff com.apple.DictionaryServices (1.2 - 341) <9B09DFAC-4B3A-3047-9BF5-B324C1BB5930> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x19e428000 - 0x19e440fff liblzma.5.dylib (16) /usr/lib/liblzma.5.dylib
0x19e441000 - 0x19e442fff libcoretls_cfhelpers.dylib (169.100.1) <212C432C-7BBE-32BA-8104-E20AA4EB8053> /usr/lib/libcoretls_cfhelpers.dylib
0x19e443000 - 0x19e527fff com.apple.APFS (1677.141.1 - 1677.141.1) <7DAB2F49-0C29-35B7-9A3B-E5CE948C7C18> /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
0x19e528000 - 0x19e535fff libxar.1.dylib (452) /usr/lib/libxar.1.dylib
0x19e536000 - 0x19e539fff libutil.dylib (58.40.2) <060B245B-5DDF-38B9-87F5-AD158328EF6C> /usr/lib/libutil.dylib
0x19e53a000 - 0x19e563fff libxslt.1.dylib (17.6) <71A3CDF8-9C33-3C16-9F0B-95BAE843E5C6> /usr/lib/libxslt.1.dylib
0x19e564000 - 0x19e56efff libChineseTokenizer.dylib (37.1) <1C21D68B-E453-305A-B85B-BC082FC6BECD> /usr/lib/libChineseTokenizer.dylib
0x19e56f000 - 0x19e5defff libvMisc.dylib (760.100.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x1a1091000 - 0x1a1091fff liblaunch.dylib (2038.120.1) <86FD9379-882E-3603-9AC1-1B550DB2877D> /usr/lib/system/liblaunch.dylib
0x1a3545000 - 0x1a3545fff libsystem_product_info_filter.dylib (8.40.1) <737F7B93-4291-31F6-AB14-7C6EFB368E4F> /usr/lib/system/libsystem_product_info_filter.dylib
0x1a3618000 - 0x1a3618fff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <947CDAD5-05F9-3A69-9CB5-C40B3D1AE694> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x1a363a000 - 0x1a363afff com.apple.CoreServices (1122.41 - 1122.41) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x1a37f7000 - 0x1a37f7fff com.apple.Accelerate (1.11 - Accelerate 1.11) <735D582E-3502-3F6A-B0E0-3D7B963D0BF9> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x1d6286000 - 0x1d628cfff libCoreFSCache.dylib (200.10) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
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: 3
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=575.6M resident=0K(0%) swapped_out_or_unallocated=575.6M(100%)
Writable regions: Total=305.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=305.9M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 32K 1
MALLOC 52.1M 16
MALLOC guard page 96K 5
MALLOC_MEDIUM (reserved) 240.0M 2 reserved VM address space (unallocated)
STACK GUARD 56.1M 8
Stack 11.7M 8
VM_ALLOCATE 2.5G 29
VM_ALLOCATE (reserved) 64K 1 reserved VM address space (unallocated)
__AUTH 250K 50
__AUTH_CONST 3402K 135
__DATA 1515K 133
__DATA_CONST 4232K 138
__DATA_DIRTY 312K 61
__LINKEDIT 492.4M 8
__OBJC_CONST 421K 39
__OBJC_RO 75.1M 1
__OBJC_RW 2576K 1
__TEXT 83.3M 148
__UNICODE 588K 1
mapped file 13.9M 4
shared memory 16K 1
=========== ======= =======
TOTAL 3.5G 790
TOTAL, minus reserved VM space 3.3G 790

Model: Macmini9,1, BootROM 6723.140.2, proc 8:4:4 processors, 8 GB, SMC
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: LPDDR4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Jul 7 2021 00:48:27 version 18.50.40.10.7.8.121 FWID 01-f5ad2691
Bluetooth: Version 8.0.5d7, 3 services, 25 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
USB Device: USB 3.1 Bus
USB Device: USB 3.1 Bus
USB Device: USB 3.0 Bus
USB Device: USB Receiver
Thunderbolt Bus: Mac mini, Apple Inc.
Thunderbolt Bus: Mac mini, Apple Inc.

Related: microsoft/vscode#142822

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Feb 14, 2022
@ghost
Copy link

ghost commented Feb 15, 2022

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

dotnet is crashing when debugging a .NET 7 app. See Crash Log below.

Reproduction Steps

  1. Clean M1 machine
  2. Install version 1.64.2:https://code.visualstudio.com/download
  3. Install C# extension 1.24.0 arm64: https://github.com/OmniSharp/omnisharp-vscode/releases/download/v1.24.0/csharp-1.24.0-darwin-arm64.vsix
  4. Install SDK arm64-7.0.100-preview.2.22101.4 (runtime-7.0.0-preview.1.22076.8)
  5. Create new .NET 7.0 console application with reference to a .NET Standard class library
  6. Open the project and put breakpoint in the code, then debug.

Expected behavior

I can debug

Actual behavior

Debug failed

Regression?

Yes. This issue is not present in .NET 6.

Known Workarounds

No response

Configuration

Version: 7.0.100-preview.2.22111.4
OS: Apple M1 macOS Big Sur
Architecture: ARM64
Do you know whether it is specific to that configuration? Yes, unable to reproduce this on Windows x64 and Linux x64.

Other information

Crash Log

Process: dotnet [998]
Path: /usr/local/share/dotnet/dotnet
Identifier: dotnet
Version: 0
Code Type: ARM-64 (Native)
Parent Process: vsdbg-ui [994]
Responsible: Terminal [420]
User ID: 501

Date/Time: 2022-02-14 15:30:03.078 -0800
OS Version: macOS 11.5.2 (20G95)
Report Version: 12
Anonymous UUID: 14CA5A3C-B4A6-3B88-40BD-01545D5C2061

Time Awake Since Boot: 950 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 0x000000028034bf70
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [998]

VM Regions Near 0x28034bf70:
VM_ALLOCATE 2801f4000-280200000 [ 48K] ---/rwx SM=ZER
--> VM_ALLOCATE 280200000-280b5c000 [ 9584K] r-x/rwx SM=ZER
VM_ALLOCATE 280b5c000-280b68000 [ 48K] ---/rwx SM=ZER

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libcoreclr.dylib 0x0000000102fd539c DebuggerController::ApplyPatch(DebuggerControllerPatch*) + 92
1 libcoreclr.dylib 0x0000000102fd5398 DebuggerController::ApplyPatch(DebuggerControllerPatch*) + 88
2 libcoreclr.dylib 0x0000000102fd5ba0 DebuggerController::AddBindAndActivatePatchForMethodDesc(MethodDesc*, DebuggerJitInfo*, unsigned long, DebuggerPatchKind, FramePointer, AppDomain*) + 332
3 libcoreclr.dylib 0x0000000102fd59d8 DebuggerController::AddBindAndActivateILSlavePatch(DebuggerControllerPatch*, DebuggerJitInfo*) + 268
4 libcoreclr.dylib 0x0000000102fe15d0 Debugger::MapAndBindFunctionPatches(DebuggerJitInfo*, MethodDesc*, unsigned char const*) + 1056
5 libcoreclr.dylib 0x0000000102fe1064 Debugger::JITComplete(NativeCodeVersion, unsigned long) + 232
6 libcoreclr.dylib 0x0000000102e06e70 ReadyToRunInfo::GetEntryPoint(MethodDesc*, PrepareCodeConfig*, int) + 1004
7 libcoreclr.dylib 0x0000000102dbb164 MethodDesc::GetPrecompiledR2RCode(PrepareCodeConfig*) + 52
8 libcoreclr.dylib 0x0000000102dbae24 MethodDesc::PrepareILBasedCode(PrepareCodeConfig*) + 172
9 libcoreclr.dylib 0x0000000102d3f974 CodeVersionManager::PublishVersionableCodeIfNecessary(MethodDesc*, CallerGCMode, bool*, bool*) + 416
10 libcoreclr.dylib 0x0000000102dbe0bc MethodDesc::DoPrestub(MethodTable*, CallerGCMode) + 212
11 libcoreclr.dylib 0x0000000102dbdbb4 PreStubWorker + 556
12 libcoreclr.dylib 0x0000000102fa0350 ThePreStub + 80
13 libcoreclr.dylib 0x0000000102fa0e48 CallDescrWorkerInternal + 132
14 libcoreclr.dylib 0x0000000102e16388 MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) + 852
15 libcoreclr.dylib 0x0000000102d42f64 CorHost2::CreateAppDomainWithManager(char16_t const*, unsigned int, char16_t const*, char16_t const*, int, char16_t const**, char16_t const**, unsigned int*) + 620
16 libcoreclr.dylib 0x0000000102d015e8 coreclr_initialize + 784
17 libhostpolicy.dylib 0x00000001029615ac coreclr_t::create(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*, char const*, coreclr_property_bag_t const&, std::__1::unique_ptr<coreclr_t, std::__1::default_delete<coreclr_t> >&) + 420
18 libhostpolicy.dylib 0x000000010296f150 (anonymous namespace)::create_coreclr() + 432
19 libhostpolicy.dylib 0x000000010296ec24 corehost_main + 160
20 libhostfxr.dylib 0x00000001028fdd74 fx_muxer_t::handle_exec_host_command(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, host_startup_info_t const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::unordered_map<known_options, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, known_options_hash, std::__1::equal_to<known_options>, std::__1::allocator<std::__1::pair<known_options const, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > > > const&, int, char const**, int, host_mode_t, bool, char*, int, int*) + 1328
21 libhostfxr.dylib 0x00000001028fce50 fx_muxer_t::execute(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, int, char const**, host_startup_info_t const&, char*, int, int*) + 860
22 libhostfxr.dylib 0x00000001028f9ab4 hostfxr_main_startupinfo + 152
23 dotnet 0x0000000102891654 exe_start(int, char const**) + 1176
24 dotnet 0x0000000102891804 main + 160
25 libdyld.dylib 0x00000001941f1430 start + 4

Thread 1:
0 libsystem_kernel.dylib 0x0000000194198dd4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000194199184 mach_msg + 76
2 libcoreclr.dylib 0x0000000102cff7b8 MachMessage::Receive(unsigned int) + 80
3 libcoreclr.dylib 0x0000000102cfeb38 SEHExceptionThread(void*) + 144
4 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
5 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 2:
0 libsystem_kernel.dylib 0x000000019419ed54 kevent + 8
1 libcoreclr.dylib 0x0000000102cf3a54 CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 396
2 libcoreclr.dylib 0x0000000102cf31c0 CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 140
3 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
4 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
5 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 3:
0 libsystem_kernel.dylib 0x00000001941a0f80 poll + 8
1 libcoreclr.dylib 0x000000010300595c ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void ()(char const, unsigned int)) + 184
2 libcoreclr.dylib 0x00000001030bc7ac ds_ipc_stream_factory_get_next_available_stream(void ()(char const, unsigned int)) + 908
3 libcoreclr.dylib 0x00000001030ba79c server_thread(void*) + 324
4 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
5 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
6 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 4:
0 libsystem_kernel.dylib 0x00000001941999bc read + 8
1 libcoreclr.dylib 0x0000000103006858 TwoWayPipe::Read(void*, unsigned int) + 44
2 libcoreclr.dylib 0x0000000103000b28 DbgTransportSession::TransportWorker() + 1660
3 libcoreclr.dylib 0x0000000102fff684 DbgTransportSession::TransportWorkerStatic(void*) + 12
4 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
5 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
6 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 5:
0 libsystem_kernel.dylib 0x000000019419c548 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001941d3dac _pthread_cond_wait + 1248
2 libcoreclr.dylib 0x0000000102cf1788 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 308
3 libcoreclr.dylib 0x0000000102cf13f8 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x0000000102cf550c CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x0000000102ffde9c DebuggerRCThread::MainLoop() + 208
6 libcoreclr.dylib 0x0000000102ffdd68 DebuggerRCThread::ThreadProc() + 232
7 libcoreclr.dylib 0x0000000102ffdb40 DebuggerRCThread::ThreadProcStatic(void*) + 32
8 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
9 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
10 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 6:
0 libsystem_kernel.dylib 0x000000019419c548 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001941d3dac _pthread_cond_wait + 1248
2 libcoreclr.dylib 0x0000000102cf1788 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 308
3 libcoreclr.dylib 0x0000000102cf13f8 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x0000000102cf550c CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x0000000102cf4e84 WaitForSingleObject + 76
6 libcoreclr.dylib 0x0000000102ffef34 HelperCanary::ThreadProc() + 44
7 libcoreclr.dylib 0x0000000102ffeed0 HelperCanary::ThreadProc(void*) + 64
8 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
9 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
10 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 7:
0 libsystem_kernel.dylib 0x000000019419c548 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001941d3dac _pthread_cond_wait + 1248
2 libcoreclr.dylib 0x0000000102cf176c CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 280
3 libcoreclr.dylib 0x0000000102cf13f8 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x0000000102cf550c CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x0000000102cf56ec WaitForSingleObjectEx + 80
6 libcoreclr.dylib 0x0000000102ee0128 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 192
7 libcoreclr.dylib 0x0000000102e54f00 FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 48
8 libcoreclr.dylib 0x0000000102e55118 FinalizerThread::FinalizerThreadWorker(void*) + 252
9 libcoreclr.dylib 0x0000000102de2208 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 260
10 libcoreclr.dylib 0x0000000102de27d0 ManagedThreadBase::FinalizerBase(void ()(void)) + 36
11 libcoreclr.dylib 0x0000000102e55250 FinalizerThread::FinalizerThreadStart(void*) + 88
12 libcoreclr.dylib 0x0000000102cfc6dc CorUnix::CPalThread::ThreadEntry(void*) + 380
13 libsystem_pthread.dylib 0x00000001941d3878 _pthread_start + 320
14 libsystem_pthread.dylib 0x00000001941ce5e0 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x2010000030300000 x1: 0x0000000fffffc110 x2: 0x000000012f02a4a0 x3: 0x0000000000000002
x4: 0x0000000000000000 x5: 0x0000000102d4dc54 x6: 0x0000000000000000 x7: 0x0000000000000001
x8: 0x00000000d43e0000 x9: 0x0000000000000000 x10: 0x2010000030300000 x11: 0x0000000000000000
x12: 0x00000000ffffffff x13: 0x00000000ffffffff x14: 0x000000000000002d x15: 0x0000000000000008
x16: 0x00000001941d44ec x17: 0x000000012e721320 x18: 0x0000000000000000 x19: 0x000000028034bf70
x20: 0x0000000000000001 x21: 0x00000000060009ea x22: 0x0000000000000000 x23: 0x000000012e734b40
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x000000011e6045d0 x27: 0x00000002800e0000
x28: 0x000000012f02a4a0 fp: 0x000000016d576420 lr: 0x786e800102fd5398
sp: 0x000000016d576410 pc: 0x0000000102fd539c cpsr: 0x60000000
far: 0x000000028034bf70 esr: 0x9200004f

Binary Images:
0x102888000 - 0x102893fff +dotnet (0) /usr/local/share/dotnet/dotnet
0x1028f0000 - 0x102933fff +libhostfxr.dylib (0) /usr/local/share/dotnet/host/fxr/7.0.0-preview.2.22103.2/libhostfxr.dylib
0x10295c000 - 0x102997fff +libhostpolicy.dylib (0) /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.2.22103.2/libhostpolicy.dylib
0x102bb8000 - 0x102c37fff dyld (852.2) <17D14D9B-B6B2-35DC-B157-4FD60213BE99> /usr/lib/dyld
0x102cc0000 - 0x10317ffff +libcoreclr.dylib (0) <209161BA-BE49-37B5-A3AA-BB4AD1380446> /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.2.22103.2/libcoreclr.dylib
0x104388000 - 0x104567fff +libclrjit.dylib (0) /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.2.22103.2/libclrjit.dylib
0x193f2e000 - 0x193f2ffff libsystem_blocks.dylib (79) /usr/lib/system/libsystem_blocks.dylib
0x193f30000 - 0x193f67fff libxpc.dylib (2038.120.1) <33FB2ED1-AB10-3900-BA93-5767A5086AD7> /usr/lib/system/libxpc.dylib
0x193f68000 - 0x193f7ffff libsystem_trace.dylib (1277.120.1) <59FD0CCA-0321-3A28-A2FB-80CCBDDFEC82> /usr/lib/system/libsystem_trace.dylib
0x193f80000 - 0x193ff3fff libcorecrypto.dylib (1000.140.4) /usr/lib/system/libcorecrypto.dylib
0x193ff4000 - 0x19401ffff libsystem_malloc.dylib (317.140.5) <816E435C-D24C-3EF5-8932-5B7C8EAE4AEC> /usr/lib/system/libsystem_malloc.dylib
0x194020000 - 0x194064fff libdispatch.dylib (1271.120.2) <7FAD1391-1E49-3CF2-9936-E808F815AA8F> /usr/lib/system/libdispatch.dylib
0x194065000 - 0x19409efff libobjc.A.dylib (824) <3478ECD1-A8BB-38DC-BC97-966A244DB668> /usr/lib/libobjc.A.dylib
0x19409f000 - 0x1940a1fff libsystem_featureflags.dylib (28.60.1) /usr/lib/system/libsystem_featureflags.dylib
0x1940a2000 - 0x194123fff libsystem_c.dylib (1439.141.1) <33167920-470B-366B-8EDC-C138EE669785> /usr/lib/system/libsystem_c.dylib
0x194124000 - 0x19417ffff libc++.1.dylib (905.6) <95188C52-741C-3F57-A78F-90334F6518B1> /usr/lib/libc++.1.dylib
0x194180000 - 0x194197fff libc++abi.dylib (905.6) <0EB11B11-F4A5-355E-B44C-955ADD774E61> /usr/lib/libc++abi.dylib
0x194198000 - 0x1941cbfff libsystem_kernel.dylib (7195.141.2) <1E1E6F44-01BC-3994-A907-61288C3D7BFD> /usr/lib/system/libsystem_kernel.dylib
0x1941cc000 - 0x1941d8fff libsystem_pthread.dylib (454.120.2) <85E14929-1F9B-3E79-ABDE-06EB161F9574> /usr/lib/system/libsystem_pthread.dylib
0x1941d9000 - 0x19421afff libdyld.dylib (852.2) /usr/lib/system/libdyld.dylib
0x19421b000 - 0x194221fff libsystem_platform.dylib (254.80.2) <17522FB4-6BA9-31D4-8222-699B80714CC3> /usr/lib/system/libsystem_platform.dylib
0x194222000 - 0x19424dfff libsystem_info.dylib (542.40.3) <93ED568C-DBDC-3F74-9434-834B5DF0E2EC> /usr/lib/system/libsystem_info.dylib
0x19424e000 - 0x1946fcfff com.apple.CoreFoundation (6.9 - 1777.103) <0EE241E3-3A80-3F15-AB1E-B5C18CA7E4B1> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1946fd000 - 0x194935fff com.apple.LaunchServices (1122.41 - 1122.41) <8846ED26-47F7-3C95-A12D-C0187D05059E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x194936000 - 0x194a10fff com.apple.gpusw.MetalTools (1.0 - 1) /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
0x194a11000 - 0x194c7bfff libBLAS.dylib (1336.140.1) <01B7A91B-31CB-348C-BCAE-DAF215B566C2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x194c7c000 - 0x194cc6fff com.apple.Lexicon-framework (1.0 - 86.2) <5F8A23F6-6713-3BC5-A59A-571972D88022> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
0x194cc7000 - 0x194d2afff libSparse.dylib (106) <02748559-0716-35CC-8E70-22FF91D0CE47> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
0x194d2b000 - 0x194db2fff com.apple.SystemConfiguration (1.20 - 1.20) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x194db3000 - 0x194de6fff libCRFSuite.dylib (50) /usr/lib/libCRFSuite.dylib
0x194de7000 - 0x195015fff libmecabra.dylib (929.10) /usr/lib/libmecabra.dylib
0x195016000 - 0x1953a2fff com.apple.Foundation (6.9 - 1777.103) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x1953a3000 - 0x195492fff com.apple.LanguageModeling (1.0 - 247.3) /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
0x19600a000 - 0x196370fff com.apple.security (7.0 - 59754.140.13) <6A354A87-B586-3575-B518-CA046B4A2B36> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x196371000 - 0x1965e2fff libicucore.A.dylib (66112) <17E0A41B-60CE-3DC1-9842-D6FF595C55FC> /usr/lib/libicucore.A.dylib
0x1965e3000 - 0x1965edfff libsystem_darwin.dylib (1439.141.1) <7E7806F7-0442-3280-97A1-2D6364FAF68B> /usr/lib/system/libsystem_darwin.dylib
0x1965ee000 - 0x1968e1fff com.apple.CoreServices.CarbonCore (1307.3 - 1307.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x19691e000 - 0x196959fff com.apple.CSStore (1122.41 - 1122.41) <724E19B8-926D-3BE2-8577-5B94F7F51E78> /System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore
0x19695a000 - 0x196a25fff com.apple.framework.IOKit (2.0.2 - 1845.120.6) <63CEB2C2-F60A-39BB-BEBD-0255154452CD> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x196a26000 - 0x196a31fff libsystem_notify.dylib (279.40.4) /usr/lib/system/libsystem_notify.dylib
0x197e33000 - 0x19857bfff libnetwork.dylib (2288.140.7) /usr/lib/libnetwork.dylib
0x19857c000 - 0x198a04fff com.apple.CFNetwork (1240.0.4 - 1240.0.4) <496FEA2B-9B13-3881-ADB8-AACE980425D7> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x198a05000 - 0x198a14fff libsystem_networkextension.dylib (1295.140.3) <52A5D26E-D9D2-3ECE-8015-B31B1B9F7FC9> /usr/lib/system/libsystem_networkextension.dylib
0x198a15000 - 0x198a16fff libenergytrace.dylib (22.100.1) <1BA088D7-0DAD-3F5E-80A5-5FD4E9EBEBF9> /usr/lib/libenergytrace.dylib
0x198a17000 - 0x198a69fff libMobileGestalt.dylib (978.140.1) <44B6E4D5-AC61-37AA-A775-2F89116772C2> /usr/lib/libMobileGestalt.dylib
0x198a6a000 - 0x198a81fff libsystem_asl.dylib (385) <55CF534F-17B2-3119-BCFB-A2F945CA3272> /usr/lib/system/libsystem_asl.dylib
0x198a82000 - 0x198a9bfff com.apple.TCC (1.0 - 1) <28C932A1-B171-36DC-8F03-803A53DB8865> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x199c64000 - 0x199e01fff libsqlite3.dylib (321.3) <7FD239FD-B516-37AD-8A4B-510E287523B8> /usr/lib/libsqlite3.dylib
0x199f5f000 - 0x199fd2fff com.apple.AE (918.6 - 918.6) <6747FF69-AF52-38BE-BF25-949838E4CA14> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x199fd3000 - 0x199fdafff libdns_services.dylib (1310.140.1) <2E0F76ED-EF2C-3396-83B6-A51C8B40811B> /usr/lib/libdns_services.dylib
0x199fdb000 - 0x199fe2fff libsystem_symptoms.dylib (1431.140.1) <468E8052-5144-34BE-9923-1185ADDB556B> /usr/lib/system/libsystem_symptoms.dylib
0x19a140000 - 0x19a172fff com.apple.analyticsd (1.0 - 1) <9CC64514-F654-3A1B-AECA-3F26AF210F26> /System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics
0x19a173000 - 0x19a175fff libDiagnosticMessagesClient.dylib (112) /usr/lib/libDiagnosticMessagesClient.dylib
0x19a176000 - 0x19a1c1fff com.apple.spotlight.metadata.utilities (1.0 - 2150.26) /System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities
0x19a1c2000 - 0x19a25bfff com.apple.Metadata (10.7.0 - 2150.26) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x19a25c000 - 0x19a262fff com.apple.DiskArbitration (2.7 - 2.7) <8C067552-F381-3760-AEC2-7638F5C5C5F3> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x19a263000 - 0x19a56dfff com.apple.vImage (8.1 - 544.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x19aa71000 - 0x19aa7efff com.apple.OpenDirectory (11.5 - 230.40.1) <080C6FB5-2BD5-347A-96B0-B76ACA21B2B6> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x19aa7f000 - 0x19aa9efff com.apple.CFOpenDirectory (11.5 - 230.40.1) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x19aa9f000 - 0x19aaabfff com.apple.CoreServices.FSEvents (1290.120.5 - 1290.120.5) <90A90A11-F1E7-392A-90D1-845F2E956769> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
0x19aaac000 - 0x19aacffff com.apple.coreservices.SharedFileList (144 - 144) <74989CAA-FA6B-3739-B4E9-2E6CD4F0680B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
0x19aad0000 - 0x19aad2fff libapp_launch_measurement.dylib (14.1) <933BF613-819C-33B1-9CAD-B41162C60022> /usr/lib/libapp_launch_measurement.dylib
0x19aad3000 - 0x19ab15fff com.apple.CoreAutoLayout (1.0 - 21.10.1) /System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout
0x19ab16000 - 0x19ac02fff libxml2.2.dylib (34.10) <5FAA193C-37F9-3C80-A4B4-EC335DB259F5> /usr/lib/libxml2.2.dylib
0x19be37000 - 0x19be48fff libsystem_containermanager.dylib (318.100.4) <8944B2ED-3F69-36C9-AF47-D037500AE162> /usr/lib/system/libsystem_containermanager.dylib
0x19be49000 - 0x19be5afff com.apple.IOSurface (290.8.1 - 290.8.1) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x19be5b000 - 0x19be64fff com.apple.IOAccelerator (442.9 - 442.9) <88C4B886-3B17-38C6-816A-73105C201DEE> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
0x19be65000 - 0x19bf53fff com.apple.Metal (244.303 - 244.303) <6A26D72C-978C-3174-A467-734CD0D95275> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
0x19ca50000 - 0x19cab4fff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSCore.framework/Versions/A/MPSCore
0x19cab5000 - 0x19cab9fff libsystem_configuration.dylib (1109.140.1) <0C225C5B-FF1B-3C81-B956-2FDA13DAA7DA> /usr/lib/system/libsystem_configuration.dylib
0x19caba000 - 0x19cabefff libsystem_sandbox.dylib (1441.141.1) /usr/lib/system/libsystem_sandbox.dylib
0x19cabf000 - 0x19cac0fff com.apple.AggregateDictionary (1.0 - 1) <0E5213A0-A02B-3227-9BB6-0AE5A753D380> /System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary
0x19cac1000 - 0x19cac4fff com.apple.AppleSystemInfo (3.1.5 - 3.1.5) /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo
0x19cac5000 - 0x19cac6fff liblangid.dylib (136) <1A218183-2268-3E03-B19E-ECBFD41E2087> /usr/lib/liblangid.dylib
0x19cac7000 - 0x19cb54fff com.apple.CoreNLP (1.0 - 245.2) <74F90926-0778-3E2B-AE6B-15D4CDBAEF67> /System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP
0x19cb55000 - 0x19cb5cfff com.apple.LinguisticData (1.0 - 399) <6BE62CC7-6B93-3453-98C7-478D466CDB85> /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
0x19cb5d000 - 0x19d01bfff libBNNS.dylib (288.100.5) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
0x19d01c000 - 0x19d0cafff libvDSP.dylib (760.100.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x19d0cb000 - 0x19d0ddfff com.apple.CoreEmoji (1.0 - 128.4) /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
0x19d0de000 - 0x19d0e8fff com.apple.IOMobileFramebuffer (343.0.0 - 343.0.0) <7D6FD9BF-526D-3503-82C0-F5989D1F775E> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/Versions/A/IOMobileFramebuffer
0x19d3e7000 - 0x19d46afff com.apple.securityfoundation (6.0 - 55240.40.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x19d46b000 - 0x19d474fff com.apple.coreservices.BackgroundTaskManagement (1.0 - 104) <715DCAA5-15D7-3A94-90AF-E7565176CFA8> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
0x19d475000 - 0x19d47afff com.apple.xpc.ServiceManagement (1.0 - 1) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
0x19d47b000 - 0x19d47dfff libquarantine.dylib (119.40.2) /usr/lib/system/libquarantine.dylib
0x19d47e000 - 0x19d48dfff libCheckFix.dylib (31) <94005245-B6CD-3EB8-BB36-DB87CB90B095> /usr/lib/libCheckFix.dylib
0x19d48e000 - 0x19d4a4fff libcoretls.dylib (169.100.1) <012E29AA-D57E-3BDC-9F5B-72A71B233B73> /usr/lib/libcoretls.dylib
0x19d4a5000 - 0x19d4b5fff libbsm.0.dylib (68.40.1) /usr/lib/libbsm.0.dylib
0x19d4b6000 - 0x19d4fbfff libmecab.dylib (929.10) <7E04F6C7-783D-382A-955B-7A9B2DCD5275> /usr/lib/libmecab.dylib
0x19d4fc000 - 0x19d500fff libgermantok.dylib (24) <9BEA18EA-A6FB-32FE-8A89-7D18424DC020> /usr/lib/libgermantok.dylib
0x19d501000 - 0x19d515fff libLinearAlgebra.dylib (1336.140.1) <9F3C0A4B-1971-3E3D-8288-F0A423E98CA7> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x19d516000 - 0x19d719fff com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
0x19d71a000 - 0x19d763fff com.apple.MetalPerformanceShaders.MPSRayIntersector (1.0 - 1) <56E9900D-5CAF-31BE-8F81-CE01622D6AF5> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector
0x19d764000 - 0x19d8b6fff com.apple.MLCompute (1.0 - 1) /System/Library/Frameworks/MLCompute.framework/Versions/A/MLCompute
0x19d8b7000 - 0x19d8e5fff com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) <20C8225F-91A3-31B8-9546-CFDFE3C5CDEF> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
0x19d8e6000 - 0x19d938fff com.apple.MetalPerformanceShaders.MPSNDArray (1.0 - 1) <9F7CB9CE-FCFF-35C9-A7BE-3A2908F60C0B> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray
0x19d939000 - 0x19d9c0fff com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) <59B7BDE6-55F8-3D98-A91D-68DC9FC01573> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSImage.framework/Versions/A/MPSImage
0x19d9c1000 - 0x19d9d0fff com.apple.AppleFSCompression (125 - 1.0) <35F56F2F-1053-3EE4-9DEE-C8805AD528E8> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
0x19d9d1000 - 0x19d9ddfff libbz2.1.0.dylib (44) <452F7FC4-4CD9-33E4-83DB-9B3535010FFC> /usr/lib/libbz2.1.0.dylib
0x19d9de000 - 0x19d9e2fff libsystem_coreservices.dylib (127.1) /usr/lib/system/libsystem_coreservices.dylib
0x19d9e3000 - 0x19da13fff com.apple.CoreServices.OSServices (1122.41 - 1122.41) <6A662259-7AEA-360D-98F5-75EF8E3EC54E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x19dbc8000 - 0x19dbd9fff libz.1.dylib (76) <9DC30F4E-5C37-387C-A16C-A72165922DCC> /usr/lib/libz.1.dylib
0x19dbda000 - 0x19dc07fff libsystem_m.dylib (3186.100.3) /usr/lib/system/libsystem_m.dylib
0x19dc08000 - 0x19dc08fff libcharset.1.dylib (59) <6EA647D8-9615-3AA2-A239-8654E0531E04> /usr/lib/libcharset.1.dylib
0x19dc09000 - 0x19dc0efff libmacho.dylib (980) <0C537BDB-09A5-35F9-9671-0CD7DDED7AB9> /usr/lib/system/libmacho.dylib
0x19dc0f000 - 0x19dc26fff libkxld.dylib (7195.141.2) /usr/lib/system/libkxld.dylib
0x19dc27000 - 0x19dc34fff libcommonCrypto.dylib (60178.120.3) <8AAE1B05-7102-3A67-900E-DF0ACA311EC7> /usr/lib/system/libcommonCrypto.dylib
0x19dc35000 - 0x19dc3ffff libunwind.dylib (201) <1680DD5C-83DD-3A6A-91E8-CE7F4FDF4115> /usr/lib/system/libunwind.dylib
0x19dc40000 - 0x19dc47fff liboah.dylib (203.58) <422ADBB4-0DBD-302E-9740-8B5DB64DF0E1> /usr/lib/liboah.dylib
0x19dc48000 - 0x19dc50fff libcopyfile.dylib (173.40.2) <33FAED67-D5CD-3F2E-8C01-6125EFDA3520> /usr/lib/system/libcopyfile.dylib
0x19dc51000 - 0x19dc54fff libcompiler_rt.dylib (102.2) <10EE20DC-7B0B-3C93-A5C3-B2E35EA95FC1> /usr/lib/system/libcompiler_rt.dylib
0x19dc55000 - 0x19dc57fff libsystem_collections.dylib (1439.141.1) <16EBECBE-D09F-3612-BCCB-26EF80D6AC65> /usr/lib/system/libsystem_collections.dylib
0x19dc58000 - 0x19dc5afff libsystem_secinit.dylib (87.60.1) <8547C446-2A1B-355E-B0A0-1E7752C9EED1> /usr/lib/system/libsystem_secinit.dylib
0x19dc5b000 - 0x19dc5dfff libremovefile.dylib (49.120.1) <1A67C38F-ECC9-3B6C-8F26-2CB92E2FF075> /usr/lib/system/libremovefile.dylib
0x19dc5e000 - 0x19dc5efff libkeymgr.dylib (31) /usr/lib/system/libkeymgr.dylib
0x19dc5f000 - 0x19dc67fff libsystem_dnssd.dylib (1310.140.1) <9E4E2718-1F40-34F3-AC57-A225FB01926F> /usr/lib/system/libsystem_dnssd.dylib
0x19dc68000 - 0x19dc6dfff libcache.dylib (83) <49C0CF24-F396-3250-A254-C90E8C60134C> /usr/lib/system/libcache.dylib
0x19dc6e000 - 0x19dc6ffff libSystem.B.dylib (1292.120.1) /usr/lib/libSystem.B.dylib
0x19dc70000 - 0x19dc73fff libfakelink.dylib (3) /usr/lib/libfakelink.dylib
0x19dc74000 - 0x19dc74fff com.apple.SoftLinking (1.0 - 1) /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking
0x19dc75000 - 0x19dcb0fff libpcap.A.dylib (98.100.3) /usr/lib/libpcap.A.dylib
0x19dcb1000 - 0x19dda6fff libiconv.2.dylib (59) <4BF0362D-E9AF-3794-9E7E-40F07D845229> /usr/lib/libiconv.2.dylib
0x19dda7000 - 0x19ddb9fff libcmph.dylib (8) <826E544C-8026-3F4A-BA90-41C2372608AE> /usr/lib/libcmph.dylib
0x19ddba000 - 0x19de2afff libarchive.2.dylib (83.100.2) <7CC6F0E0-7E0D-30DD-9F66-282E90F54C32> /usr/lib/libarchive.2.dylib
0x19de2b000 - 0x19de9bfff com.apple.SearchKit (1.4.1 - 1.4.1) <639851B8-C3A5-31F5-BE46-D5F0E87C3109> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x19de9c000 - 0x19de9dfff libThaiTokenizer.dylib (3) /usr/lib/libThaiTokenizer.dylib
0x19de9e000 - 0x19dec2fff com.apple.applesauce (1.0 - 16.28) <928E86D6-05A4-3C4E-9733-48F0D936B10A> /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
0x19dec3000 - 0x19ded9fff libapple_nghttp2.dylib (1.41) <18AA1475-8D4D-3DEA-A8AD-C6A0FC6B92AA> /usr/lib/libapple_nghttp2.dylib
0x19deda000 - 0x19deecfff libSparseBLAS.dylib (1336.140.1) <31D093A9-02BC-3365-9171-6BEDEF6AE67D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
0x19deed000 - 0x19deeefff com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) <23F6F104-EE6C-3BE9-A1D4-EDECF349F3D7> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
0x19deef000 - 0x19def3fff libpam.2.dylib (28.40.1) /usr/lib/libpam.2.dylib
0x19def4000 - 0x19df12fff libcompression.dylib (96.120.1) /usr/lib/libcompression.dylib
0x19df13000 - 0x19df17fff libQuadrature.dylib (7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
0x19df18000 - 0x19e3d4fff libLAPACK.dylib (1336.140.1) <90E16293-8B02-3B28-A7C2-B6FAD0EFF8B1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x19e3d5000 - 0x19e427fff com.apple.DictionaryServices (1.2 - 341) <9B09DFAC-4B3A-3047-9BF5-B324C1BB5930> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x19e428000 - 0x19e440fff liblzma.5.dylib (16) /usr/lib/liblzma.5.dylib
0x19e441000 - 0x19e442fff libcoretls_cfhelpers.dylib (169.100.1) <212C432C-7BBE-32BA-8104-E20AA4EB8053> /usr/lib/libcoretls_cfhelpers.dylib
0x19e443000 - 0x19e527fff com.apple.APFS (1677.141.1 - 1677.141.1) <7DAB2F49-0C29-35B7-9A3B-E5CE948C7C18> /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
0x19e528000 - 0x19e535fff libxar.1.dylib (452) /usr/lib/libxar.1.dylib
0x19e536000 - 0x19e539fff libutil.dylib (58.40.2) <060B245B-5DDF-38B9-87F5-AD158328EF6C> /usr/lib/libutil.dylib
0x19e53a000 - 0x19e563fff libxslt.1.dylib (17.6) <71A3CDF8-9C33-3C16-9F0B-95BAE843E5C6> /usr/lib/libxslt.1.dylib
0x19e564000 - 0x19e56efff libChineseTokenizer.dylib (37.1) <1C21D68B-E453-305A-B85B-BC082FC6BECD> /usr/lib/libChineseTokenizer.dylib
0x19e56f000 - 0x19e5defff libvMisc.dylib (760.100.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x1a1091000 - 0x1a1091fff liblaunch.dylib (2038.120.1) <86FD9379-882E-3603-9AC1-1B550DB2877D> /usr/lib/system/liblaunch.dylib
0x1a3545000 - 0x1a3545fff libsystem_product_info_filter.dylib (8.40.1) <737F7B93-4291-31F6-AB14-7C6EFB368E4F> /usr/lib/system/libsystem_product_info_filter.dylib
0x1a3618000 - 0x1a3618fff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <947CDAD5-05F9-3A69-9CB5-C40B3D1AE694> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x1a363a000 - 0x1a363afff com.apple.CoreServices (1122.41 - 1122.41) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x1a37f7000 - 0x1a37f7fff com.apple.Accelerate (1.11 - Accelerate 1.11) <735D582E-3502-3F6A-B0E0-3D7B963D0BF9> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x1d6286000 - 0x1d628cfff libCoreFSCache.dylib (200.10) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
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: 3
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=575.6M resident=0K(0%) swapped_out_or_unallocated=575.6M(100%)
Writable regions: Total=305.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=305.9M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 32K 1
MALLOC 52.1M 16
MALLOC guard page 96K 5
MALLOC_MEDIUM (reserved) 240.0M 2 reserved VM address space (unallocated)
STACK GUARD 56.1M 8
Stack 11.7M 8
VM_ALLOCATE 2.5G 29
VM_ALLOCATE (reserved) 64K 1 reserved VM address space (unallocated)
__AUTH 250K 50
__AUTH_CONST 3402K 135
__DATA 1515K 133
__DATA_CONST 4232K 138
__DATA_DIRTY 312K 61
__LINKEDIT 492.4M 8
__OBJC_CONST 421K 39
__OBJC_RO 75.1M 1
__OBJC_RW 2576K 1
__TEXT 83.3M 148
__UNICODE 588K 1
mapped file 13.9M 4
shared memory 16K 1
=========== ======= =======
TOTAL 3.5G 790
TOTAL, minus reserved VM space 3.3G 790

Model: Macmini9,1, BootROM 6723.140.2, proc 8:4:4 processors, 8 GB, SMC
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: LPDDR4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Jul 7 2021 00:48:27 version 18.50.40.10.7.8.121 FWID 01-f5ad2691
Bluetooth: Version 8.0.5d7, 3 services, 25 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
USB Device: USB 3.1 Bus
USB Device: USB 3.1 Bus
USB Device: USB 3.0 Bus
USB Device: USB Receiver
Thunderbolt Bus: Mac mini, Apple Inc.
Thunderbolt Bus: Mac mini, Apple Inc.

Related: microsoft/vscode#142822

Author: WardenGnaw
Assignees: -
Labels:

area-Diagnostics-coreclr, untriaged

Milestone: -

@tommcdon tommcdon added this to the 7.0.0 milestone Feb 15, 2022
@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Feb 15, 2022
@janvorli
Copy link
Member

@dotnet/dotnet-diag the bus error indicates an attempt to write to an executable memory without using an ExecutableWriterHolder.

@JiahongJin1
Copy link

This issue also repro in net6.0(arm64 6.0.103&6.0.201)

@tommcdon
Copy link
Member

@hoyosjs is investigating this issue.

@tommcdon
Copy link
Member

@WardenGnaw can you try disabling R2R with COMPlus_ReadyToRun=0 to see if it works around the issue? This might be related to #64104.

@WardenGnaw
Copy link
Contributor Author

WardenGnaw commented Feb 23, 2022

@tommcdon Yep, disabling R2R with COMPlus_ReadyToRun=0 fixed it for me.

@hoyosjs
Copy link
Member

hoyosjs commented Feb 24, 2022

The main issue is in line 154

inline void CORDbgSetInstruction(CORDB_ADDRESS_TYPE* address,
PRD_TYPE instruction)
{
// In a DAC build, this function assumes the input is an host address.
LIMITED_METHOD_DAC_CONTRACT;
#if !defined(DBI_COMPILE) && !defined(DACCESS_COMPILE) && defined(HOST_OSX)
ExecutableWriterHolder<void> instructionWriterHolder((LPVOID)address, sizeof(PRD_TYPE));
ULONGLONG ptraddr = dac_cast<ULONGLONG>(instructionWriterHolder.GetRW());
#else // !DBI_COMPILE && !DACCESS_COMPILE && HOST_OSX
ULONGLONG ptraddr = dac_cast<ULONGLONG>(address);
#endif // !DBI_COMPILE && !DACCESS_COMPILE && HOST_OSX
*(PRD_TYPE *)ptraddr = instruction;
FlushInstructionCache(GetCurrentProcess(),
address,
sizeof(PRD_TYPE));
}

enters here and we go into a SIGTRAP somewhere here:

ExecutableWriterHolder(T* addressRX, size_t size)
{
m_addressRX = addressRX;
#if defined(HOST_OSX) && defined(HOST_ARM64)
m_addressRW = addressRX;
PAL_JitWriteProtect(true);
#else
m_addressRW = (T *)ExecutableAllocator::Instance()->MapRW((void*)addressRX, size);
#endif

with the following stack:

* thread #1, stop reason = signal SIGSTOP
    frame #0: 0x000000018adc4930 libsystem_kernel.dylib`__wait4 + 8
    frame #1: 0x00000001030e14f4 libcoreclr.dylib`::PROCCreateCrashDumpIfEnabled(int) at process.cpp:3254:22 [opt]
    frame #2: 0x00000001030e14b8 libcoreclr.dylib`::PROCCreateCrashDumpIfEnabled(signal=<unavailable>) at process.cpp:3409:9 [opt]
    frame #3: 0x000000018ae104e4 libsystem_platform.dylib`_sigtramp + 56
    frame #4: 0x00000001033c6c9c libcoreclr.dylib`DebuggerController::ApplyPatch(DebuggerControllerPatch*) [inlined] ExecutableWriterHolder<void>::ExecutableWriterHolder(this=<unavailable>, addressRX=0x00000002802cafc0, size=4) at executableallocator.h:0:9 [opt]
    frame #5: 0x00000001033c6c94 libcoreclr.dylib`DebuggerController::ApplyPatch(DebuggerControllerPatch*) [inlined] ExecutableWriterHolder<void>::ExecutableWriterHolder(this=<unavailable>, addressRX=0x00000002802cafc0, size=4) at executableallocator.h:252:5 [opt]
    frame #6: 0x00000001033c6c94 libcoreclr.dylib`DebuggerController::ApplyPatch(DebuggerControllerPatch*) [inlined] CORDbgSetInstruction(address="\xfd{\xba\xa9\xf3S\U00000001\xa9\xf5[\U00000002\xa9\xf7c\U00000003\xa9\xf9k\U00000004\xa9\xfbs\U00000005\xa9\xfd\U00000003", instruction=-734134272) at primitives.h:154:34 [opt]
  * frame #7: 0x00000001033c6c94 libcoreclr.dylib`DebuggerController::ApplyPatch(DebuggerControllerPatch*) [inlined] CORDbgInsertBreakpoint(address="\xfd{\xba\xa9\xf3S\U00000001\xa9\xf5[\U00000002\xa9\xf7c\U00000003\xa9\xf9k\U00000004\xa9\xfbs\U00000005\xa9\xfd\U00000003") at arm_primitives.h:56:5 [opt]
    frame #8: 0x00000001033c6c94 libcoreclr.dylib`DebuggerController::ApplyPatch(patch=0x0000000280e11930) at controller.cpp:1390:9 [opt]
    frame #9: 0x00000001033c7088 libcoreclr.dylib`DebuggerController::ActivatePatch(patch=<unavailable>) at controller.cpp:1743:9 [opt] [artificial]
    frame #10: 0x00000001033c74a4 libcoreclr.dylib`DebuggerController::AddBindAndActivatePatchForMethodDesc(this=0x00006000037afa80, fd=0x0000000280e11930, dji=0x00006000017a4240, nativeOffset=0, kind=PATCH_KIND_IL_SLAVE, fp=(m_sp = 0x0000000000000000), pAppDomain=0x0000000000000000) at controller.cpp:2117:9 [opt]
    frame #11: 0x00000001033c72dc libcoreclr.dylib`DebuggerController::AddBindAndActivateILSlavePatch(this=0x00006000037afa80, master=<unavailable>, dji=0x00006000017a4240) at controller.cpp:1874:13 [opt]
    frame #12: 0x00000001033d2ed4 libcoreclr.dylib`Debugger::MapAndBindFunctionPatches(DebuggerJitInfo*, MethodDesc*, unsigned char const*) [inlined] Debugger::MapPatchToDJI(this=<unavailable>, dcp=<unavailable>, djiTo=<unavailable>) at debugger.cpp:5044:34 [opt]
    frame #13: 0x00000001033d2e64 libcoreclr.dylib`Debugger::MapAndBindFunctionPatches(this=0x00000001446089f0, djiNew=0x00006000017a4240, fd=<unavailable>, addrOfCode=<unavailable>) at debugger.cpp:4952:22 [opt]
    frame #14: 0x00000001033d2968 libcoreclr.dylib`Debugger::JITComplete(this=0x00000001446089f0, nativeCodeVersion=NativeCodeVersion @ 0x000000016da39e80, newAddress=10740346816) at debugger.cpp:2536:14 [opt]
    frame #15: 0x00000001031f3dbc libcoreclr.dylib`ReadyToRunInfo::GetEntryPoint(this=0x00000002800706a8, pMD=0x0000000280e11930, pConfig=0x000000016da3a010, fFixups=<unavailable>) at readytoruninfo.cpp:1022:28 [opt]
    frame #16: 0x00000001031a8238 libcoreclr.dylib`MethodDesc::GetPrecompiledR2RCode(this=0x0000000280e11930, pConfig=0x000000016da3a010) at prestub.cpp:617:47 [opt]
    frame #17: 0x00000001031a7ef8 libcoreclr.dylib`MethodDesc::PrepareILBasedCode(PrepareCodeConfig*) [inlined] MethodDesc::GetPrecompiledCode(this=0x0000000280e11930, pConfig=0x000000016da3a010, shouldTier=true) at prestub.cpp:470:17 [opt]
    frame #18: 0x00000001031a7eec libcoreclr.dylib`MethodDesc::PrepareILBasedCode(this=0x0000000280e11930, pConfig=0x000000016da3a010) at prestub.cpp:420:21 [opt]
    frame #19: 0x00000001031293a4 libcoreclr.dylib`CodeVersionManager::PublishVersionableCodeIfNecessary(this=0x00000001448197f8, pMethodDesc=0x0000000280e11930, callerGCMode=Coop, doBackpatchRef=0x000000016da3a108, doFullBackpatchRef=<unavailable>) at codeversion.cpp:1701:34 [opt]
    frame #20: 0x00000001031ab198 libcoreclr.dylib`MethodDesc::DoPrestub(this=0x0000000280e11930, pDispatchingMT=0x0000000000000000, callerGCMode=Coop) at prestub.cpp:2213:42 [opt]
    frame #21: 0x00000001031aac90 libcoreclr.dylib`::PreStubWorker(pTransitionBlock=<unavailable>, pMD=0x0000000280e11930) at prestub.cpp:2039:29 [opt]
    frame #22: 0x0000000103392210 libcoreclr.dylib`ThePreStub at asmhelpers.S:177
    frame #23: 0x0000000103392d08 libcoreclr.dylib`CallDescrWorkerInternal at calldescrworkerarm64.S:71
    frame #24: 0x0000000103204658 libcoreclr.dylib`MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) at callhelpers.cpp:67:5 [opt]
    frame #25: 0x0000000103204608 libcoreclr.dylib`MethodDescCallSite::CallTargetWorker(this=0x000000016da3a670, pArguments=0x000000016da3a798, pReturnValue=0x0000000000000000, cbReturnValue=0) at callhelpers.cpp:543:9 [opt]
    frame #26: 0x000000010312c9f0 libcoreclr.dylib`CorHost2::CreateAppDomainWithManager(char16_t const*, unsigned int, char16_t const*, char16_t const*, int, char16_t const**, char16_t const**, unsigned int*) [inlined] MethodDescCallSite::Call(this=0x000000016da3a670, pArguments=0x000000016da3a798) at callhelpers.h:458:9 [opt]

From there we immediately get to a sigtrap frame for a SIGBUS, hinting that we are doing an illegal write. I don't see a frame with the signal or anything that I can use to see if it was a write, but the region is marked as r-x and it's within the range of System.Private.CoreLib's image (so the r2r part). @janvorli, is that use of the holder incorrect to cause this issue? The holder seems to be in scope, so I'd expect the pthread_jit_write_protect_np(0) to still be in effect there. The only other thing I can think of is if r2r modules are not mapped with MAP_JIT, can we still write the int3 to the image's memory? If not, then that's what's breaking this.

@janvorli
Copy link
Member

I agree with you that the only case I can think of that would break this is if we didn't map the image with MAP_JIT flag. I think it is possible we don't since for execution without debugger, we would never need to write to that memory and the flag would not be needed. And I have a feeling that MAP_JIT was not possible to use with mapped files. Let me check that.

@janvorli
Copy link
Member

Hmm, the mapping happens in MAPmmapAndRecord and we should be copying data from the file and not mapping the file directly. The whole range we reserve for R2R binary is reserved with the MAP_JIT. But maybe something is wrong with the logic, maybe triggered by the change that was reverted.

@hoyosjs can you try to step through the MAPMapPEFile (that's where the R2R file is mapped) and see if we somehow skip setting the MAP_JIT flag?

@hoyosjs
Copy link
Member

hoyosjs commented Mar 3, 2022

@janvorli As an FYI: Yep - looks like in

pvBaseAddress = mmap(pvBaseAddress, len + adjust, prot, flags, fd, offset - adjust);
if (MAP_FAILED == pvBaseAddress)
{
ERROR_(LOADER)( "mmap failed with code %d: %s.\n", errno, strerror( errno ) );
palError = FILEGetLastErrorFromErrno();
}
we do the mapping with only MAP_PRIVATE|MAP_FIXED, getting the flags from this call
palError = MAPmmapAndRecord(pFileObject, loadedBase,
(LPVOID)loadedHeader, headerSize, PROT_READ, readOnlyFlags, fd, offset,
&loadedHeaderBase);
which is set here:
int readWriteFlags = MAP_FILE|MAP_PRIVATE|MAP_FIXED;
int readOnlyFlags = readWriteFlags;

If I change that to

    int readWriteFlags = MAP_FILE|MAP_PRIVATE|MAP_FIXED;

    if (IsRunningOnMojaveHardenedRuntime())
    {
        readWriteFlags |= MAP_JIT;
    }

    int readOnlyFlags = readWriteFlags;

I can see the mmap is getting the right flag, but we still crash.

EDIT: That was mapping in the header. The executable sections are after.

@hoyosjs
Copy link
Member

hoyosjs commented Mar 8, 2022

Investigated this a bit more with @janvorli. This looks like a bad interaction between preading the file and the MAP_JIT flag. The following stand alone c++ repro emulated parts of what the runtime does for m1.

#include <iostream>

#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

#include <libkern/OSCacheControl.h>

int main(int argc, const char * argv[]) {
    struct stat st;
    const char *path = "~/code/r2rtest/bin/Debug/net6.0/osx-arm64/publish/System.Private.CoreLib.dll";
    int fd = open(path, O_RDONLY);
    if (fstat(fd, &st) != 0) return 1;
    size_t numOfBytes = st.st_size;
    void *buffer = mmap(nullptr, numOfBytes,
                        PROT_NONE,
                        // PROT_EXEC | PROT_READ,
                        MAP_PRIVATE | MAP_ANONYMOUS | MAP_JIT,
                        -1, 0);
    if (mprotect(buffer, numOfBytes, PROT_WRITE | PROT_READ) == -1) return -1;
    pthread_jit_write_protect_np(0); // WRITE ENABLE
    if (pread(fd, buffer, numOfBytes, 0) == -1) return -2;
    if (mprotect(buffer, numOfBytes, PROT_READ | PROT_EXEC) == -1) return -3;
    pthread_jit_write_protect_np(1); // WRITE DISABLE
    
    sys_icache_invalidate(buffer, numOfBytes);
    
    // This is what the debugger does:
    pthread_jit_write_protect_np(0); // WRITE ENABLE
    * (long*)buffer = 0xD4200000;
    pthread_jit_write_protect_np(1); // WRITE DISABLE
    
    return 0;
}

If doesn't matter what type of flags we pass to the first mprotect, we'll always fail.

  • RW and W makes the pread successful, but repros what this issue sees.
  • Using RX and X ends up in a bad access due to page not having write protections, regardless of pthread_jit_write_protect_np.
  • WX and WRX end up with a pread that gives out a BAD ADDRESS error. W and X seem like mutually exclusive bits.

Interestingly, if I set the mprotect around the debugger usages, it all works in this little sample. Haven't been able to test the real debugger paths with mprotect.

@jgiannuzzi
Copy link
Contributor

Hey @hoyosjs and @janvorli, I investigated some of these aspects back when I tried to fix #64103 with #64104.
I unfortunately did not realise that the debugger would write to the memory after loading the R2R image, sorry!

I think the issue we see here is because we are mixing calls to mprotect and pthread_jit_write_protect_np.
If we never use pthread_jit_write_protect_np but only mprotect to enable/disable writes, then it works as expected (however we lose the granularity at the thread level).
If we never use mprotect but only pthread_jit_write_protect_np to enable/disable writes, it can also work as expected except for preading the file. What does work is preading it into another buffer (created without MAP_JIT) and then copying the content into our JIT buffer.

So I think there are essentially two paths we can take to fix this: we either get rid of mprotect, or of pthread_jit_write_protect_np. Getting rid of mprotect on macOS sounds like quite a bit of work but would get us closer to Apple's guidelines for JIT compilers. If I understand ExecutableWriterHolder properly, getting rid of pthread_jit_write_protect_np sounds fairly feasible, as we know both the address and the size to change with mprotect.

Thoughts?

@janvorli
Copy link
Member

@jgiannuzzi we actually need both the mprotect (speaking of the one in the MAPMapPEFile call chain) and the pthread_jit_write_protect_np. We initially reserve virtual address space for executable memory using mmap with PROT_NONE and MAP_JIT flag, so we first need to use mprotect to mark the memory as PROT_READ | PROT_EXEC and then the pthread_jit_write_protect_np to enable / disable writing into that region.
I believe using only mprotect would not work with hardened runtime, so it is not an option.
As you've mentioned, we will also need to pread into a separate memory buffer and then copy the data into the target memory. It is a bit unfortunate, but we have to live with that.

@janvorli
Copy link
Member

@hoyosjs I have modified your test code above by

  • modifying the first mprotect to use PROT_WRITE | PROT_READ | PROT_EXEC
  • removing the second mprotect
  • changing the pread to malloc a buffer, pread there, memcpy it to the target address and then free the buffer.

The stuff then works as expected, your test app returned 0.

@jgiannuzzi
Copy link
Contributor

@janvorli according to my limited testing, using only mprotect also works with hardened runtime, as long as you mark the memory as PROT_READ | PROT_EXEC before jumping into it.

@janvorli
Copy link
Member

@jgiannuzzi after switching it to PROT_READ | PROT_EXEC can you still flip it back to PROT_WRITE | PROT_READ | PROT_EXEC or PROT_WRITE | PROT_READ to enable modifications like setting a breakpoint? I would expect that to be disallowed due to security reasons.

@jgiannuzzi
Copy link
Contributor

@janvorli yes, you can flip it back to PROT_WRITE | PROT_READ to enable modifications, and then PROT_READ | PROT_EXEC before resuming execution (PROT_WRITE | PROT_READ | PROT_EXEC does not allow modifications). This is allowed as long as MAP_JIT is used and the com.apple.security.cs.allow-jit entitlement is set.
All of this being said, using mprotect means losing thread granularity (not sure whether this has an impact in our case?), and Apple's guidelines recommend using pthread_jit_write_protect_np.

@jgiannuzzi
Copy link
Contributor

jgiannuzzi commented Mar 14, 2022

Given a file jit.txt with the following hex content (this is essentially a function that returns 1):

20008052 C0035FD6

Here is an example using only mprotect that works under hardened runtime + com.apple.security.cs.allow-jit:

#include <iostream>

#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

#include <libkern/OSCacheControl.h>

int main(int argc, const char * argv[]) {
    struct stat st;
    const char *path = "jit.txt";
    int fd = open(path, O_RDONLY);
    if (fstat(fd, &st) != 0) return 1;
    size_t numOfBytes = st.st_size;
    void *buffer = mmap(nullptr, numOfBytes,
                        PROT_NONE,
                        // PROT_EXEC | PROT_READ,
                        MAP_PRIVATE | MAP_ANONYMOUS | MAP_JIT,
                        -1, 0);
    if (mprotect(buffer, numOfBytes, PROT_WRITE | PROT_READ) == -1) return -1;
    if (pread(fd, buffer, numOfBytes, 0) == -1) return -2;
    if (mprotect(buffer, numOfBytes, PROT_READ | PROT_EXEC) == -1) return -3;
    sys_icache_invalidate(buffer, numOfBytes);
    
    // Call into the JIT buffer
    int (*foo)(void) = (int (*)())(buffer);
    std::cout << "foo returns " << foo() << std::endl;
    
    // Modify the JIT function to return 2
    if (mprotect(buffer, numOfBytes, PROT_WRITE | PROT_READ) == -1) return -1;
    * (int*)buffer = 0x52800040;
    if (mprotect(buffer, numOfBytes, PROT_READ | PROT_EXEC) == -1) return -3;
    sys_icache_invalidate(buffer, numOfBytes);

    // Call into the modified JIT buffer
    std::cout << "foo returns " << foo() << std::endl;

    return 0;
}

@jgiannuzzi
Copy link
Contributor

jgiannuzzi commented Mar 14, 2022

This version, which is pretty close to the one @hoyosjs posted, also works:

#include <iostream>

#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

#include <libkern/OSCacheControl.h>

int main(int argc, const char * argv[]) {
    struct stat st;
    const char *path = "/Users/jonathan/tmp/jit.txt";
    int fd = open(path, O_RDONLY);
    if (fstat(fd, &st) != 0) return 1;
    size_t numOfBytes = st.st_size;
    void *buffer = mmap(nullptr, numOfBytes,
                        PROT_NONE,
                        // PROT_EXEC | PROT_READ,
                        MAP_PRIVATE | MAP_ANONYMOUS | MAP_JIT,
                        -1, 0);
    if (mprotect(buffer, numOfBytes, PROT_WRITE | PROT_READ) == -1) return -1;
    pthread_jit_write_protect_np(0); // WRITE ENABLE
    if (pread(fd, buffer, numOfBytes, 0) == -1) return -2;
    if (mprotect(buffer, numOfBytes, PROT_READ | PROT_EXEC | PROT_WRITE) == -1) return -3;
    pthread_jit_write_protect_np(1); // WRITE DISABLE
    sys_icache_invalidate(buffer, numOfBytes);

    // Call into the JIT buffer
    int (*foo)(void) = (int (*)())(buffer);
    std::cout << "foo returns " << foo() << std::endl;

    // Modify the JIT function to return 2
    pthread_jit_write_protect_np(0); // WRITE ENABLE
    * (int*)buffer = 0x52800040;
    pthread_jit_write_protect_np(1); // WRITE DISABLE
    sys_icache_invalidate(buffer, numOfBytes);

    // Call into the modified JIT buffer
    std::cout << "foo returns " << foo() << std::endl;

    return 0;
}

The key difference is the use of PROT_READ | PROT_EXEC | PROT_WRITE in the second mprotect.

@jgiannuzzi
Copy link
Contributor

I investigated this further, and I have a working build which loads R2R images successfully and allows debugging.

The general idea is:

  • to load the image:
    • use mprotect once with RWX on the JIT buffer — after that, memory protection cannot be changed anymore, and the only way to switch between writing and executing is with pthread_jit_write_protect_np
    • do a normal mmap with MAP_FILE of the file to load — pread won't work after the memory protection is changed, and doing it this way avoids having to read the file into a temporary buffer altogether
    • enable writing with pthread_jit_write_protect_np(0)
    • do a memcpy from the mmaped file to the JIT buffer
    • disable writing with pthread_jit_write_protect_np(1)
    • munmap the file
  • then during image relocation:
    • use pthread_jit_write_protect_np to enable/disable writing instead of ClrVirtualProtect (which ends up calling mprotect)

The important thing here is that pthread_jit_write_protect_np only works after both W and X are set. And then it also becomes the only way to enable/disable writing. Also note that, even though it's counterintuitive, setting both does not mean you can do both at the same time — without calling pthread_jit_write_protect_np(0), the memory is not writable.

@hoyosjs @janvorli I'm happy to make a proper PR out of this if that approach sounds good to you.

@hoyosjs
Copy link
Member

hoyosjs commented Mar 17, 2022

@jgiannuzzi I had a similar change locally that I discussed with Jan that I was testing - feel free to open the PR :) Thanks.

@janvorli
Copy link
Member

I was just writing the same response as @hoyosjs :-)

@jgiannuzzi
Copy link
Contributor

Coming up with a fully working PR is actually taking longer than I expected 😞

I do have a working fix for .NET 6, and even a simplified one where I just mprotect the R2R memory RWX right after the relocation. Unfortunately when I apply any of these approaches to main, it result in failures to build to simplest project (as in, using the patched runtime to do dotnet build on the template console project). I encounter seemingly random System.AccessViolationException errors, and disabling parallel compilation reduces the frequency. I still don't understand why and where exactly this happens 🙁

Whilst validating my not-fully-working fix, I also built and tested on osx-x64 to make sure I was not breaking anything by accident. Given that memory protection does not work the same on that platform (W and X can be allowed at the same time, and there is no pthread_jit_write_protect_np to switch between them), I was curious to see how the debugger was coping with the R2R memory being set to RX. I thus started tracing the calls to ExecutableWriterHolder and MAPmmapAndRecord and it looks to me that the debugger never tries to write to the R2R memory (I checked this by computing the memory ranges allocated for R2R memory by MAPmmapAndRecord and checking whether any of the ExecutableWriterHolder calls matched — none did, as opposed to what happens on osx-arm64).
Does this sound right to you @hoyosjs @janvorli? And if that's the case, do you think it's right for the debugger to do that on osx-arm64?

@janvorli
Copy link
Member

@jgiannuzzi could you please share your current state of the change so that I can take a look?

@jgiannuzzi
Copy link
Contributor

jgiannuzzi commented Mar 23, 2022

@janvorli here are my branches with the simplest change to fix the debugging issue: .NET 6 and .NET 7. This change is enough to get the debugger working with R2R in both cases, but as explained above it breaks building projects on .NET 7.

edit: Also a more complex change like the one we discussed a few days ago gives the same result.

@jgiannuzzi
Copy link
Contributor

and this is my very simple way to trace the calls to MAPmmapAndRecord and ExecutableWriterHolder: jgiannuzzi:r2r-trace

@hoyosjs
Copy link
Member

hoyosjs commented Mar 23, 2022

I'll take a look at this in a bit - and nope; in x64 we also write to the instruction stream here

patch->opcode = CORDbgGetInstruction(patch->address);
CORDbgInsertBreakpoint((CORDB_ADDRESS_TYPE *)patch->address);
LOG((LF_CORDB, LL_EVERYTHING, "Breakpoint was inserted at %p for opcode %x\n", patch->address, patch->opcode));
Thanks for the branch @jgiannuzzi

@janvorli
Copy link
Member

@jgiannuzzi I don't see other changes than the relocation one in the .NET 7 branch and in the .NET 6 branch, I don't see calls to the PAL_JitWriteProtect and handling the problem with using pread in MAPmmapAndRecord. And I was expecting the change in the ApplyBaseRelocations to use the PAL_JitWriteProtect or ExecutableWriterHolder on macOS instead of flipping the protection.

@jgiannuzzi
Copy link
Contributor

@janvorli I pushed that simple RWX change because it gave the exact same result as the more complex one — happy to push that change too for you to take a look if you'd like!

@janvorli
Copy link
Member

That would be nice, since it is the way I'd like to have it implemented. I'd like to give it a quick try to see where the access violation comes from. I guess it should happen when running coreclr tests too and that one is not difficult to debug using lldb.

@jgiannuzzi
Copy link
Contributor

Here it is for .NET 6 and .NET 7. Actually when cleaning it up before pushing, I realised that I fixed the access violation 😅

Should I create a PR against main on which we can discuss further?

@janvorli
Copy link
Member

Yes, that would be great!

@hoyosjs
Copy link
Member

hoyosjs commented Mar 24, 2022

The last .NET 7 commit was pretty much what I'd expect :)

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 24, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 31, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants