sandreas / tone

tone is a cross platform audio tagger and metadata editor to dump and modify metadata for a wide variety of formats, including mp3, m4b, flac and more. It has no dependencies and can be downloaded as single binary for Windows, macOS, Linux and other common platforms.
https://pilabor.com
Apache License 2.0
421 stars 17 forks source link

tone quit unexpectedly - m1 Mac #6

Closed csandman closed 1 year ago

csandman commented 2 years ago

Hey! this projects seems like it could definitely be useful but I wanted to let you know that it's not running on my m1 Mac. I installed following the instructions in the readme, and when I try to run tone --help I get this:

zsh: bus error  tone --help

There is also a full error log from the OS, which I'm not sure will be any help, but I figure I might as well add that too:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               tone [7311]
Path:                  /usr/local/bin/tone
Identifier:            tone
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        zsh [2290]
Responsible:           iTerm2 [2240]
User ID:               501

Date/Time:             2022-05-25 22:55:54.5793 -0400
OS Version:            macOS 12.3 (21E230)
Report Version:        12
Anonymous UUID:        944DF720-1207-90C0-C191-F086EC41CE95

Time Awake Since Boot: 7200 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x000000012566393c
Exception Codes:       0x0000000000000002, 0x000000012566393c
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process:   exc handler [7311]

VM Region Info: 0x12566393c is in 0x125308000-0x125830000;  bytes after start: 3520828  bytes before end: 1885891
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      VM_ALLOCATE                 1252fc000-125308000    [   48K] rw-/rwx SM=ZER  
--->  VM_ALLOCATE                 125308000-125830000    [ 5280K] r-x/rwx SM=ZER  
      VM_ALLOCATE                 125830000-12596c000    [ 1264K] rw-/rwx SM=ZER  

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   tone                                   0x1033ed298 PEImageLayout::ApplyBaseRelocations() + 496
1   tone                                   0x1033ed21c PEImageLayout::ApplyBaseRelocations() + 372
2   tone                                   0x1033ed894 ConvertedImageLayout::ConvertedImageLayout(PEImageLayout*, int) + 708
3   tone                                   0x1033ece24 PEImageLayout::LoadConverted(PEImage*, int) + 80
4   tone                                   0x1033ecef8 PEImageLayout::Map(PEImage*) + 36
5   tone                                   0x102f8df9c PEImage::CreateLayoutMapped() + 116
6   tone                                   0x102f8de08 PEImage::GetLayoutInternal(unsigned int, unsigned int) + 116
7   tone                                   0x102f8c6e4 PEImage::GetLayout(unsigned int, unsigned int) + 236
8   tone                                   0x103017174 BinderAcquireImport + 164
9   tone                                   0x1031ee098 BINDER_SPACE::AssemblyBinder::GetAssembly(SString&, int, int, BINDER_SPACE::Assembly**, char16_t const*, BundleFileLocation) + 436
10  tone                                   0x1031ed944 BINDER_SPACE::AssemblyBinder::BindToSystem(SString&, BINDER_SPACE::Assembly**, bool) + 432
11  tone                                   0x1031f6488 CCoreCLRBinderHelper::BindToSystem(ICLRPrivAssembly**, bool) + 292
12  tone                                   0x102f8b438 PEAssembly::DoOpenSystem(IUnknown*) + 64
13  tone                                   0x102f8b1d4 PEAssembly::OpenSystem(IUnknown*) + 132
14  tone                                   0x102ed7d48 SystemDomain::LoadBaseSystemClasses() + 28
15  tone                                   0x102ed7a94 SystemDomain::Init() + 580
16  tone                                   0x1033ead40 EEStartupHelper() + 1696
17  tone                                   0x1033ea0a0 EEStartup() + 196
18  tone                                   0x1033e9fc0 EnsureEEStarted() + 356
19  tone                                   0x102f189d4 CorHost2::Start() + 124
20  tone                                   0x1033eea04 coreclr_initialize + 724
21  tone                                   0x102ea87b8 coreclr_t::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, coreclr_property_bag_t const&, std::__1::unique_ptr<coreclr_t, std::__1::default_delete<coreclr_t> >&) + 412
22  tone                                   0x102eb5af0 (anonymous namespace)::create_coreclr() + 432
23  tone                                   0x102eb55b4 corehost_main + 160
24  tone                                   0x102e963a0 fx_muxer_t::handle_exec_host_command(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, host_startup_info_t const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::unordered_map<known_options, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, 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<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > > > const&, int, char const**, int, host_mode_t, bool, char*, int, int*) + 1320
25  tone                                   0x102e9548c fx_muxer_t::execute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int, char const**, host_startup_info_t const&, char*, int, int*) + 856
26  tone                                   0x102e91f6c hostfxr_main_bundle_startupinfo + 196
27  tone                                   0x102ed53e8 exe_start(int, char const**) + 1124
28  tone                                   0x102ed56d8 main + 152
29  dyld                                   0x1044e5088 start + 516

Thread 1:
0   libsystem_kernel.dylib                 0x19db248d0 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x19db24d40 mach_msg + 76
2   tone                                   0x10349405c MachMessage::Receive(unsigned int) + 80
3   tone                                   0x1034933f8 SEHExceptionThread(void*) + 148
4   libsystem_pthread.dylib                0x19db6226c _pthread_start + 148
5   libsystem_pthread.dylib                0x19db5d08c thread_start + 8

Thread 2:
0   libsystem_kernel.dylib                 0x19db2ac40 kevent + 8
1   tone                                   0x103487998 CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 464
2   tone                                   0x103487098 CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 116
3   tone                                   0x103490f7c CorUnix::CPalThread::ThreadEntry(void*) + 380
4   libsystem_pthread.dylib                0x19db6226c _pthread_start + 148
5   libsystem_pthread.dylib                0x19db5d08c thread_start + 8

Thread 3:
0   libsystem_kernel.dylib                 0x19db2ced0 poll + 8
1   tone                                   0x1031e7980 ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int)) + 180
2   tone                                   0x10329d10c ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int)) + 884
3   tone                                   0x10329b1c8 server_thread(void*) + 324
4   tone                                   0x103490f7c CorUnix::CPalThread::ThreadEntry(void*) + 380
5   libsystem_pthread.dylib                0x19db6226c _pthread_start + 148
6   libsystem_pthread.dylib                0x19db5d08c thread_start + 8

Thread 4:
0   libsystem_kernel.dylib                 0x19db254f0 __open + 8
1   libsystem_kernel.dylib                 0x19db30018 open + 64
2   tone                                   0x1031e84c4 TwoWayPipe::WaitForConnection() + 40
3   tone                                   0x1031e242c DbgTransportSession::TransportWorker() + 196
4   tone                                   0x1031e14fc DbgTransportSession::TransportWorkerStatic(void*) + 12
5   tone                                   0x103490f7c CorUnix::CPalThread::ThreadEntry(void*) + 380
6   libsystem_pthread.dylib                0x19db6226c _pthread_start + 148
7   libsystem_pthread.dylib                0x19db5d08c thread_start + 8

Thread 5:
0   libsystem_kernel.dylib                 0x19db28290 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x19db6283c _pthread_cond_wait + 1236
2   tone                                   0x103485688 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 340
3   tone                                   0x103485340 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 444
4   tone                                   0x1034895b0 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1676
5   tone                                   0x1031dfcfc DebuggerRCThread::MainLoop() + 208
6   tone                                   0x1031dfbc0 DebuggerRCThread::ThreadProc() + 248
7   tone                                   0x1031df988 DebuggerRCThread::ThreadProcStatic(void*) + 32
8   tone                                   0x103490f7c CorUnix::CPalThread::ThreadEntry(void*) + 380
9   libsystem_pthread.dylib                0x19db6226c _pthread_start + 148
10  libsystem_pthread.dylib                0x19db5d08c thread_start + 8

