nut-tree/libnut-core

Crashes in macOS 11.x

Closed this issue · 2 comments

Version
v2.7.0

Short overview
Crashes in macOS 11.x

Detailed error description

Date/Time:             2024-09-20 23:42:42.764 -0400
OS Version:            macOS 11.4 (20F71)
Report Version:        12
Bridge OS Version:     3.0 (14Y908)
Anonymous UUID:        0FFBB9DD-2912-C04C-EC03-A1D480FD7E59

Sleep/Wake UUID:       3CA7E465-A2B3-431B-8068-F18AF4F70BFA

Time Awake Since Boot: 47000 seconds
Time Since Wake:       41000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libnut.node                   	0x0000000109f29000 0x109f29000 + 0
1   com.github.Electron.framework 	0x0000000110556247 0x11051f000 + 225863
2   com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
3   com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
4   com.github.Electron.framework 	0x0000000110554a5f 0x11051f000 + 219743
5   com.github.Electron.framework 	0x00000001106dff97 0x11051f000 + 1838999
6   com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
7   ???                           	0x000000017055246c 0 + 6179595372
8   ???                           	0x00000001705532df 0 + 6179599071
9   ???                           	0x0000000170551346 0 + 6179590982
10  ???                           	0x000000017054c346 0 + 6179570502
11  ???                           	0x00000001705471ae 0 + 6179549614
12  ???                           	0x0000000170549ac1 0 + 6179560129
13  ???                           	0x0000000170549c52 0 + 6179560530
14  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
15  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
16  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
17  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
18  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
19  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
20  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
21  ???                           	0x00000001705dae0d 0 + 6180154893
22  com.github.Electron.framework 	0x000000011055191c 0x11051f000 + 207132
23  com.github.Electron.framework 	0x0000000110551647 0x11051f000 + 206407
24  com.github.Electron.framework 	0x0000000111fbc678 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) + 776
25  com.github.Electron.framework 	0x0000000111ea6464 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 436
26  com.github.Electron.framework 	0x00000001183618a7 node::loader::ModuleWrap::SyntheticModuleEvaluationStepsCallback(v8::Local<v8::Context>, v8::Local<v8::Module>) + 535
27  com.github.Electron.framework 	0x00000001123ab7f0 v8::Platform::SystemClockTimeMillis() + 2300640
28  com.github.Electron.framework 	0x0000000111e9629f v8::Module::Evaluate(v8::Local<v8::Context>) + 559
29  com.github.Electron.framework 	0x0000000118362c82 node::loader::ModuleWrap::Evaluate(v8::FunctionCallbackInfo<v8::Value> const&) + 1378
30  com.github.Electron.framework 	0x0000000110556247 0x11051f000 + 225863
31  com.github.Electron.framework 	0x0000000110553eaa 0x11051f000 + 216746
32  com.github.Electron.framework 	0x0000000110593502 0x11051f000 + 476418
33  com.github.Electron.framework 	0x000000011066bcee 0x11051f000 + 1363182
34  com.github.Electron.framework 	0x0000000110582c93 0x11051f000 + 408723
35  com.github.Electron.framework 	0x0000000110551847 0x11051f000 + 206919
36  com.github.Electron.framework 	0x0000000111fbd60b v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) + 4763
37  com.github.Electron.framework 	0x0000000111fbe37a v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) + 8202
38  com.github.Electron.framework 	0x0000000111fbe4f5 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) + 8581
39  com.github.Electron.framework 	0x0000000111fedafe v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) + 202638
40  com.github.Electron.framework 	0x00000001183024ee node::CallbackScope::~CallbackScope() + 862
41  com.github.Electron.framework 	0x00000001183021ee node::CallbackScope::~CallbackScope() + 94
42  com.github.Electron.framework 	0x0000000118456754 node::OnFatalError(char const*, char const*) + 534484
43  com.github.Electron.framework 	0x0000000118455527 node::OnFatalError(char const*, char const*) + 529831
44  com.github.Electron.framework 	0x0000000110909777 uv_async_send + 1047
45  com.github.Electron.framework 	0x000000011091b8ec uv_free_interface_addresses + 2348
46  com.github.Electron.framework 	0x0000000110909ce5 uv_run + 485
47  com.github.Electron.framework 	0x0000000110ac6bc0 v8::CodeEvent::GetScriptName() + 270944
48  com.github.Electron.framework 	0x0000000110a10d33 v8::BackingStore::MaxByteLength() const + 74099
49  com.github.Electron.framework 	0x00000001133d6267 v8_inspector::V8StackTraceId::ToString() + 11628983
50  com.github.Electron.framework 	0x00000001133d9db5 v8_inspector::V8StackTraceId::ToString() + 11644165
51  com.github.Electron.framework 	0x00000001133d58e8 v8_inspector::V8StackTraceId::ToString() + 11626552
52  com.github.Electron.framework 	0x0000000110c99822 v8::CodeEvent::GetScriptLine() + 523698
53  com.github.Electron.framework 	0x0000000110c9a9c7 v8::CodeEvent::GetScriptLine() + 528215
54  com.github.Electron.framework 	0x0000000110c9a7e7 v8::CodeEvent::GetScriptLine() + 527735
55  com.github.Electron.framework 	0x0000000110c990e6 v8::CodeEvent::GetScriptLine() + 521846
56  com.github.Electron.framework 	0x0000000110c991f2 v8::CodeEvent::GetScriptLine() + 522114
57  com.github.Electron.framework 	0x000000011091c011 ElectronMain + 209
58  libdyld.dylib                 	0x00007fff20353f5d start + 1

