runtime: `sudo dotnet workload --help` segfaults on Apple M1 in .NET 7 Preview 6
Describe the bug
Installing .NET 7 Preview 6 on osx-arm64 and then running sudo dotnet workload --help results in:
% sudo dotnet workload --help
zsh: segmentation fault sudo dotnet workload --help
Impact It is impossible to install any workloads on an M1 Mac using .NET 7 Preview 6 or later.
To Reproduce
Download the .NET7 Preview 6 arm64 OSX installer from https://dotnet.microsoft.com/en-us/download/dotnet/7.0 and install it.
Open a terminal and run
dotnet workload --help`
Observe normal output. Now run
sudo dotnet workload --help
Result: crash.
Exceptions (if any)
The following is in the Apple “Console app”'s crash reports:
sudo:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: sudo [69890]
Path: /usr/bin/sudo
Identifier: sudo
Version: ???
Code Type: ARM-64 (Native)
Parent Process: zsh [51757]
Responsible: iTerm2 [976]
User ID: 0
Date/Time: 2022-07-14 11:11:43.3874 -0400
OS Version: macOS 12.4 (21F79)
Report Version: 12
Anonymous UUID: 1143D3D0-7711-BC35-8E10-8642D5EAA935
Sleep/Wake UUID: 34A43029-CA6F-41F5-A1A5-0CB06109376D
Time Awake Since Boot: 180000 seconds
Time Since Wake: 8591 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: sudo [69890]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x1c4f6a804 __kill + 8
1 sudo 0x104570154 0x104564000 + 49492
2 dyld 0x10463108c start + 520
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000001 x3: 0x00000000000001c7
x4: 0x00000001045cb2d5 x5: 0x000000016b89aff0 x6: 0x0000000000001000 x7: 0x0000000000000000
x8: 0x1848f8e721c800b2 x9: 0x000000021de69b10 x10: 0x00000000ffffffff x11: 0x00000000000007fd
x12: 0x0000000000000003 x13: 0x0000000080628ffb x14: 0x0000000080829000 x15: 0x0000000000000052
x16: 0x0000000000000025 x17: 0x00000001045e43f8 x18: 0x0000000000000000 x19: 0x000000000000000b
x20: 0x000000000000000b x21: 0x00000001045c77d3 x22: 0x00000001045c7d63 x23: 0x00000001045c7ea9
x24: 0x00000001045ebbdc x25: 0x00000001340043d0 x26: 0x0000600002f98180 x27: 0x000000000000000a
x28: 0x00000001045c7eb2 fp: 0x000000016b89b5a0 lr: 0x0000000104570154
sp: 0x000000016b89b020 pc: 0x00000001c4f6a804 cpsr: 0x00001000
far: 0x0000600003488180 esr: 0x56000080 Address size fault
Binary Images:
0x1c4f61000 - 0x1c4f98fff libsystem_kernel.dylib (*) <03f48dc5-caa7-3678-af61-1a3c7fa8b06e> /usr/lib/system/libsystem_kernel.dylib
0x104564000 - 0x1045e3fff sudo (*) <e47b9f10-c795-3ccd-800f-3b3acbe65585> /usr/bin/sudo
0x10462c000 - 0x10468bfff dyld (*) <d9c2a46e-8dc4-3950-9d6a-f799e8ccb683> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=749.2M resident=0K(0%) swapped_out_or_unallocated=749.2M(100%)
Writable regions: Total=694.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=694.4M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
Kernel Alloc Once 32K 1
MALLOC 181.2M 20
MALLOC guard page 96K 5
MALLOC_MEDIUM (reserved) 120.0M 1 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.0M 1
Stack 8176K 1
__AUTH 1614K 130
__AUTH_CONST 7822K 275
__DATA 7074K 261
__DATA_CONST 6221K 275
__DATA_DIRTY 331K 87
__FONT_DATA 4K 1
__LINKEDIT 577.4M 5
__OBJC_CONST 736K 99
__OBJC_RO 83.0M 1
__OBJC_RW 3152K 1
__TEXT 171.7M 286
__UNICODE 592K 1
dyld private memory 1024K 1
shared memory 32K 2
=========== ======= =======
TOTAL 1.6G 1456
TOTAL, minus reserved VM space 1.1G 1456
-----------
Full Report
-----------
{"app_name":"sudo","timestamp":"2022-07-14 11:11:43.00 -0400","app_version":"","slice_uuid":"e47b9f10-c795-3ccd-800f-3b3acbe65585","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.4 (21F79)","incident_id":"1043FE1D-4898-456F-92E2-96099FF01164","name":"sudo"}
{
"uptime" : 180000,
"procLaunch" : "2022-07-14 11:11:43.1687 -0400",
"procRole" : "Unspecified",
"version" : 2,
"userID" : 0,
"deployVersion" : 210,
"modelCode" : "MacBookPro17,1",
"procStartAbsTime" : 4430904448230,
"coalitionID" : 937,
"osVersion" : {
"train" : "macOS 12.4",
"build" : "21F79",
"releaseType" : "User"
},
"captureTime" : "2022-07-14 11:11:43.3874 -0400",
"incident" : "1043FE1D-4898-456F-92E2-96099FF01164",
"bug_type" : "309",
"pid" : 69890,
"procExitAbsTime" : 4430909694770,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "sudo",
"procPath" : "\/usr\/bin\/sudo",
"parentProc" : "zsh",
"parentPid" : 51757,
"coalitionName" : "com.googlecode.iterm2",
"crashReporterKey" : "1143D3D0-7711-BC35-8E10-8642D5EAA935",
"responsiblePid" : 976,
"responsibleProc" : "iTerm2",
"wakeTime" : 8591,
"sleepWakeUUID" : "34A43029-CA6F-41F5-A1A5-0CB06109376D",
"sip" : "enabled",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGSEGV"},
"termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"sudo","byPid":69890},
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":1944375,"threadState":{"x":[{"value":0},{"value":0},{"value":1},{"value":455},{"value":4368151253},{"value":6099152880},{"value":4096},{"value":0},{"value":1749922126821327026},{"value":9091586832,"symbolLocation":0,"symbol":"_current_pid"},{"value":4294967295},{"value":2045},{"value":3},{"value":2153943035},{"value":2156040192},{"value":82},{"value":37},{"value":4368253944},{"value":0},{"value":11},{"value":11},{"value":4368136147},{"value":4368137571},{"value":4368137897},{"value":4368284636},{"value":5167399888},{"value":105553166172544},{"value":10},{"value":4368137906}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4367778132},"cpsr":{"value":4096},"fp":{"value":6099154336},"sp":{"value":6099152928},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":7599466500,"matchesCrashFrame":1},"far":{"value":105553171349888}},"queue":"com.apple.main-thread","frames":[{"imageOffset":38916,"symbol":"__kill","symbolLocation":8,"imageIndex":0},{"imageOffset":49492,"imageIndex":1},{"imageOffset":20620,"symbol":"start","symbolLocation":520,"imageIndex":2}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64e",
"base" : 7599427584,
"size" : 229376,
"uuid" : "03f48dc5-caa7-3678-af61-1a3c7fa8b06e",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 4367728640,
"size" : 524288,
"uuid" : "e47b9f10-c795-3ccd-800f-3b3acbe65585",
"path" : "\/usr\/bin\/sudo",
"name" : "sudo"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 4368547840,
"size" : 393216,
"uuid" : "d9c2a46e-8dc4-3950-9d6a-f799e8ccb683",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
}
],
"sharedCache" : {
"base" : 7596359680,
"size" : 3136077824,
"uuid" : "513553bb-5ca5-3b9e-a613-b0603ffe3038"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=749.2M resident=0K(0%) swapped_out_or_unallocated=749.2M(100%)\nWritable regions: Total=694.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=694.4M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nKernel Alloc Once 32K 1 \nMALLOC 181.2M 20 \nMALLOC guard page 96K 5 \nMALLOC_MEDIUM (reserved) 120.0M 1 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.0M 1 \nStack 8176K 1 \n__AUTH 1614K 130 \n__AUTH_CONST 7822K 275 \n__DATA 7074K 261 \n__DATA_CONST 6221K 275 \n__DATA_DIRTY 331K 87 \n__FONT_DATA 4K 1 \n__LINKEDIT 577.4M 5 \n__OBJC_CONST 736K 99 \n__OBJC_RO 83.0M 1 \n__OBJC_RW 3152K 1 \n__TEXT 171.7M 286 \n__UNICODE 592K 1 \ndyld private memory 1024K 1 \nshared memory 32K 2 \n=========== ======= ======= \nTOTAL 1.6G 1456 \nTOTAL, minus reserved VM space 1.1G 1456 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
}
}
dotnet:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: dotnet [69891]
Path: /usr/local/share/dotnet/dotnet
Identifier: dotnet
Version: ???
Code Type: ARM-64 (Native)
Parent Process: Exited process [69890]
Responsible: iTerm2 [976]
User ID: 0
Date/Time: 2022-07-14 11:11:43.3872 -0400
OS Version: macOS 12.4 (21F79)
Report Version: 12
Anonymous UUID: 1143D3D0-7711-BC35-8E10-8642D5EAA935
Sleep/Wake UUID: 34A43029-CA6F-41F5-A1A5-0CB06109376D
Time Awake Since Boot: 180000 seconds
Time Since Wake: 8591 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000001000000b0
Exception Codes: 0x0000000000000001, 0x00000001000000b0
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [69891]
VM Region Info: 0x1000000b0 is not in any region. Bytes before following region: 1048400
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 100100000-100110000 [ 64K] r-x/r-x SM=COW ...dotnet/dotnet
Kernel Triage:
VM - pmap_enter failed with resource shortage
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libcoreclr.dylib 0x100e76ae4 RtlpUnwindFunctionFull(unsigned long, unsigned long, _RUNTIME_FUNCTION*, _CONTEXT*, unsigned long*, int (**)(_EXCEPTION_RECORD*, unsigned long, _CONTEXT*, void*), void**, _ARM64_UNWIND_PARAMS*) + 1684
1 libcoreclr.dylib 0x100e77810 RtlVirtualUnwind + 120
2 libcoreclr.dylib 0x100e77810 RtlVirtualUnwind + 120
3 libcoreclr.dylib 0x100d8848c UnwindManagedExceptionPass1(PAL_SEHException&, _CONTEXT*) + 276
4 libcoreclr.dylib 0x100d8878c DispatchManagedException(PAL_SEHException&, bool) + 68
5 libcoreclr.dylib 0x100d82778 HandleHardwareException(PAL_SEHException*) + 804
6 libcoreclr.dylib 0x100b46260 SEHProcessException(PAL_SEHException*) + 348
7 libcoreclr.dylib 0x100b797c8 PAL_DispatchException + 136
8 libcoreclr.dylib 0x100b79458 PAL_DispatchExceptionWrapper + 16
9 ??? 0x1033dd66c ???
Thread 1:
0 libsystem_kernel.dylib 0x1c4f628b0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1c4f62d20 mach_msg + 76
2 libcoreclr.dylib 0x100b7a5d0 MachMessage::Receive(unsigned int) + 80
3 libcoreclr.dylib 0x100b7995c SEHExceptionThread(void*) + 144
4 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
5 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 2:
0 libsystem_kernel.dylib 0x1c4f68c20 kevent + 8
1 libcoreclr.dylib 0x100b6f258 CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 396
2 libcoreclr.dylib 0x100b6e9c4 CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 140
3 libcoreclr.dylib 0x100b774fc CorUnix::CPalThread::ThreadEntry(void*) + 380
4 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
5 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 3:
0 libsystem_kernel.dylib 0x1c4f6aeb0 poll + 8
1 libcoreclr.dylib 0x100e74a60 ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int)) + 184
2 libcoreclr.dylib 0x100f274a4 ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int)) + 908
3 libcoreclr.dylib 0x100f2533c server_thread(void*) + 332
4 libcoreclr.dylib 0x100b774fc CorUnix::CPalThread::ThreadEntry(void*) + 380
5 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
6 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 4:
0 libsystem_kernel.dylib 0x1c4f634d0 __open + 8
1 libsystem_kernel.dylib 0x1c4f6dff8 open + 64
2 libcoreclr.dylib 0x100e758bc TwoWayPipe::WaitForConnection() + 40
3 libcoreclr.dylib 0x100e6f7bc DbgTransportSession::TransportWorker() + 232
4 libcoreclr.dylib 0x100e6e8ac DbgTransportSession::TransportWorkerStatic(void*) + 12
5 libcoreclr.dylib 0x100b774fc CorUnix::CPalThread::ThreadEntry(void*) + 380
6 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
7 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 5:
0 libsystem_kernel.dylib 0x1c4f66270 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1c4fa083c _pthread_cond_wait + 1236
2 libcoreclr.dylib 0x100b6cf8c CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 308
3 libcoreclr.dylib 0x100b6cbfc CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x100b70d10 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x100e6d1ac DebuggerRCThread::MainLoop() + 208
6 libcoreclr.dylib 0x100e6d078 DebuggerRCThread::ThreadProc() + 232
7 libcoreclr.dylib 0x100e6ce50 DebuggerRCThread::ThreadProcStatic(void*) + 32
8 libcoreclr.dylib 0x100b774fc CorUnix::CPalThread::ThreadEntry(void*) + 380
9 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
10 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 6:
0 libsystem_kernel.dylib 0x1c4f66270 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1c4fa083c _pthread_cond_wait + 1236
2 libcoreclr.dylib 0x100b6cf70 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 280
3 libcoreclr.dylib 0x100b6cbfc CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x100b70d10 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656
5 libcoreclr.dylib 0x100b70ef0 WaitForSingleObjectEx + 80
6 libcoreclr.dylib 0x100d512b0 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 192
7 libcoreclr.dylib 0x100cc6320 FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 48
8 libcoreclr.dylib 0x100cc6538 FinalizerThread::FinalizerThreadWorker(void*) + 252
9 libcoreclr.dylib 0x100c56088 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 260
10 libcoreclr.dylib 0x100c56650 ManagedThreadBase::FinalizerBase(void (*)(void*)) + 36
11 libcoreclr.dylib 0x100cc6670 FinalizerThread::FinalizerThreadStart(void*) + 88
12 libcoreclr.dylib 0x100b774fc CorUnix::CPalThread::ThreadEntry(void*) + 380
13 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
14 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 7:
0 libsystem_kernel.dylib 0x1c4f66270 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1c4fa083c _pthread_cond_wait + 1236
2 libcoreclr.dylib 0x100b6cf70 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 280
3 libcoreclr.dylib 0x100b6cbfc CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356
4 libcoreclr.dylib 0x100b71448 SleepEx + 160
5 libcoreclr.dylib 0x100c59280 TieredCompilationManager::BackgroundWorkerStart() + 212
6 libcoreclr.dylib 0x100c590d0 TieredCompilationManager::BackgroundWorkerBootstrapper1(void*) + 104
7 libcoreclr.dylib 0x100c56088 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 260
8 libcoreclr.dylib 0x100c565f4 ManagedThreadBase::KickOff(void (*)(void*), void*) + 32
9 libcoreclr.dylib 0x100c58fe4 TieredCompilationManager::BackgroundWorkerBootstrapper0(void*) + 40
10 libcoreclr.dylib 0x100b774fc CorUnix::CPalThread::ThreadEntry(void*) + 380
11 libsystem_pthread.dylib 0x1c4fa026c _pthread_start + 148
12 libsystem_pthread.dylib 0x1c4f9b08c thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x00000000000000c8 x2: 0x0000000000000013 x3: 0x0000000100f56bb4
x4: 0x000000016fcfc9a0 x5: 0x000000016fcfc8f8 x6: 0x000000016fcfc998 x7: 0x000000016fcfc8e8
x8: 0x0000000000000001 x9: 0x00000001000000b0 x10: 0x000000000000000a x11: 0x000000016fcfcef0
x12: 0x0000000000000013 x13: 0x0000000000000013 x14: 0x0000000000000000 x15: 0x00000000000002ad
x16: 0x00000000004002ad x17: 0x00006000019702d0 x18: 0x0000000000000000 x19: 0x000000016fcfcef0
x20: 0x000000016fcfc8f8 x21: 0x00000001033158bb x22: 0x000000016fcfce50 x23: 0x000000016fcfc8e8
x24: 0x00000001033158c4 x25: 0x00000001033158c0 x26: 0x000000010341d374 x27: 0x000000016fcfcf50
x28: 0x000000016fcfce58 fp: 0x000000016fcfc8d0 lr: 0x0000000100e77810
sp: 0x000000016fcfc870 pc: 0x0000000100e76ae4 cpsr: 0x00001000
far: 0x00000001000000b0 esr: 0x92000007 (Data Abort) byte read Translation fault
Binary Images:
0x100b3c000 - 0x100fe7fff libcoreclr.dylib (*) <16d91f8b-d860-3b0e-84b6-5625616eab46> /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.6.22324.4/libcoreclr.dylib
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x1c4f61000 - 0x1c4f98fff libsystem_kernel.dylib (*) <03f48dc5-caa7-3678-af61-1a3c7fa8b06e> /usr/lib/system/libsystem_kernel.dylib
0x1c4f99000 - 0x1c4fa5fff libsystem_pthread.dylib (*) <42166a2c-89a9-3c38-a215-f028544cea23> /usr/lib/system/libsystem_pthread.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=664.1M resident=0K(0%) swapped_out_or_unallocated=664.1M(100%)
Writable regions: Total=1.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.1G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 32K 1
MALLOC 196.2M 21
MALLOC guard page 96K 5
MALLOC_MEDIUM (reserved) 480.0M 4 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.1M 8
Stack 11.7M 8
VM_ALLOCATE 1.4G 240
VM_ALLOCATE (reserved) 64K 1 reserved VM address space (unallocated)
__AUTH 220K 44
__AUTH_CONST 2891K 122
__DATA 1249K 122
__DATA_CONST 3872K 129
__DATA_DIRTY 233K 50
__LINKEDIT 579.6M 8
__OBJC_CONST 260K 29
__OBJC_RO 83.0M 1
__OBJC_RW 3152K 1
__TEXT 84.5M 135
__UNICODE 592K 1
dyld private memory 1024K 1
mapped file 53.8M 90
shared memory 32K 2
=========== ======= =======
TOTAL 3.3G 1024
TOTAL, minus reserved VM space 2.4G 1024
-----------
Full Report
-----------
{"app_name":"dotnet","timestamp":"2022-07-14 11:11:43.00 -0400","app_version":"","slice_uuid":"a4c9014a-cbf5-3a01-901c-33d6f5d9454d","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.4 (21F79)","incident_id":"E6B8EF0C-DFEE-49E8-AA8A-5DE88F557088","name":"dotnet"}
{
"uptime" : 180000,
"procLaunch" : "2022-07-14 11:11:43.1996 -0400",
"procRole" : "Unspecified",
"version" : 2,
"userID" : 0,
"deployVersion" : 210,
"modelCode" : "MacBookPro17,1",
"procStartAbsTime" : 4430905190766,
"coalitionID" : 937,
"osVersion" : {
"train" : "macOS 12.4",
"build" : "21F79",
"releaseType" : "User"
},
"captureTime" : "2022-07-14 11:11:43.3872 -0400",
"incident" : "E6B8EF0C-DFEE-49E8-AA8A-5DE88F557088",
"bug_type" : "309",
"pid" : 69891,
"procExitAbsTime" : 4430909681756,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "dotnet",
"procPath" : "\/usr\/local\/share\/dotnet\/dotnet",
"parentProc" : "Exited process",
"parentPid" : 69890,
"coalitionName" : "com.googlecode.iterm2",
"crashReporterKey" : "1143D3D0-7711-BC35-8E10-8642D5EAA935",
"responsiblePid" : 976,
"responsibleProc" : "iTerm2",
"wakeTime" : 8591,
"sleepWakeUUID" : "34A43029-CA6F-41F5-A1A5-0CB06109376D",
"sip" : "enabled",
"vmRegionInfo" : "0x1000000b0 is not in any region. Bytes before following region: 1048400\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 100100000-100110000 [ 64K] r-x\/r-x SM=COW ...dotnet\/dotnet",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000001, 0x00000001000000b0","rawCodes":[1,4294967472],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x00000001000000b0"},
"termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":69891},
"ktriageinfo" : "VM - pmap_enter failed with resource shortage\n",
"vmregioninfo" : "0x1000000b0 is not in any region. Bytes before following region: 1048400\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 100100000-100110000 [ 64K] r-x\/r-x SM=COW ...dotnet\/dotnet",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":1944380,"threadState":{"x":[{"value":0},{"value":200},{"value":19},{"value":4311051188,"symbolLocation":8,"symbol":"typeinfo name for Walker"},{"value":6170855840},{"value":6170855672},{"value":6170855832},{"value":6170855656},{"value":1},{"value":4294967472},{"value":10},{"value":6170857200},{"value":19},{"value":19},{"value":0},{"value":685},{"value":4194989},{"value":105553142940368},{"value":0},{"value":6170857200},{"value":6170855672},{"value":4348532923},{"value":6170857040},{"value":6170855656},{"value":4348532932},{"value":4348532928},{"value":4349612916},{"value":6170857296},{"value":6170857048}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4310136848},"cpsr":{"value":4096},"fp":{"value":6170855632},"sp":{"value":6170855536},"esr":{"value":2449473543,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":4310133476,"matchesCrashFrame":1},"far":{"value":4294967472}},"queue":"com.apple.main-thread","frames":[{"imageOffset":3386084,"symbol":"RtlpUnwindFunctionFull(unsigned long, unsigned long, _RUNTIME_FUNCTION*, _CONTEXT*, unsigned long*, int (**)(_EXCEPTION_RECORD*, unsigned long, _CONTEXT*, void*), void**, _ARM64_UNWIND_PARAMS*)","symbolLocation":1684,"imageIndex":0},{"imageOffset":3389456,"symbol":"RtlVirtualUnwind","symbolLocation":120,"imageIndex":0},{"imageOffset":3389456,"symbol":"RtlVirtualUnwind","symbolLocation":120,"imageIndex":0},{"imageOffset":2409612,"symbol":"UnwindManagedExceptionPass1(PAL_SEHException&, _CONTEXT*)","symbolLocation":276,"imageIndex":0},{"imageOffset":2410380,"symbol":"DispatchManagedException(PAL_SEHException&, bool)","symbolLocation":68,"imageIndex":0},{"imageOffset":2385784,"symbol":"HandleHardwareException(PAL_SEHException*)","symbolLocation":804,"imageIndex":0},{"imageOffset":41568,"symbol":"SEHProcessException(PAL_SEHException*)","symbolLocation":348,"imageIndex":0},{"imageOffset":251848,"symbol":"PAL_DispatchException","symbolLocation":136,"imageIndex":0},{"imageOffset":250968,"symbol":"PAL_DispatchExceptionWrapper","symbolLocation":16,"imageIndex":0},{"imageOffset":4349351532,"imageIndex":1}]},{"id":1944381,"frames":[{"imageOffset":6320,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":2},{"imageOffset":7456,"symbol":"mach_msg","symbolLocation":76,"imageIndex":2},{"imageOffset":255440,"symbol":"MachMessage::Receive(unsigned int)","symbolLocation":80,"imageIndex":0},{"imageOffset":252252,"symbol":"SEHExceptionThread(void*)","symbolLocation":144,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1944382,"frames":[{"imageOffset":31776,"symbol":"kevent","symbolLocation":8,"imageIndex":2},{"imageOffset":209496,"symbol":"CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int)","symbolLocation":396,"imageIndex":0},{"imageOffset":207300,"symbol":"CorUnix::CPalSynchronizationManager::WorkerThread(void*)","symbolLocation":140,"imageIndex":0},{"imageOffset":242940,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1944383,"frames":[{"imageOffset":40624,"symbol":"poll","symbolLocation":8,"imageIndex":2},{"imageOffset":3377760,"symbol":"ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int))","symbolLocation":184,"imageIndex":0},{"imageOffset":4109476,"symbol":"ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int))","symbolLocation":908,"imageIndex":0},{"imageOffset":4100924,"symbol":"server_thread(void*)","symbolLocation":332,"imageIndex":0},{"imageOffset":242940,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1944384,"frames":[{"imageOffset":9424,"symbol":"__open","symbolLocation":8,"imageIndex":2},{"imageOffset":53240,"symbol":"open","symbolLocation":64,"imageIndex":2},{"imageOffset":3381436,"symbol":"TwoWayPipe::WaitForConnection()","symbolLocation":40,"imageIndex":0},{"imageOffset":3356604,"symbol":"DbgTransportSession::TransportWorker()","symbolLocation":232,"imageIndex":0},{"imageOffset":3352748,"symbol":"DbgTransportSession::TransportWorkerStatic(void*)","symbolLocation":12,"imageIndex":0},{"imageOffset":242940,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1944385,"frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":3},{"imageOffset":200588,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":308,"imageIndex":0},{"imageOffset":199676,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":356,"imageIndex":0},{"imageOffset":216336,"symbol":"CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int)","symbolLocation":1656,"imageIndex":0},{"imageOffset":3346860,"symbol":"DebuggerRCThread::MainLoop()","symbolLocation":208,"imageIndex":0},{"imageOffset":3346552,"symbol":"DebuggerRCThread::ThreadProc()","symbolLocation":232,"imageIndex":0},{"imageOffset":3346000,"symbol":"DebuggerRCThread::ThreadProcStatic(void*)","symbolLocation":32,"imageIndex":0},{"imageOffset":242940,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1944386,"frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":3},{"imageOffset":200560,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":280,"imageIndex":0},{"imageOffset":199676,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":356,"imageIndex":0},{"imageOffset":216336,"symbol":"CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int)","symbolLocation":1656,"imageIndex":0},{"imageOffset":216816,"symbol":"WaitForSingleObjectEx","symbolLocation":80,"imageIndex":0},{"imageOffset":2183856,"symbol":"CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*)","symbolLocation":192,"imageIndex":0},{"imageOffset":1614624,"symbol":"FinalizerThread::WaitForFinalizerEvent(CLREvent*)","symbolLocation":48,"imageIndex":0},{"imageOffset":1615160,"symbol":"FinalizerThread::FinalizerThreadWorker(void*)","symbolLocation":252,"imageIndex":0},{"imageOffset":1155208,"symbol":"ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)","symbolLocation":260,"imageIndex":0},{"imageOffset":1156688,"symbol":"ManagedThreadBase::FinalizerBase(void (*)(void*))","symbolLocation":36,"imageIndex":0},{"imageOffset":1615472,"symbol":"FinalizerThread::FinalizerThreadStart(void*)","symbolLocation":88,"imageIndex":0},{"imageOffset":242940,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1944387,"frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":3},{"imageOffset":200560,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":280,"imageIndex":0},{"imageOffset":199676,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":356,"imageIndex":0},{"imageOffset":218184,"symbol":"SleepEx","symbolLocation":160,"imageIndex":0},{"imageOffset":1168000,"symbol":"TieredCompilationManager::BackgroundWorkerStart()","symbolLocation":212,"imageIndex":0},{"imageOffset":1167568,"symbol":"TieredCompilationManager::BackgroundWorkerBootstrapper1(void*)","symbolLocation":104,"imageIndex":0},{"imageOffset":1155208,"symbol":"ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)","symbolLocation":260,"imageIndex":0},{"imageOffset":1156596,"symbol":"ManagedThreadBase::KickOff(void (*)(void*), void*)","symbolLocation":32,"imageIndex":0},{"imageOffset":1167332,"symbol":"TieredCompilationManager::BackgroundWorkerBootstrapper0(void*)","symbolLocation":40,"imageIndex":0},{"imageOffset":242940,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64",
"base" : 4306747392,
"size" : 4898816,
"uuid" : "16d91f8b-d860-3b0e-84b6-5625616eab46",
"path" : "\/usr\/local\/share\/dotnet\/shared\/Microsoft.NETCore.App\/7.0.0-preview.6.22324.4\/libcoreclr.dylib",
"name" : "libcoreclr.dylib"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7599427584,
"size" : 229376,
"uuid" : "03f48dc5-caa7-3678-af61-1a3c7fa8b06e",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7599656960,
"size" : 53248,
"uuid" : "42166a2c-89a9-3c38-a215-f028544cea23",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
}
],
"sharedCache" : {
"base" : 7596359680,
"size" : 3136077824,
"uuid" : "513553bb-5ca5-3b9e-a613-b0603ffe3038"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=664.1M resident=0K(0%) swapped_out_or_unallocated=664.1M(100%)\nWritable regions: Total=1.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.1G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nKernel Alloc Once 32K 1 \nMALLOC 196.2M 21 \nMALLOC guard page 96K 5 \nMALLOC_MEDIUM (reserved) 480.0M 4 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.1M 8 \nStack 11.7M 8 \nVM_ALLOCATE 1.4G 240 \nVM_ALLOCATE (reserved) 64K 1 reserved VM address space (unallocated)\n__AUTH 220K 44 \n__AUTH_CONST 2891K 122 \n__DATA 1249K 122 \n__DATA_CONST 3872K 129 \n__DATA_DIRTY 233K 50 \n__LINKEDIT 579.6M 8 \n__OBJC_CONST 260K 29 \n__OBJC_RO 83.0M 1 \n__OBJC_RW 3152K 1 \n__TEXT 84.5M 135 \n__UNICODE 592K 1 \ndyld private memory 1024K 1 \nmapped file 53.8M 90 \nshared memory 32K 2 \n=========== ======= ======= \nTOTAL 3.3G 1024 \nTOTAL, minus reserved VM space 2.4G 1024 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
}
}
Further technical details
dotnet --info
% dotnet --info
.NET SDK:
Version: 7.0.100-preview.6.22352.1
Commit: 492644e08e
Runtime Environment:
OS Name: Mac OS X
OS Version: 12.4
OS Platform: Darwin
RID: osx.12-arm64
Base Path: /usr/local/share/dotnet/sdk/7.0.100-preview.6.22352.1/
Host:
Version: 7.0.0-preview.6.22329.5
Architecture: arm64
Commit: 0402550585
.NET SDKs installed:
6.0.100 [/usr/local/share/dotnet/sdk]
6.0.202 [/usr/local/share/dotnet/sdk]
6.0.300 [/usr/local/share/dotnet/sdk]
6.0.301 [/usr/local/share/dotnet/sdk]
6.0.302 [/usr/local/share/dotnet/sdk]
7.0.100-preview.6.22352.1 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0-preview.6.22330.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0-preview.6.22324.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
x64 [/usr/local/share/dotnet/x64]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
I’m on macOS 12.4 on an Apple M1 macbook pro
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 41 (40 by maintainers)
yeah agree, there might be multiple issues here. Just hoping to narrow down the cause – since a dump is not providing enough info.
So it turns out this sudo temp home directory might somehow be the problem on ARM64. A bit of context first. When running
dotnet workloadundersudoin Unix platforms, the SDK creates a folder called/tmp/dotnet_sudo_home(worth emphasizing the SDK code only does this creation for theworkloadcommand). The first time, everything works fine. Subsequently, as long as that directory exists when we calldotnet workload, then the Segmentation Fault: 11 will occur. If I get rid of it manually viasudo rm -rf /tmp/dotnet_sudo_home, then things work again well… But only once. That is, unless I delete it again.Stepping through the sdk repo code with the debugger, I found out about this directory’s creation. If such directory exists, and it is only “Root-Writeable”, then the code attempts to delete it. This is certainly not happening as per what I described above. The question is whether for some reason that code is not being executed, or if it’s failing silently. Then, it seems to try to copy NuGet stuff to this temp sudo home directory.
It’s worth emphasizing again this process flow only happens when one runs
sudo dotnet workloadon a Unix-based ARM64 machine. I wonder what the runtime is doing to cause this restricted memory access.Just tested and verified the fix in the linked PR works with the latest official SDK build. Closing issue now.
@ivdiazsa you can check the commit # of e.g. libcoreclr.dylib from the SDK you are trying to use and then find the commit in the list of commits on github. You’d then see if the commit that fixes the issue is earlier or later than the SDK one.
I’m not sure. There still isn’t a new
[main] Update dependencies from dotnet/sdkPR in dotnet/installer. I’m not sure when the new one will be PR’d + merged. After that happens, then the next official build will have the fix.I wonder if this code is a culprit here:
https://github.com/dotnet/sdk/blob/e665353110ad7770b368544a62ede0c241222354/src/Cli/dotnet/StatInterop.cs#L20-L72
This code is P/Invoking into our System.Native shim.
We updated the P/Invoke signature here:
https://github.com/dotnet/runtime/commit/82a2562fc9ee0986ee20ee309ad0bc259c561683#diff-8783a8c5c370d711fd497b66726e53637897c6d6b05c2c40b5a17aeadaa7c934R34
But we never updated the signature in the
dotnet/sdk.I think this is a great reason why we don’t recommend people to p/invoke into our System.*.Native shims. They are not stable ABI.
That’s about right. That’s the bug in the sdk side. What you are seeing is just part of what should be created. Fixing the sdk bug would make the
.nugetfolder be created as well.Yes - doing (2), skipping (3) then doing (4) fixes it for me also.
sudo rm -rf /tmp/dotnet_sudo_homelets me runsudo dotnet workload --help. I can run other workload commands, too, if I keep deleting/tmp/dotnet_sudo_homebetween commands.btw:
sudo dotnet workload --helpdoesn’t create/tmp/dotnet_sudo_home/.nuget/for me, it creates this stuff instead:not sure if that’s relevant
The SOS plugin should be able to help with this. Have you tried using that?
If I download the .tar.gz binaries and install into a local folder and then do this, the resutl is also a crash:
(but of course for a local install I wouldn’t be using
sudo)