Thread 6:
0   libsystem_kernel.dylib                 0x19db28290 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x19db6283c _pthread_cond_wait + 1236
2   tone                                   0x103485654 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 288
3   tone                                   0x103485340 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 444
4   tone                                   0x1034895b0 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1676
5   tone                                   0x10348976c WaitForSingleObjectEx + 80
6   tone                                   0x1030c1978 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 196
7   tone                                   0x103032dd4 FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 48
8   tone                                   0x103032fec FinalizerThread::FinalizerThreadWorker(void*) + 252
9   tone                                   0x102fbd820 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 260
10  tone                                   0x102fbddf4 ManagedThreadBase::FinalizerBase(void (*)(void*)) + 36
11  tone                                   0x103033124 FinalizerThread::FinalizerThreadStart(void*) + 88
12  tone                                   0x103490f7c CorUnix::CPalThread::ThreadEntry(void*) + 380
13  libsystem_pthread.dylib                0x19db6226c _pthread_start + 148
14  libsystem_pthread.dylib                0x19db5d08c thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000012596f400   x1: 0x0000000fffffc110   x2: 0x0000000000000000   x3: 0x000000016cf7595c
    x4: 0xffffffffff984000   x5: 0x0000000000000020   x6: 0x000000016cf75938   x7: 0x000000016cf75958
    x8: 0x000000000000000e   x9: 0x000000012566393c  x10: 0x000000012583f238  x11: 0x0000000000000000
   x12: 0x0000000000000020  x13: 0x0000000125308200  x14: 0x0000000000525400  x15: 0x00000001252f81b0
   x16: 0x000000019db62f5c  x17: 0x0000000126704080  x18: 0x0000000000000000  x19: 0x00000000000045d8
   x20: 0x000000020000001c  x21: 0x0000000125663000  x22: 0x0000000000000024  x23: 0x0000000125308200
   x24: 0x0000000000000020  x25: 0xffffffffa52f8000  x26: 0x000000012596f408  x27: 0x0000000000000000
   x28: 0x0000000000000000   fp: 0x000000016cf75990   lr: 0xa9590001033ed21c
    sp: 0x000000016cf75910   pc: 0x00000001033ed298 cpsr: 0x60001000
   far: 0x000000012566393c  esr: 0x9200004f (Data Abort) byte write Permission fault

Binary Images:
       0x102e88000 -        0x1035ebfff tone (*) <3ddf2c6d-8b74-3ae6-af41-29399701b1f5> /usr/local/bin/tone
       0x1044e0000 -        0x10453ffff dyld (*) <fbb89662-e6f2-3434-b542-f75185ac5e74> /usr/lib/dyld
       0x19db23000 -        0x19db5afff libsystem_kernel.dylib (*) <1d7b3b8e-75a1-34ea-aa52-9f7c23155c55> /usr/lib/system/libsystem_kernel.dylib
       0x19db5b000 -        0x19db67fff libsystem_pthread.dylib (*) <cee8bc77-6923-34d9-89a3-6f8f7279605e> /usr/lib/system/libsystem_pthread.dylib
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

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=684.0M resident=0K(0%) swapped_out_or_unallocated=684.0M(100%)
Writable regions: Total=805.8M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=805.8M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Kernel Alloc Once                   32K        1 
MALLOC                           162.2M       15 
MALLOC guard page                   96K        5 
MALLOC_MEDIUM (reserved)         240.0M        2         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.1M        7 
Stack                             11.2M        7 
VM_ALLOCATE                        2.5G       20 
__AUTH                             241K       50 
__AUTH_CONST                      2960K      129 
__DATA                            1162K      123 
__DATA_CONST                      3917K      130 
__DATA_DIRTY                       234K       51 
__LINKEDIT                       596.4M        3 
__OBJC_CONST                       279K       31 
__OBJC_RO                         82.9M        1 
__OBJC_RW                         3152K        1 
__TEXT                            87.7M      137 
__UNICODE                          592K        1 
dyld private memory               1024K        1 
shared memory                       16K        1 
===========                     =======  ======= 
TOTAL                              4.1G      717 
TOTAL, minus reserved VM space     3.5G      717 

-----------
Full Report
-----------