Thread 1:
0   libsystem_pthread.dylib       	0x00007fff20334420 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	0x00007fff20334420 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	0x00007fff20334420 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	0x00007fff20334420 start_wqthread + 0

Thread 5:: ThreadPoolServiceThread
0   libsystem_kernel.dylib        	0x00007fff2030c1d2 kevent64 + 10
1   com.github.Electron.framework 	0x00000001144fff77 node::AsyncResource::get_async_id() const + 10463255
2   com.github.Electron.framework 	0x00000001144ff545 node::AsyncResource::get_async_id() const + 10460645
3   com.github.Electron.framework 	0x00000001144a6459 node::AsyncResource::get_async_id() const + 10095865
4   com.github.Electron.framework 	0x0000000114466ab9 node::AsyncResource::get_async_id() const + 9835353
5   com.github.Electron.framework 	0x00000001144cbc58 node::AsyncResource::get_async_id() const + 10249464
6   com.github.Electron.framework 	0x00000001144b1ddd node::AsyncResource::get_async_id() const + 10143357
7   com.github.Electron.framework 	0x00000001144cbdf7 node::AsyncResource::get_async_id() const + 10249879
8   com.github.Electron.framework 	0x00000001144e0064 node::AsyncResource::get_async_id() const + 10332420
9   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
10  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 6:: ThreadPoolForegroundWorker
0   libsystem_kernel.dylib        	0x00007fff203032ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff2030362c mach_msg + 60
2   com.github.Electron.framework 	0x00000001144f9230 node::AsyncResource::get_async_id() const + 10435280
3   com.github.Electron.framework 	0x000000011448048a node::AsyncResource::get_async_id() const + 9940266
4   com.github.Electron.framework 	0x00000001144c55ed node::AsyncResource::get_async_id() const + 10223245
5   com.github.Electron.framework 	0x00000001144c3b66 node::AsyncResource::get_async_id() const + 10216454
6   com.github.Electron.framework 	0x00000001144c463e node::AsyncResource::get_async_id() const + 10219230
7   com.github.Electron.framework 	0x00000001144c43ad node::AsyncResource::get_async_id() const + 10218573
8   com.github.Electron.framework 	0x00000001144c4295 node::AsyncResource::get_async_id() const + 10218293
9   com.github.Electron.framework 	0x00000001144e0064 node::AsyncResource::get_async_id() const + 10332420
10  libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
11  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 7:: ThreadPoolBackgroundWorker
0   libsystem_kernel.dylib        	0x00007fff203032ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff2030362c mach_msg + 60
2   com.github.Electron.framework 	0x00000001144f9230 node::AsyncResource::get_async_id() const + 10435280
3   com.github.Electron.framework 	0x000000011448048a node::AsyncResource::get_async_id() const + 9940266
4   com.github.Electron.framework 	0x00000001144c55ed node::AsyncResource::get_async_id() const + 10223245
5   com.github.Electron.framework 	0x00000001144c3b66 node::AsyncResource::get_async_id() const + 10216454
6   com.github.Electron.framework 	0x00000001144c463e node::AsyncResource::get_async_id() const + 10219230
7   com.github.Electron.framework 	0x00000001144c431d node::AsyncResource::get_async_id() const + 10218429
8   com.github.Electron.framework 	0x00000001144c42c2 node::AsyncResource::get_async_id() const + 10218338
9   com.github.Electron.framework 	0x00000001144e0064 node::AsyncResource::get_async_id() const + 10332420
10  libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
11  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 8:: ThreadPoolForegroundWorker
0   libsystem_kernel.dylib        	0x00007fff203032ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff2030362c mach_msg + 60
2   com.github.Electron.framework 	0x00000001144f9230 node::AsyncResource::get_async_id() const + 10435280
3   com.github.Electron.framework 	0x000000011448048a node::AsyncResource::get_async_id() const + 9940266
4   com.github.Electron.framework 	0x00000001144c55ed node::AsyncResource::get_async_id() const + 10223245
5   com.github.Electron.framework 	0x00000001144c3b66 node::AsyncResource::get_async_id() const + 10216454
6   com.github.Electron.framework 	0x00000001144c463e node::AsyncResource::get_async_id() const + 10219230
7   com.github.Electron.framework 	0x00000001144c43ad node::AsyncResource::get_async_id() const + 10218573
8   com.github.Electron.framework 	0x00000001144c4295 node::AsyncResource::get_async_id() const + 10218293
9   com.github.Electron.framework 	0x00000001144e0064 node::AsyncResource::get_async_id() const + 10332420
10  libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
11  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 9:: Chrome_IOThread
0   libsystem_kernel.dylib        	0x00007fff2030c1d2 kevent64 + 10
1   com.github.Electron.framework 	0x00000001144fff77 node::AsyncResource::get_async_id() const + 10463255
2   com.github.Electron.framework 	0x00000001144ff545 node::AsyncResource::get_async_id() const + 10460645
3   com.github.Electron.framework 	0x00000001144a6459 node::AsyncResource::get_async_id() const + 10095865
4   com.github.Electron.framework 	0x0000000114466ab9 node::AsyncResource::get_async_id() const + 9835353
5   com.github.Electron.framework 	0x00000001144cbc58 node::AsyncResource::get_async_id() const + 10249464
6   com.github.Electron.framework 	0x00000001133daaaf v8_inspector::V8StackTraceId::ToString() + 11647487
7   com.github.Electron.framework 	0x00000001144cbdf7 node::AsyncResource::get_async_id() const + 10249879
8   com.github.Electron.framework 	0x00000001144e0064 node::AsyncResource::get_async_id() const + 10332420
9   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
10  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 10:: MemoryInfra
0   libsystem_kernel.dylib        	0x00007fff203032ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff2030362c mach_msg + 60
2   com.github.Electron.framework 	0x00000001144f9230 node::AsyncResource::get_async_id() const + 10435280
3   com.github.Electron.framework 	0x0000000114480372 node::AsyncResource::get_async_id() const + 9939986
4   com.github.Electron.framework 	0x000000011443db16 node::AsyncResource::get_async_id() const + 9667510
5   com.github.Electron.framework 	0x00000001144a6459 node::AsyncResource::get_async_id() const + 10095865
6   com.github.Electron.framework 	0x0000000114466ab9 node::AsyncResource::get_async_id() const + 9835353
7   com.github.Electron.framework 	0x00000001144cbc58 node::AsyncResource::get_async_id() const + 10249464
8   com.github.Electron.framework 	0x00000001144cbdf7 node::AsyncResource::get_async_id() const + 10249879
9   com.github.Electron.framework 	0x00000001144e0064 node::AsyncResource::get_async_id() const + 10332420
10  libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
11  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 11:
0   libsystem_kernel.dylib        	0x00007fff20307c4a kevent + 10
1   com.github.Electron.framework 	0x000000011091b6c8 uv_free_interface_addresses + 1800
2   com.github.Electron.framework 	0x0000000110909ce5 uv_run + 485
3   com.github.Electron.framework 	0x000000011845711a node::OnFatalError(char const*, char const*) + 536986
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 12:
0   libsystem_kernel.dylib        	0x00007fff20305cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff20338e49 _pthread_cond_wait + 1298
2   com.github.Electron.framework 	0x0000000110916a39 uv_cond_wait + 9
3   com.github.Electron.framework 	0x0000000118454cda node::OnFatalError(char const*, char const*) + 527706
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 13:
0   libsystem_malloc.dylib        	0x00007fff2015f470 malloc + 0
1   com.github.Electron.framework 	0x0000000112521452 v8::internal::TickSample::print() const + 763090
2   com.github.Electron.framework 	0x0000000112523fc1 v8::internal::Version::GetSONAME(v8::base::Vector<char>) + 401
3   com.github.Electron.framework 	0x00000001125241a5 v8::internal::Version::GetSONAME(v8::base::Vector<char>) + 885
4   com.github.Electron.framework 	0x00000001128ec308 v8_inspector::V8StackTraceId::ToString() + 184920
5   com.github.Electron.framework 	0x000000011291a670 v8_inspector::V8StackTraceId::ToString() + 374208
6   com.github.Electron.framework 	0x0000000112b08a74 v8_inspector::V8StackTraceId::ToString() + 2398660
7   com.github.Electron.framework 	0x0000000112b06a45 v8_inspector::V8StackTraceId::ToString() + 2390421
8   com.github.Electron.framework 	0x0000000112b00ee4 v8_inspector::V8StackTraceId::ToString() + 2367028
9   com.github.Electron.framework 	0x0000000112b01e72 v8_inspector::V8StackTraceId::ToString() + 2371010
10  com.github.Electron.framework 	0x0000000112afca37 v8_inspector::V8StackTraceId::ToString() + 2349447
11  com.github.Electron.framework 	0x0000000112afbfcb v8_inspector::V8StackTraceId::ToString() + 2346779
12  com.github.Electron.framework 	0x0000000111f3466b v8::SourceLocation::ToString() const + 500107
13  com.github.Electron.framework 	0x0000000111f74177 v8::internal::ThreadIsolation::CanLookupStartOfJitAllocationAt(unsigned long) + 8631
14  com.github.Electron.framework 	0x0000000111f75810 v8::internal::ThreadIsolation::CanLookupStartOfJitAllocationAt(unsigned long) + 14416
15  com.github.Electron.framework 	0x00000001184543d6 node::OnFatalError(char const*, char const*) + 525398
16  com.github.Electron.framework 	0x0000000118454c83 node::OnFatalError(char const*, char const*) + 527619
17  libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
18  libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 14:
0   libsystem_kernel.dylib        	0x00007fff20305cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff20338e49 _pthread_cond_wait + 1298
2   com.github.Electron.framework 	0x0000000110916a39 uv_cond_wait + 9
3   com.github.Electron.framework 	0x0000000118454cda node::OnFatalError(char const*, char const*) + 527706
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 15:
0   libsystem_kernel.dylib        	0x00007fff203032f6 semaphore_wait_trap + 10
1   com.github.Electron.framework 	0x00000001109168d0 uv_sem_wait + 16
2   com.github.Electron.framework 	0x0000000118519bcc node::SetTracingController(v8::TracingController*) + 126252
3   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
4   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 16:
0   libsystem_kernel.dylib        	0x00007fff20305cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff20338e49 _pthread_cond_wait + 1298
2   com.github.Electron.framework 	0x0000000110916a39 uv_cond_wait + 9
3   com.github.Electron.framework 	0x0000000110905803 uv_cancel + 739
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 17:
0   libsystem_kernel.dylib        	0x00007fff20305cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff20338e49 _pthread_cond_wait + 1298
2   com.github.Electron.framework 	0x0000000110916a39 uv_cond_wait + 9
3   com.github.Electron.framework 	0x0000000110905803 uv_cancel + 739
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 18:
0   libsystem_kernel.dylib        	0x00007fff20305cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff20338e49 _pthread_cond_wait + 1298
2   com.github.Electron.framework 	0x0000000110916a39 uv_cond_wait + 9
3   com.github.Electron.framework 	0x0000000110905803 uv_cancel + 739
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 19:
0   libsystem_kernel.dylib        	0x00007fff20305cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff20338e49 _pthread_cond_wait + 1298
2   com.github.Electron.framework 	0x0000000110916a39 uv_cond_wait + 9
3   com.github.Electron.framework 	0x0000000110905803 uv_cancel + 739
4   libsystem_pthread.dylib       	0x00007fff203388fc _pthread_start + 224
5   libsystem_pthread.dylib       	0x00007fff20334443 thread_start + 15

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000109f29000  rbx: 0x0000011800048460  rcx: 0x0000000119dba148  rdx: 0x0000000118375dc0
  rdi: 0x0000011800048460  rsi: 0x00007ffee67651d0  rbp: 0x00007ffee6765220  rsp: 0x00007ffee67651c8
   r8: 0x00007ffee67652c0   r9: 0x00000138015a1ed9  r10: 0x0000000000000058  r11: 0x0000013801158ec9
  r12: 0x0000000000000000  r13: 0x000001180020c080  r14: 0x00007ffee67651d0  r15: 0x0000000000000000
  rip: 0x0000000109f29000  rfl: 0x0000000000000206  cr2: 0x0000000118375dc0
  
Logical CPU:     0
Error Code:      0x020000b8
Trap Number:     133

Thread 0 instruction stream:
  [cf]fa ed fe 07 00 00 01-03 00 00 00 06 00 00 00  ................	<==
  17 00 00 00 48 0b 00 00-85 80 11 00 00 00 00 00  ....H...........
  19 00 00 00 c8 02 00 00-5f 5f 54 45 58 54 00 00  ........__TEXT..
  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
  00 00 01 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
  00 00 01 00 00 00 00 00-05 00 00 00 05 00 00 00  ................
  08 00 00 00 00 00 00 00-5f 5f 74 65 78 74 00 00  ........__text..
  00 00 00 00 00 00 00 00-5f 5f 54 45 58 54 00 00  ........__TEXT..
  00 00 00 00 00 00 00 00-10 3b 00 00 00 00 00 00  .........;......
  60 9b 00 00 00 00 00 00-10 3b 00 00 04 00 00 00  `........;......
  00 00 00 00 00 00 00 00-00 04 00 80 00 00 00 00  ................
  00 00 00 00 00 00 00 00-5f 5f 73 74 75 62 73 00  ........__stubs.
  
Thread 0 last branch register state not available.

Steps to reproduce error
Executed in macOS 11.x

Additional content
May have the same issues. But, I was developing and running on macOS 11.4 and did not build.
codebytere/node-mac-permissions#71

I briefly debugged it, and it seems that it is not caused by the crash of node-mac-permissions, but caused by the crash when the script executes any method in libnut. I will continue to debug and see

engineering@mobiles-mbp libnut-core % node test
Encountered error establishing macOS permission checks: Cannot find module '@nut-tree/node-mac-permissions'
Require stack:
- /Users/engineering/Documents/libnut-core/permissionCheck.js
- /Users/engineering/Documents/libnut-core/index.js
- /Users/engineering/Documents/libnut-core/test.js
Returning original module.

When I corrected the repository, the recompile crash disappeared, which was strange. No crashes occur on my macOS 14. Hahaha.