{"app_name":"tone","timestamp":"2022-05-25 22:55:54.00 -0400","app_version":"","slice_uuid":"3ddf2c6d-8b74-3ae6-af41-29399701b1f5","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.3 (21E230)","incident_id":"557236BB-9373-4317-94E2-2BC2749FD62E","name":"tone"}
{
  "uptime" : 7200,
  "procLaunch" : "2022-05-25 22:55:54.4866 -0400",
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookAir10,1",
  "procStartAbsTime" : 175005232415,
  "coalitionID" : 1311,
  "osVersion" : {
    "train" : "macOS 12.3",
    "build" : "21E230",
    "releaseType" : "User"
  },
  "captureTime" : "2022-05-25 22:55:54.5793 -0400",
  "incident" : "557236BB-9373-4317-94E2-2BC2749FD62E",
  "bug_type" : "309",
  "pid" : 7311,
  "procExitAbsTime" : 175007355565,
  "translated" : false,
  "cpuType" : "ARM-64",
  "procName" : "tone",
  "procPath" : "\/usr\/local\/bin\/tone",
  "parentProc" : "zsh",
  "parentPid" : 2290,
  "coalitionName" : "com.googlecode.iterm2",
  "crashReporterKey" : "944DF720-1207-90C0-C191-F086EC41CE95",
  "responsiblePid" : 2240,
  "responsibleProc" : "iTerm2",
  "sip" : "enabled",
  "vmRegionInfo" : "0x12566393c is in 0x125308000-0x125830000;  bytes after start: 3520828  bytes before end: 1885891\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      VM_ALLOCATE                 1252fc000-125308000    [   48K] rw-\/rwx SM=ZER  \n--->  VM_ALLOCATE                 125308000-125830000    [ 5280K] r-x\/rwx SM=ZER  \n      VM_ALLOCATE                 125830000-12596c000    [ 1264K] rw-\/rwx SM=ZER  ",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000002, 0x000000012566393c","rawCodes":[2,4922423612],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x000000012566393c"},
  "termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":7311},
  "vmregioninfo" : "0x12566393c is in 0x125308000-0x125830000;  bytes after start: 3520828  bytes before end: 1885891\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      VM_ALLOCATE                 1252fc000-125308000    [   48K] rw-\/rwx SM=ZER  \n--->  VM_ALLOCATE                 125308000-125830000    [ 5280K] r-x\/rwx SM=ZER  \n      VM_ALLOCATE                 125830000-12596c000    [ 1264K] rw-\/rwx SM=ZER  ",
  "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":104249,"threadState":{"x":[{"value":4925617152},{"value":68719460624},{"value":0},{"value":6123116892},{"value":18446744073702752256},{"value":32},{"value":6123116856},{"value":6123116888},{"value":14},{"value":4922423612},{"value":4924371512},{"value":0},{"value":32},{"value":4918903296},{"value":5395456},{"value":4918837680},{"value":6940929884,"symbolLocation":0,"symbol":"pthread_jit_write_protect_np"},{"value":4939858048},{"value":0},{"value":17880},{"value":8589934620},{"value":4922421248},{"value":36},{"value":4918903296},{"value":32},{"value":18446744072185937920},{"value":4925617160},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":12202784669686485532},"cpsr":{"value":1610616832},"fp":{"value":6123116944},"sp":{"value":6123116816},"esr":{"value":2449473615,"description":"(Data Abort) byte write Permission fault"},"pc":{"value":4349416088,"matchesCrashFrame":1},"far":{"value":4922423612}},"queue":"com.apple.main-thread","frames":[{"imageOffset":5657240,"symbol":"PEImageLayout::ApplyBaseRelocations()","symbolLocation":496,"imageIndex":0},{"imageOffset":5657116,"symbol":"PEImageLayout::ApplyBaseRelocations()","symbolLocation":372,"imageIndex":0},{"imageOffset":5658772,"symbol":"ConvertedImageLayout::ConvertedImageLayout(PEImageLayout*, int)","symbolLocation":708,"imageIndex":0},{"imageOffset":5656100,"symbol":"PEImageLayout::LoadConverted(PEImage*, int)","symbolLocation":80,"imageIndex":0},{"imageOffset":5656312,"symbol":"PEImageLayout::Map(PEImage*)","symbolLocation":36,"imageIndex":0},{"imageOffset":1073052,"symbol":"PEImage::CreateLayoutMapped()","symbolLocation":116,"imageIndex":0},{"imageOffset":1072648,"symbol":"PEImage::GetLayoutInternal(unsigned int, unsigned int)","symbolLocation":116,"imageIndex":0},{"imageOffset":1066724,"symbol":"PEImage::GetLayout(unsigned int, unsigned int)","symbolLocation":236,"imageIndex":0},{"imageOffset":1634676,"symbol":"BinderAcquireImport","symbolLocation":164,"imageIndex":0},{"imageOffset":3563672,"symbol":"BINDER_SPACE::AssemblyBinder::GetAssembly(SString&, int, int, BINDER_SPACE::Assembly**, char16_t const*, BundleFileLocation)","symbolLocation":436,"imageIndex":0},{"imageOffset":3561796,"symbol":"BINDER_SPACE::AssemblyBinder::BindToSystem(SString&, BINDER_SPACE::Assembly**, bool)","symbolLocation":432,"imageIndex":0},{"imageOffset":3597448,"symbol":"CCoreCLRBinderHelper::BindToSystem(ICLRPrivAssembly**, bool)","symbolLocation":292,"imageIndex":0},{"imageOffset":1061944,"symbol":"PEAssembly::DoOpenSystem(IUnknown*)","symbolLocation":64,"imageIndex":0},{"imageOffset":1061332,"symbol":"PEAssembly::OpenSystem(IUnknown*)","symbolLocation":132,"imageIndex":0},{"imageOffset":326984,"symbol":"SystemDomain::LoadBaseSystemClasses()","symbolLocation":28,"imageIndex":0},{"imageOffset":326292,"symbol":"SystemDomain::Init()","symbolLocation":580,"imageIndex":0},{"imageOffset":5647680,"symbol":"EEStartupHelper()","symbolLocation":1696,"imageIndex":0},{"imageOffset":5644448,"symbol":"EEStartup()","symbolLocation":196,"imageIndex":0},{"imageOffset":5644224,"symbol":"EnsureEEStarted()","symbolLocation":356,"imageIndex":0},{"imageOffset":592340,"symbol":"CorHost2::Start()","symbolLocation":124,"imageIndex":0},{"imageOffset":5663236,"symbol":"coreclr_initialize","symbolLocation":724,"imageIndex":0},{"imageOffset":133048,"symbol":"coreclr_t::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, coreclr_property_bag_t const&, std::__1::unique_ptr<coreclr_t, std::__1::default_delete<coreclr_t> >&)","symbolLocation":412,"imageIndex":0},{"imageOffset":187120,"symbol":"(anonymous namespace)::create_coreclr()","symbolLocation":432,"imageIndex":0},{"imageOffset":185780,"symbol":"corehost_main","symbolLocation":160,"imageIndex":0},{"imageOffset":58272,"symbol":"fx_muxer_t::handle_exec_host_command(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, host_startup_info_t const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::unordered_map<known_options, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, 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<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > > > const&, int, char const**, int, host_mode_t, bool, char*, int, int*)","symbolLocation":1320,"imageIndex":0},{"imageOffset":54412,"symbol":"fx_muxer_t::execute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int, char const**, host_startup_info_t const&, char*, int, int*)","symbolLocation":856,"imageIndex":0},{"imageOffset":40812,"symbol":"hostfxr_main_bundle_startupinfo","symbolLocation":196,"imageIndex":0},{"imageOffset":316392,"symbol":"exe_start(int, char const**)","symbolLocation":1124,"imageIndex":0},{"imageOffset":317144,"symbol":"main","symbolLocation":152,"imageIndex":0},{"imageOffset":20616,"symbol":"start","symbolLocation":516,"imageIndex":1}]},{"id":104253,"frames":[{"imageOffset":6352,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":2},{"imageOffset":7488,"symbol":"mach_msg","symbolLocation":76,"imageIndex":2},{"imageOffset":6340700,"symbol":"MachMessage::Receive(unsigned int)","symbolLocation":80,"imageIndex":0},{"imageOffset":6337528,"symbol":"SEHExceptionThread(void*)","symbolLocation":148,"imageIndex":0},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":104254,"frames":[{"imageOffset":31808,"symbol":"kevent","symbolLocation":8,"imageIndex":2},{"imageOffset":6289816,"symbol":"CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int)","symbolLocation":464,"imageIndex":0},{"imageOffset":6287512,"symbol":"CorUnix::CPalSynchronizationManager::WorkerThread(void*)","symbolLocation":116,"imageIndex":0},{"imageOffset":6328188,"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":104255,"frames":[{"imageOffset":40656,"symbol":"poll","symbolLocation":8,"imageIndex":2},{"imageOffset":3537280,"symbol":"ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int))","symbolLocation":180,"imageIndex":0},{"imageOffset":4280588,"symbol":"ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int))","symbolLocation":884,"imageIndex":0},{"imageOffset":4272584,"symbol":"server_thread(void*)","symbolLocation":324,"imageIndex":0},{"imageOffset":6328188,"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":104256,"frames":[{"imageOffset":9456,"symbol":"__open","symbolLocation":8,"imageIndex":2},{"imageOffset":53272,"symbol":"open","symbolLocation":64,"imageIndex":2},{"imageOffset":3540164,"symbol":"TwoWayPipe::WaitForConnection()","symbolLocation":40,"imageIndex":0},{"imageOffset":3515436,"symbol":"DbgTransportSession::TransportWorker()","symbolLocation":196,"imageIndex":0},{"imageOffset":3511548,"symbol":"DbgTransportSession::TransportWorkerStatic(void*)","symbolLocation":12,"imageIndex":0},{"imageOffset":6328188,"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":104257,"frames":[{"imageOffset":21136,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":3},{"imageOffset":6280840,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":340,"imageIndex":0},{"imageOffset":6280000,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":444,"imageIndex":0},{"imageOffset":6297008,"symbol":"CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int)","symbolLocation":1676,"imageIndex":0},{"imageOffset":3505404,"symbol":"DebuggerRCThread::MainLoop()","symbolLocation":208,"imageIndex":0},{"imageOffset":3505088,"symbol":"DebuggerRCThread::ThreadProc()","symbolLocation":248,"imageIndex":0},{"imageOffset":3504520,"symbol":"DebuggerRCThread::ThreadProcStatic(void*)","symbolLocation":32,"imageIndex":0},{"imageOffset":6328188,"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":104258,"frames":[{"imageOffset":21136,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":3},{"imageOffset":6280788,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":288,"imageIndex":0},{"imageOffset":6280000,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":444,"imageIndex":0},{"imageOffset":6297008,"symbol":"CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int)","symbolLocation":1676,"imageIndex":0},{"imageOffset":6297452,"symbol":"WaitForSingleObjectEx","symbolLocation":80,"imageIndex":0},{"imageOffset":2333048,"symbol":"CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*)","symbolLocation":196,"imageIndex":0},{"imageOffset":1748436,"symbol":"FinalizerThread::WaitForFinalizerEvent(CLREvent*)","symbolLocation":48,"imageIndex":0},{"imageOffset":1748972,"symbol":"FinalizerThread::FinalizerThreadWorker(void*)","symbolLocation":252,"imageIndex":0},{"imageOffset":1267744,"symbol":"ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)","symbolLocation":260,"imageIndex":0},{"imageOffset":1269236,"symbol":"ManagedThreadBase::FinalizerBase(void (*)(void*))","symbolLocation":36,"imageIndex":0},{"imageOffset":1749284,"symbol":"FinalizerThread::FinalizerThreadStart(void*)","symbolLocation":88,"imageIndex":0},{"imageOffset":6328188,"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" : 4343758848,
    "size" : 7749632,
    "uuid" : "3ddf2c6d-8b74-3ae6-af41-29399701b1f5",
    "path" : "\/usr\/local\/bin\/tone",
    "name" : "tone"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4367187968,
    "size" : 393216,
    "uuid" : "fbb89662-e6f2-3434-b542-f75185ac5e74",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6940667904,
    "size" : 229376,
    "uuid" : "1d7b3b8e-75a1-34ea-aa52-9f7c23155c55",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6940897280,
    "size" : 53248,
    "uuid" : "cee8bc77-6923-34d9-89a3-6f8f7279605e",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 6937608192,
  "size" : 3136438272,
  "uuid" : "00edbaf8-9281-3f26-b94f-e6a315e3a659"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=684.0M resident=0K(0%) swapped_out_or_unallocated=684.0M(100%)\nWritable regions: Total=805.8M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=805.8M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nKernel Alloc Once                   32K        1 \nMALLOC                           162.2M       15 \nMALLOC guard page                   96K        5 \nMALLOC_MEDIUM (reserved)         240.0M        2         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.1M        7 \nStack                             11.2M        7 \nVM_ALLOCATE                        2.5G       20 \n__AUTH                             241K       50 \n__AUTH_CONST                      2960K      129 \n__DATA                            1162K      123 \n__DATA_CONST                      3917K      130 \n__DATA_DIRTY                       234K       51 \n__LINKEDIT                       596.4M        3 \n__OBJC_CONST                       279K       31 \n__OBJC_RO                         82.9M        1 \n__OBJC_RW                         3152K        1 \n__TEXT                            87.7M      137 \n__UNICODE                          592K        1 \ndyld private memory               1024K        1 \nshared memory                       16K        1 \n===========                     =======  ======= \nTOTAL                              4.1G      717 \nTOTAL, minus reserved VM space     3.5G      717 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "6112dda2fc54bc3389840642",
      "factorPackIds" : {
        "SIRI_DICTATION_ASSETS" : "628bd2fda5168570b594bb52"
      },
      "deploymentId" : 240000135
    },
    {
      "rolloutId" : "61af99aeda72d16a4beb7756",
      "factorPackIds" : {

      },
      "deploymentId" : 240000176
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookAir10,1, BootROM 7459.101.2, proc 8:4:4 processors, 16 GB, SMC 
Graphics: Apple M1, Apple M1, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Display: ES07D03, 5120 x 2880 (5K/UHD+ - Ultra High Definition Plus), MirrorOff, Online
Memory Module: LPDDR4
AirPort: Wi-Fi, wl0: Feb  8 2022 01:44:45 version 18.60.21.0.7.8.126 FWID 01-1cdae627
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Thunderbolt Ethernet Slot 0, Ethernet, en6
Network Service: iPhone, Ethernet, en7
Network Service: Wi-Fi, AirPort, en0
PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt@6,0,0
PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt@5,0,0
PCI Card: ethernet, Ethernet Controller, Thunderbolt@3,0,0
PCI Card: pci1b21,1242, USB eXtensible Host Controller, Thunderbolt@4,0,0
PCI Card: pci8086,15d4, USB eXtensible Host Controller, Thunderbolt@7,0,0
PCI Card: pci1987,5012, NVM Express Controller, Thunderbolt@4,0,0
PCI Card: pci8086,15f0, USB eXtensible Host Controller, Thunderbolt@3,0,0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB30Bus
USB Device: iPhone
USB Device: CalDigit Thunderbolt 3 Audio
USB Device: USB30Bus
USB Device: Card Reader
USB Device: Portable
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: Billboard
USB Device: USB31Bus
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Device: TS3 Plus, CalDigit, Inc., 1, 44.1
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Device: Rocket XTRM Q, Sabrent, 1, 60.1
sandreas commented 2 years ago

Ok, thanks. This is very useful feedback, since I do not own a Mac with M1. I'll try to give you more information to that as soon as possible.

sandreas commented 2 years ago

Maybe have to do with this: https://github.com/dotnet/runtime/issues/49091 I did not find out wether or where @parkycai added a new issue... seems to be a problem with singlefile+ selfcontained publish, that there is no codesigning.

parkycai commented 2 years ago

Maybe have to do with this: dotnet/runtime#49091 I did not find out wether or where @parkycai added a new issue... seems to be a problem with singlefile+ selfcontained publish, that there is no codesigning.

if it's related to m1 codesign, try following command:

codesign --force --deep --sign - $targetExcutable
xattr -rds com.apple.quarantine $targetExcutable
sandreas commented 2 years ago

if it's related to m1 codesign, try following command:

Thx, maybe it is possible to integrate this into the automated build process as long as this is not fixed in dotnet.

parkycai commented 2 years ago

if it's related to m1 codesign, try following command:

Thx, maybe it is possible to integrate this into the automated build process as long as this is not fixed in dotnet.

I'm not sure whether you need to do it again when the excutable is moved to another macos device, but sign with a certificate issued by Apple would like do.

sandreas commented 2 years ago

I'm not sure whether you need to do it again when the excutable is moved to another macos device, but sign with a certificate issued by Apple would like do.

Thanks for pointing this out. I think this really might be a bug with C# on M1 / macOS. But I'll investigate this as soon as I have the time.

taxilian commented 1 year ago

I have built a debug version locally (on my mac studio) and it's working on my system -- just as a data point. I'm not sure what to try next, I guess maybe building a signed bundle? I have no idea how to do that

taxilian commented 1 year ago

interesting; so when I "publish" it to a directory I start having the same issue as with the downloaded binary

taxilian commented 1 year ago

doing a forced codesign did not help

taxilian commented 1 year ago

One possible hit: when running in debug mode I get this warning: objc[3305]: Class PlaceholderObject is implemented in both /Users/.../code/tone/tone/bin/Debug/net6.0/osx-arm64/tone (0x1031353f0) and /Users/.../code/tone/tone/bin/Debug/net6.0/osx-arm64/libSystem.Native.dylib (0x1239a0600). One of the two will be used. Which one is undefined.

sandreas commented 1 year ago

@taxilian Thank you very much for investigating, I really appreciate this effort.

Unfortunately I cannot reproduce or help with the problem, because I do not own an M1 / M2 Mac (and have no plans to order one...). Maybe this is a problem that I should report to dotnet itself, but I don't know if this is a compiler problem (roslyn), a runtime problem (dotnet-runtime) or something completely different.

If anyone has a clue what to do here or what the problem is, I would really appreciate any hints.

The next thing I would like to try is to use dotnet version 7.0.100 for compilation (along with other improvements in command line parsing) - this is something I will do anyway so maybe it is fixed then.

sandreas commented 1 year ago

@taxilian @parkycai @csandman Release 0.1.3 is out and uses net7.0 for the build. Maybe (I don't have high hopes) this issue is fixed now. Feedback highly welcome.

taxilian commented 1 year ago

Sadly no

sandreas commented 1 year ago

@taxilian Thank you for quick feedback. I would like to ask some questions:

If you compiled it from source as is and only publish did not work, I think that it would help you to create an issue on https://github.com/dotnet/runtime showing the exact steps that lead to the error. Maybe some expert from Microsoft can tell what is happening or maybe also fix this problem? I would prefer one of you (owning a M1) reporting this, because if there are questions, I cannot answer them without being the man in the middle just transferring all the information...

What do you think?

taxilian commented 1 year ago

Honestly I don't remember all the details at this point; the last time I did any real dotnet dev was well over a decade ago =] I was able to install vs on my mac and try the build but I'm not really familiar with any of the internals of this ecosystem anymore.

It did compile from source just fine and I could use it, but when I did "publish" (IIRC) the resulting binary did not work. I don't know anything about PublishSingleFile or other =]

sandreas commented 1 year ago

It did compile from source just fine and I could use it, but when I did "publish" (IIRC) the resulting binary did not work. I don't know anything about PublishSingleFile or other =]

Oh ok :-) Nevermind, thank you anyway. I'll try to build and publish a debug version of tone for m1 arch just for testing and we'll see what happens.

Unfortunately, net7.0 did not fix this problem as well as came with other problems, so this is not a real hope - I would love to have better news, but as it seems, tone is not working on M1 Macs for a while... :-/

sandreas commented 1 year ago

@csandman @taxilian So here we go again - 0.1.4 is released with a Debug variant of tone only for M1... although I already lost hope that this will ever work, maybe someone finds the time to try it out and report back...?

A Debug variant is not really what I would like to publish but better than nothing...

garlik82 commented 1 year ago

it doesn't. I get this error: zsh: bus error tone

sandreas commented 1 year ago

@garlik82 Thx... Very sad. Well, let's hope we find a way fixing this issue soon.

remmycat commented 1 year ago

I'm on an M2 Pro and also thought to give it a go and had the same crash. Attaching the Problem Report (I executed tone --help)

I found this issue, which seems to be talking about the exact error we're getting: https://github.com/dotnet/runtime/issues/79267 which got a fix that was backported to dotnet 7.0.3 (https://github.com/dotnet/runtime/pull/80283).

But you mentioned dotnet 7 is bringing other problems with it?

The fix description says about the issue: When a user creates an app that uses both singlefile and compression and targets osx-arm64, the app cannot run.

This condition does seem to apply here - I see that The csproj has <PublishSingleFile>true</PublishSingleFile> and <EnableCompressionInSingleFile>true</EnableCompressionInSingleFile> set.

Without having a deeper understanding of this: Would it be possible to, e.g. turn off compression for Apple Silicon as a workaround, if it really is this exact problem?

Happy to test anything 🙂 If there's something better than the Problem Report I could do to help (on macOS), please let me know.

MacOS Problem Report ``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: tone [24923] Path: /Users/USER/Downloads/*/tone Identifier: tone Version: ??? Code Type: ARM-64 (Native) Parent Process: nu [24879] Responsible: Terminal [858] User ID: 501 Date/Time: 2023-03-26 18:56:42.1847 +0200 OS Version: macOS 13.2.1 (22D68) Report Version: 12 Anonymous UUID: 2C2BE179-1387-A0C8-4BE3-8C66A9C2023F Time Awake Since Boot: 350000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000126f60a44 Exception Codes: 0x0000000000000002, 0x0000000126f60a44 Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10 Terminating Process: exc handler [24923] VM Region Info: 0x126f60a44 is in 0x126ba0000-0x127188000; bytes after start: 3934788 bytes before end: 2258363 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL VM_ALLOCATE 126b94000-126ba0000 [ 48K] rw-/rwx SM=ZER ---> VM_ALLOCATE 126ba0000-127188000 [ 6048K] r-x/rwx SM=ZER VM_ALLOCATE 127188000-1272e8000 [ 1408K] rw-/rwx SM=ZER Kernel Triage: VM - pmap_enter retried due to resource shortage VM - pmap_enter retried due to resource shortage Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 tone 0x104912e34 PEImageLayout::ApplyBaseRelocations() + 488 1 tone 0x104912db8 PEImageLayout::ApplyBaseRelocations() + 364 2 tone 0x104913430 ConvertedImageLayout::ConvertedImageLayout(PEImageLayout*, int) + 708 3 tone 0x1049129c8 PEImageLayout::LoadConverted(PEImage*, int) + 80 4 tone 0x104912a9c PEImageLayout::Map(PEImage*) + 36 5 tone 0x1044af614 PEImage::CreateLayoutMapped() + 116 6 tone 0x1044af480 PEImage::GetLayoutInternal(unsigned int, unsigned int) + 116 7 tone 0x1044addb4 PEImage::GetLayout(unsigned int, unsigned int) + 216 8 tone 0x104537df4 BinderAcquireImport + 164 9 tone 0x10470da34 BINDER_SPACE::AssemblyBinder::GetAssembly(SString&, int, int, BINDER_SPACE::Assembly**, char16_t const*, BundleFileLocation) + 440 10 tone 0x10470d2c0 BINDER_SPACE::AssemblyBinder::BindToSystem(SString&, BINDER_SPACE::Assembly**, bool) + 436 11 tone 0x104715d88 CCoreCLRBinderHelper::BindToSystem(ICLRPrivAssembly**, bool) + 292 12 tone 0x1044acb6c PEAssembly::DoOpenSystem(IUnknown*) + 64 13 tone 0x1044ac914 PEAssembly::OpenSystem(IUnknown*) + 132 14 tone 0x1043fa044 SystemDomain::LoadBaseSystemClasses() + 28 15 tone 0x1043f9d94 SystemDomain::Init() + 580 16 tone 0x1049108d4 EEStartupHelper() + 1692 17 tone 0x10490fc40 EEStartup() + 220 18 tone 0x10490fb4c EnsureEEStarted() + 356 19 tone 0x10443ab74 CorHost2::Start() + 124 20 tone 0x104914588 coreclr_initialize + 724 21 tone 0x1043caf3c coreclr_t::create(std::__1::basic_string, std::__1::allocator > const&, char const*, char const*, coreclr_property_bag_t const&, std::__1::unique_ptr >&) + 420 22 tone 0x1043d818c (anonymous namespace)::create_coreclr() + 432 23 tone 0x1043d7c60 corehost_main + 160 24 tone 0x1043b8924 fx_muxer_t::handle_exec_host_command(std::__1::basic_string, std::__1::allocator > const&, host_startup_info_t const&, std::__1::basic_string, std::__1::allocator > const&, std::__1::unordered_map, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >, known_options_hash, std::__1::equal_to, std::__1::allocator, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > > > > const&, int, char const**, int, host_mode_t, bool, char*, int, int*) + 1328 25 tone 0x1043b7a20 fx_muxer_t::execute(std::__1::basic_string, std::__1::allocator >, int, char const**, host_startup_info_t const&, char*, int, int*) + 860 26 tone 0x1043b453c hostfxr_main_bundle_startupinfo + 196 27 tone 0x1043f7734 exe_start(int, char const**) + 1124 28 tone 0x1043f7a10 main + 152 29 dyld 0x1a44afe50 start + 2544 Thread 1: 0 libsystem_kernel.dylib 0x1a479a050 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1a47ac11c mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x1a47a2c24 mach_msg_overwrite + 452 3 libsystem_kernel.dylib 0x1a479a3cc mach_msg + 24 4 tone 0x1049b93cc MachMessage::Receive(unsigned int) + 80 5 tone 0x1049b874c SEHExceptionThread(void*) + 144 6 libsystem_pthread.dylib 0x1a47da06c _pthread_start + 148 7 libsystem_pthread.dylib 0x1a47d4e2c thread_start + 8 Thread 2: 0 libsystem_kernel.dylib 0x1a47a0194 kevent + 8 1 tone 0x1049ad678 CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 396 2 tone 0x1049acde4 CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 140 3 tone 0x1049b62f0 CorUnix::CPalThread::ThreadEntry(void*) + 380 4 libsystem_pthread.dylib 0x1a47da06c _pthread_start + 148 5 libsystem_pthread.dylib 0x1a47d4e2c thread_start + 8 Thread 3: 0 libsystem_kernel.dylib 0x1a47a2978 poll + 8 1 tone 0x1047071fc ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int)) + 184 2 tone 0x1047bf7cc ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int)) + 908 3 tone 0x1047bd7b8 server_thread(void*) + 324 4 tone 0x1049b62f0 CorUnix::CPalThread::ThreadEntry(void*) + 380 5 libsystem_pthread.dylib 0x1a47da06c _pthread_start + 148 6 libsystem_pthread.dylib 0x1a47d4e2c thread_start + 8 Thread 4: 0 libsystem_kernel.dylib 0x1a479aaa8 __open + 8 1 libsystem_kernel.dylib 0x1a47a5bc8 open + 64 2 tone 0x104708058 TwoWayPipe::WaitForConnection() + 40 3 tone 0x104701c8c DbgTransportSession::TransportWorker() + 232 4 tone 0x104700d7c DbgTransportSession::TransportWorkerStatic(void*) + 12 5 tone 0x1049b62f0 CorUnix::CPalThread::ThreadEntry(void*) + 380 6 libsystem_pthread.dylib 0x1a47da06c _pthread_start + 148 7 libsystem_pthread.dylib 0x1a47d4e2c thread_start + 8 Thread 5: 0 libsystem_kernel.dylib 0x1a479d84c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1a47da638 _pthread_cond_wait + 1232 2 tone 0x1049ab3ac CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 308 3 tone 0x1049ab01c CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356 4 tone 0x1049af2d0 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656 5 tone 0x1046ff594 DebuggerRCThread::MainLoop() + 208 6 tone 0x1046ff460 DebuggerRCThread::ThreadProc() + 232 7 tone 0x1046ff238 DebuggerRCThread::ThreadProcStatic(void*) + 32 8 tone 0x1049b62f0 CorUnix::CPalThread::ThreadEntry(void*) + 380 9 libsystem_pthread.dylib 0x1a47da06c _pthread_start + 148 10 libsystem_pthread.dylib 0x1a47d4e2c thread_start + 8 Thread 6: 0 libsystem_kernel.dylib 0x1a479d84c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1a47da638 _pthread_cond_wait + 1232 2 tone 0x1049ab390 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 280 3 tone 0x1049ab01c CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 356 4 tone 0x1049af2d0 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1656 5 tone 0x1049af4b0 WaitForSingleObjectEx + 80 6 tone 0x1045e1828 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 192 7 tone 0x104553a20 FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 48 8 tone 0x104553c38 FinalizerThread::FinalizerThreadWorker(void*) + 252 9 tone 0x1044deb64 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 260 10 tone 0x1044df12c ManagedThreadBase::FinalizerBase(void (*)(void*)) + 36 11 tone 0x104553d70 FinalizerThread::FinalizerThreadStart(void*) + 88 12 tone 0x1049b62f0 CorUnix::CPalThread::ThreadEntry(void*) + 380 13 libsystem_pthread.dylib 0x1a47da06c _pthread_start + 148 14 libsystem_pthread.dylib 0x1a47d4e2c thread_start + 8 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x00000001272e8e00 x1: 0x0000000fffffc110 x2: 0x0000000000000000 x3: 0x000000016ba5174c x4: 0xffffffffff8a0000 x5: 0x0000000000000020 x6: 0x000000016ba51728 x7: 0x000000016ba51748 x8: 0x000000000000000e x9: 0x0000000126f60a44 x10: 0x0000000127196838 x11: 0x0000000000000000 x12: 0x0000000126ba0200 x13: 0x00000000005e4800 x14: 0x0000000000604aac x15: 0x0000000126b901b0 x16: 0x00000001a47dad54 x17: 0x00000001346043a0 x18: 0x0000000000000000 x19: 0x0000600000c68308 x20: 0x0000000000000000 x21: 0x0000000126f60000 x22: 0x0000000000000024 x23: 0x00000001fffffff8 x24: 0x0000000000000020 x25: 0xffffffffa6b90000 x26: 0x00000001272e8e08 x27: 0x0000000000000000 x28: 0x0000000000004bb8 fp: 0x000000016ba51780 lr: 0x2266000104912db8 sp: 0x000000016ba51700 pc: 0x0000000104912e34 cpsr: 0x60001000 far: 0x0000000126f60a44 esr: 0x9200004f (Data Abort) byte write Permission fault Binary Images: 0x1043ac000 - 0x104b0ffff tone (*) <51845b6b-4548-3f93-b85c-a0c46436b23d> /Users/USER/Downloads/*/tone 0x1a44aa000 - 0x1a4534ba3 dyld (*) <191e84f1-4b95-39c8-b253-1c1ef56c0fa8> /usr/lib/dyld 0x1a4799000 - 0x1a47d2feb libsystem_kernel.dylib (*) <3dcd49b9-b3c5-3d90-be40-a3b807cb9cd7> /usr/lib/system/libsystem_kernel.dylib 0x1a47d3000 - 0x1a47dfffb libsystem_pthread.dylib (*) <9f3b729a-ed04-3e65-adac-d75ad06ebbdc> /usr/lib/system/libsystem_pthread.dylib 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? 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=891.5M resident=0K(0%) swapped_out_or_unallocated=891.5M(100%) Writable regions: Total=806.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=806.9M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Kernel Alloc Once 32K 1 MALLOC 162.2M 15 MALLOC guard page 96K 5 MALLOC_MEDIUM (reserved) 240.0M 2 reserved VM address space (unallocated) MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated) STACK GUARD 56.1M 7 Stack 11.2M 7 VM_ALLOCATE 2.5G 19 __AUTH 318K 61 __AUTH_CONST 3582K 146 __DATA 1716K 141 __DATA_CONST 4217K 148 __DATA_DIRTY 361K 58 __LINKEDIT 784.5M 2 __OBJC_CONST 289K 36 __OBJC_RO 65.5M 1 __OBJC_RW 1988K 1 __TEXT 107.0M 155 dyld private memory 256K 1 shared memory 16K 1 =========== ======= ======= TOTAL 4.3G 808 TOTAL, minus reserved VM space 3.7G 808 ----------- Full Report ----------- {"app_name":"tone","timestamp":"2023-03-26 18:56:43.00 +0200","app_version":"","slice_uuid":"51845b6b-4548-3f93-b85c-a0c46436b23d","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.2.1 (22D68)","roots_installed":0,"incident_id":"7F349F59-807D-4DD8-8ED8-48945DE1FEEB","name":"tone"} { "uptime" : 350000, "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "Mac14,12", "coalitionID" : 976, "osVersion" : { "train" : "macOS 13.2.1", "build" : "22D68", "releaseType" : "User" }, "captureTime" : "2023-03-26 18:56:42.1847 +0200", "incident" : "7F349F59-807D-4DD8-8ED8-48945DE1FEEB", "pid" : 24923, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2023-03-26 18:56:41.7693 +0200", "procStartAbsTime" : 8471057567584, "procExitAbsTime" : 8471067466077, "procName" : "tone", "procPath" : "\/Users\/USER\/Downloads\/*\/tone", "parentProc" : "nu", "parentPid" : 24879, "coalitionName" : "com.apple.Terminal", "crashReporterKey" : "2C2BE179-1387-A0C8-4BE3-8C66A9C2023F", "responsiblePid" : 858, "responsibleProc" : "Terminal", "sip" : "enabled", "vmRegionInfo" : "0x126f60a44 is in 0x126ba0000-0x127188000; bytes after start: 3934788 bytes before end: 2258363\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n VM_ALLOCATE 126b94000-126ba0000 [ 48K] rw-\/rwx SM=ZER \n---> VM_ALLOCATE 126ba0000-127188000 [ 6048K] r-x\/rwx SM=ZER \n VM_ALLOCATE 127188000-1272e8000 [ 1408K] rw-\/rwx SM=ZER ", "exception" : {"codes":"0x0000000000000002, 0x0000000126f60a44","rawCodes":[2,4948625988],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x0000000126f60a44"}, "termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":24923}, "ktriageinfo" : "VM - pmap_enter retried due to resource shortage\nVM - pmap_enter retried due to resource shortage\n", "vmregioninfo" : "0x126f60a44 is in 0x126ba0000-0x127188000; bytes after start: 3934788 bytes before end: 2258363\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n VM_ALLOCATE 126b94000-126ba0000 [ 48K] rw-\/rwx SM=ZER \n---> VM_ALLOCATE 126ba0000-127188000 [ 6048K] r-x\/rwx SM=ZER \n VM_ALLOCATE 127188000-1272e8000 [ 1408K] rw-\/rwx SM=ZER ", "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":2149344,"threadState":{"x":[{"value":4952329728},{"value":68719460624},{"value":0},{"value":6100948812},{"value":18446744073701818368},{"value":32},{"value":6100948776},{"value":6100948808},{"value":14},{"value":4948625988},{"value":4950943800},{"value":0},{"value":4944691712},{"value":6178816},{"value":6310572},{"value":4944626096},{"value":7054667092,"symbolLocation":0,"symbol":"pthread_jit_write_protect_np"},{"value":5173691296},{"value":0},{"value":105553129276168},{"value":0},{"value":4948623360},{"value":36},{"value":8589934584},{"value":32},{"value":18446744072211726336},{"value":4952329736},{"value":0},{"value":19384}],"flavor":"ARM_THREAD_STATE64","lr":{"value":2478668649285627320},"cpsr":{"value":1610616832},"fp":{"value":6100948864},"sp":{"value":6100948736},"esr":{"value":2449473615,"description":"(Data Abort) byte write Permission fault"},"pc":{"value":4371590708,"matchesCrashFrame":1},"far":{"value":4948625988}},"queue":"com.apple.main-thread","frames":[{"imageOffset":5664308,"symbol":"PEImageLayout::ApplyBaseRelocations()","symbolLocation":488,"imageIndex":0},{"imageOffset":5664184,"symbol":"PEImageLayout::ApplyBaseRelocations()","symbolLocation":364,"imageIndex":0},{"imageOffset":5665840,"symbol":"ConvertedImageLayout::ConvertedImageLayout(PEImageLayout*, int)","symbolLocation":708,"imageIndex":0},{"imageOffset":5663176,"symbol":"PEImageLayout::LoadConverted(PEImage*, int)","symbolLocation":80,"imageIndex":0},{"imageOffset":5663388,"symbol":"PEImageLayout::Map(PEImage*)","symbolLocation":36,"imageIndex":0},{"imageOffset":1062420,"symbol":"PEImage::CreateLayoutMapped()","symbolLocation":116,"imageIndex":0},{"imageOffset":1062016,"symbol":"PEImage::GetLayoutInternal(unsigned int, unsigned int)","symbolLocation":116,"imageIndex":0},{"imageOffset":1056180,"symbol":"PEImage::GetLayout(unsigned int, unsigned int)","symbolLocation":216,"imageIndex":0},{"imageOffset":1621492,"symbol":"BinderAcquireImport","symbolLocation":164,"imageIndex":0},{"imageOffset":3545652,"symbol":"BINDER_SPACE::AssemblyBinder::GetAssembly(SString&, int, int, BINDER_SPACE::Assembly**, char16_t const*, BundleFileLocation)","symbolLocation":440,"imageIndex":0},{"imageOffset":3543744,"symbol":"BINDER_SPACE::AssemblyBinder::BindToSystem(SString&, BINDER_SPACE::Assembly**, bool)","symbolLocation":436,"imageIndex":0},{"imageOffset":3579272,"symbol":"CCoreCLRBinderHelper::BindToSystem(ICLRPrivAssembly**, bool)","symbolLocation":292,"imageIndex":0},{"imageOffset":1051500,"symbol":"PEAssembly::DoOpenSystem(IUnknown*)","symbolLocation":64,"imageIndex":0},{"imageOffset":1050900,"symbol":"PEAssembly::OpenSystem(IUnknown*)","symbolLocation":132,"imageIndex":0},{"imageOffset":319556,"symbol":"SystemDomain::LoadBaseSystemClasses()","symbolLocation":28,"imageIndex":0},{"imageOffset":318868,"symbol":"SystemDomain::Init()","symbolLocation":580,"imageIndex":0},{"imageOffset":5654740,"symbol":"EEStartupHelper()","symbolLocation":1692,"imageIndex":0},{"imageOffset":5651520,"symbol":"EEStartup()","symbolLocation":220,"imageIndex":0},{"imageOffset":5651276,"symbol":"EnsureEEStarted()","symbolLocation":356,"imageIndex":0},{"imageOffset":584564,"symbol":"CorHost2::Start()","symbolLocation":124,"imageIndex":0},{"imageOffset":5670280,"symbol":"coreclr_initialize","symbolLocation":724,"imageIndex":0},{"imageOffset":126780,"symbol":"coreclr_t::create(std::__1::basic_string, std::__1::allocator > const&, char const*, char const*, coreclr_property_bag_t const&, std::__1::unique_ptr >&)","symbolLocation":420,"imageIndex":0},{"imageOffset":180620,"symbol":"(anonymous namespace)::create_coreclr()","symbolLocation":432,"imageIndex":0},{"imageOffset":179296,"symbol":"corehost_main","symbolLocation":160,"imageIndex":0},{"imageOffset":51492,"symbol":"fx_muxer_t::handle_exec_host_command(std::__1::basic_string, std::__1::allocator > const&, host_startup_info_t const&, std::__1::basic_string, std::__1::allocator > const&, std::__1::unordered_map, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >, known_options_hash, std::__1::equal_to, std::__1::allocator, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > > > > const&, int, char const**, int, host_mode_t, bool, char*, int, int*)","symbolLocation":1328,"imageIndex":0},{"imageOffset":47648,"symbol":"fx_muxer_t::execute(std::__1::basic_string, std::__1::allocator >, int, char const**, host_startup_info_t const&, char*, int, int*)","symbolLocation":860,"imageIndex":0},{"imageOffset":34108,"symbol":"hostfxr_main_bundle_startupinfo","symbolLocation":196,"imageIndex":0},{"imageOffset":309044,"symbol":"exe_start(int, char const**)","symbolLocation":1124,"imageIndex":0},{"imageOffset":309776,"symbol":"main","symbolLocation":152,"imageIndex":0},{"imageOffset":24144,"symbol":"start","symbolLocation":2544,"imageIndex":1}]},{"id":2149360,"frames":[{"imageOffset":4176,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":2},{"imageOffset":78108,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":2},{"imageOffset":39972,"symbol":"mach_msg_overwrite","symbolLocation":452,"imageIndex":2},{"imageOffset":5068,"symbol":"mach_msg","symbolLocation":24,"imageIndex":2},{"imageOffset":6345676,"symbol":"MachMessage::Receive(unsigned int)","symbolLocation":80,"imageIndex":0},{"imageOffset":6342476,"symbol":"SEHExceptionThread(void*)","symbolLocation":144,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":2149361,"frames":[{"imageOffset":29076,"symbol":"kevent","symbolLocation":8,"imageIndex":2},{"imageOffset":6297208,"symbol":"CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int)","symbolLocation":396,"imageIndex":0},{"imageOffset":6295012,"symbol":"CorUnix::CPalSynchronizationManager::WorkerThread(void*)","symbolLocation":140,"imageIndex":0},{"imageOffset":6333168,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":2149362,"frames":[{"imageOffset":39288,"symbol":"poll","symbolLocation":8,"imageIndex":2},{"imageOffset":3518972,"symbol":"ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int))","symbolLocation":184,"imageIndex":0},{"imageOffset":4274124,"symbol":"ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int))","symbolLocation":908,"imageIndex":0},{"imageOffset":4265912,"symbol":"server_thread(void*)","symbolLocation":324,"imageIndex":0},{"imageOffset":6333168,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":2149363,"frames":[{"imageOffset":6824,"symbol":"__open","symbolLocation":8,"imageIndex":2},{"imageOffset":52168,"symbol":"open","symbolLocation":64,"imageIndex":2},{"imageOffset":3522648,"symbol":"TwoWayPipe::WaitForConnection()","symbolLocation":40,"imageIndex":0},{"imageOffset":3497100,"symbol":"DbgTransportSession::TransportWorker()","symbolLocation":232,"imageIndex":0},{"imageOffset":3493244,"symbol":"DbgTransportSession::TransportWorkerStatic(void*)","symbolLocation":12,"imageIndex":0},{"imageOffset":6333168,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":2149364,"frames":[{"imageOffset":18508,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30264,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":3},{"imageOffset":6288300,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":308,"imageIndex":0},{"imageOffset":6287388,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":356,"imageIndex":0},{"imageOffset":6304464,"symbol":"CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int)","symbolLocation":1656,"imageIndex":0},{"imageOffset":3487124,"symbol":"DebuggerRCThread::MainLoop()","symbolLocation":208,"imageIndex":0},{"imageOffset":3486816,"symbol":"DebuggerRCThread::ThreadProc()","symbolLocation":232,"imageIndex":0},{"imageOffset":3486264,"symbol":"DebuggerRCThread::ThreadProcStatic(void*)","symbolLocation":32,"imageIndex":0},{"imageOffset":6333168,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":2149365,"frames":[{"imageOffset":18508,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":30264,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":3},{"imageOffset":6288272,"symbol":"CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":280,"imageIndex":0},{"imageOffset":6287388,"symbol":"CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*)","symbolLocation":356,"imageIndex":0},{"imageOffset":6304464,"symbol":"CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int)","symbolLocation":1656,"imageIndex":0},{"imageOffset":6304944,"symbol":"WaitForSingleObjectEx","symbolLocation":80,"imageIndex":0},{"imageOffset":2316328,"symbol":"CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*)","symbolLocation":192,"imageIndex":0},{"imageOffset":1735200,"symbol":"FinalizerThread::WaitForFinalizerEvent(CLREvent*)","symbolLocation":48,"imageIndex":0},{"imageOffset":1735736,"symbol":"FinalizerThread::FinalizerThreadWorker(void*)","symbolLocation":252,"imageIndex":0},{"imageOffset":1256292,"symbol":"ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)","symbolLocation":260,"imageIndex":0},{"imageOffset":1257772,"symbol":"ManagedThreadBase::FinalizerBase(void (*)(void*))","symbolLocation":36,"imageIndex":0},{"imageOffset":1736048,"symbol":"FinalizerThread::FinalizerThreadStart(void*)","symbolLocation":88,"imageIndex":0},{"imageOffset":6333168,"symbol":"CorUnix::CPalThread::ThreadEntry(void*)","symbolLocation":380,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4365926400, "size" : 7749632, "uuid" : "51845b6b-4548-3f93-b85c-a0c46436b23d", "path" : "\/Users\/USER\/Downloads\/*\/tone", "name" : "tone" }, { "source" : "P", "arch" : "arm64e", "base" : 7051321344, "size" : 568228, "uuid" : "191e84f1-4b95-39c8-b253-1c1ef56c0fa8", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "source" : "P", "arch" : "arm64e", "base" : 7054397440, "size" : 237548, "uuid" : "3dcd49b9-b3c5-3d90-be40-a3b807cb9cd7", "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib", "name" : "libsystem_kernel.dylib" }, { "source" : "P", "arch" : "arm64e", "base" : 7054635008, "size" : 53244, "uuid" : "9f3b729a-ed04-3e65-adac-d75ad06ebbdc", "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib", "name" : "libsystem_pthread.dylib" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 7050674176, "size" : 3447455744, "uuid" : "835716ae-b363-3187-b065-cf94139bfc85" }, "vmSummary" : "ReadOnly portion of Libraries: Total=891.5M resident=0K(0%) swapped_out_or_unallocated=891.5M(100%)\nWritable regions: Total=806.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=806.9M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nKernel Alloc Once 32K 1 \nMALLOC 162.2M 15 \nMALLOC guard page 96K 5 \nMALLOC_MEDIUM (reserved) 240.0M 2 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.1M 7 \nStack 11.2M 7 \nVM_ALLOCATE 2.5G 19 \n__AUTH 318K 61 \n__AUTH_CONST 3582K 146 \n__DATA 1716K 141 \n__DATA_CONST 4217K 148 \n__DATA_DIRTY 361K 58 \n__LINKEDIT 784.5M 2 \n__OBJC_CONST 289K 36 \n__OBJC_RO 65.5M 1 \n__OBJC_RW 1988K 1 \n__TEXT 107.0M 155 \ndyld private memory 256K 1 \nshared memory 16K 1 \n=========== ======= ======= \nTOTAL 4.3G 808 \nTOTAL, minus reserved VM space 3.7G 808 \n", "legacyInfo" : { "threadTriggered" : { "queue" : "com.apple.main-thread" } }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "62fe74515312cd4599bd3c80", "factorPackIds" : { "MYRIAD_BOOSTS" : "62fe74805312cd4599bd3c81" }, "deploymentId" : 240000006 }, { "rolloutId" : "61675b89201f677a9a4cbd65", "factorPackIds" : { "HEALTH_FEATURE_AVAILABILITY" : "63f8068a238e7b23a1f30123" }, "deploymentId" : 240000055 } ], "experiments" : [ ] } } Model: Mac14,12, BootROM 8419.80.7, proc 10:6:4 processors, 16 GB, SMC Graphics: Apple M2 Pro, Apple M2 Pro, Built-In Display: LG HDR 4K, 5120 x 2880 (5K/UHD+ - Ultra High Definition Plus), Main, MirrorOff, Online Memory Module: LPDDR5, Hynix AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4388), wl0: Jan 30 2023 19:13:36 version 23.20.22.49.40.50.81 FWID 01-3fe1ea59 Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Ethernet, Ethernet, en0 USB Device: USB31Bus USB Device: CT2000X8SSD9 USB Device: USB31Bus USB Device: Magic Trackpad USB Device: USB31Bus USB Device: USB3.0 Hub USB Device: USB3.0 Card Reader USB Device: USB3.0 Hub USB Device: USB 10/100/1000 LAN USB Device: USB2.0 Hub USB Device: USB2.0 Hub USB Device: USB Keyboard USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: Mac mini, Apple Inc. Thunderbolt Bus: Mac mini, Apple Inc. Thunderbolt Bus: Mac mini, Apple Inc. Thunderbolt Bus: Mac mini, Apple Inc. ```
sandreas commented 1 year ago

@remmycat Wow, thank you for your effort and helpful description.

But you mentioned dotnet 7 is bringing other problems with it?

Yes, there were build errors with dotnet 7, but this has been a while, I learned a lot since then and dotnet 7 matured a bit... maybe I'll give it a spin in the next weeks.

Without having a deeper understanding of this: Would it be possible to, e.g. turn off compression for Apple Silicon as a workaround, if it really is this exact problem?

YES, absolutely. If this would fix the issue, I'd be happy to go without compression on macOS arm64 - better uncompressed than not working.

Thank you very much, I'll try to get this going in the build file for the next release.

sandreas commented 1 year ago

Here is a non-compressed build. I would really appreciate, when anyone with an arm64 mac could check if this really solves the problem.

I build it on Linux, so maybe it also has to be built on mac, but for now it is the only thing I can provide atm.

tone.tar.gz

garlik82 commented 1 year ago

No dice, same error :(

sandreas commented 1 year ago

@garlik82 Thank you for testing So I try to run some different builds with the "fixed" dotnet version on a mac and provide them in the next days.

remmycat commented 1 year ago

Actually this did fix it for me, I'm successfully running your provided version of tone on macOS with an M2 chip!

At first it didn't work, but I didn't get the usual crash dialog. The system logs say ASP: Security policy would not allow process, but after running codesign -s - tone as a workaround, it runs without crashing.

This seems like an unrelated issue, as the original SIGBUS is not happening anymore?

Edit, for more info: Running codesign -vv tone on a fresh copy results in:

tone: code object is not signed at all
In architecture: arm64

And macOS won't allow running unsigned binaries on M1/M2 as far as I can tell.

I'm unfortunately not aware of the process on how this should usually be signed in your situation (is this on dotnet?), but the following is definitely working for me right now and I'm successfully dumping metadata. Having a known workaround is a major step forwards I'd say :)

# ad-hoc code signature for tone
codesign -s - tone

# Remove quarantine flag for download (Also possible via UI by right-click + "open" on executable once)
# Might be unnecessary depending on download mechanism
xattr -d com.apple.quarantine tone 

Yet more info:

So after searching around a bit on the topic I think the codesigning should already work when publishing with dotnet on a macOS host (basically using apple's codesign tool internally, like I did manually). I see you're already doing that using the Github Actions - so maybe this is no problem at all for actual releases (or when you build on a mac instead of linux, like you said) :)

If still necessary, there also seem to be some options that may work to codesign cross-platform using unofficial tools like https://lib.rs/crates/apple-codesign (This project was just linked as a possible option somewhere, I cannot vouch for it working)

Last edit, I swear

Just now thought of checking on the past builds: Yes, the existing builds of tone are already signed, this should not be an issue.

tone-0.1.4-osx-arm64 ⟫ codesign -vv tone
tone: valid on disk
tone: satisfies its Designated Requirement

The only issue that's left, but true for any macOS binary that is not signed (or notarized?) using an apple developer account and got downloaded using a browser (tarred or not) is the quarantine flag. but that should be no different to non-arm macs and there's extensive documentation on it.

sandreas commented 1 year ago

@remmycat

Actually this did fix it for me, I'm successfully running your provided version of tone on macOS with an M2 chip!

That's awesome.

Thank you so much for all the details (and edits 😋) and of course thank you for your sponsorship - I really really appreciate it. You did a lot for the tone users, because from now on I may be able to put a working tone version for M1 / M2 users online.

Let me explain: The custom UNCOMPRESSED build was done on a Linux machine without codesign, while the official release action is using a (virtual) macOS machine, where codesign IS available. This means using the release action for the next versiontone should work out of the box on M1 / M2, when using UNCOMPRESSED option.

Here is what I will do for the next release:

Currently, I'm working on an OpenSource Cross Platform Audio Player (using Avalonia 11 xplat for Windows, Linux, Mac, Android, iOS, WASM) called Tone Audio Player, but I surely find the time to enhance tone a bit and publish a new release in the next weeks.

I'll try hard to solve this problem, until then I soon will publish a custom build done on a mac for you all to do more testing in this thread.

Thank you all for your patience and support!

remmycat commented 1 year ago

Sounds great! 🙂

One note in regards to quarantine: If someone uses wget to download the tar, as shown in the Readme, the file won't be quarantined in the first place and the mentioned command will fail with xattr: tone: No such xattr: com.apple.quarantine.

If someone is unsure, xattr -rd com.apple.quarantine tone should always work though, the -r for recursive will have it ignore files that don't have the quarantine attribute set. (similar to what @parkycai suggested before, but I don't think we need the -s to follow symlinks here)

sandreas commented 1 year ago

@remmycat @garlik82

So, as promised, here is the new uncompressed tone build from a macOS system... hopefully this solves the issues... I really need an M1 Mac for testing ;)

tone.tar.gz

garlik82 commented 1 year ago

Success :).

sandreas commented 1 year ago

Success :).

Awesome, thanks for the feedback and thanks again @remmycat for providing a huge contribution for solving this issue!

taxilian commented 1 year ago

it pops up the standard "we couldn't check this for malware" thing but you can get around that the usual way. it'd be cool if you could find a way to have it be notarized, but I'm not going to cast any stones if you don't want to deal with that hassle =]

Awesome

sandreas commented 1 year ago

Did a release 0.1.5 only for this - I hope it is now fixed (the release action may still not work, so I'm glad getting feedback)

garlik82 commented 1 year ago

Did a release 0.1.5 only for this - I hope it is now fixed (the release action may still not work, so I'm glad getting feedback)

it's working. Anytime you need something tested on apple silicon just @ me. thanks for you work.

remmycat commented 1 year ago

Yes, all fixed in 0.1.5! 🎉