Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on macOS 12.6.5 #731

Open
fanquake opened this issue May 18, 2023 · 2 comments
Open

crash on macOS 12.6.5 #731

fanquake opened this issue May 18, 2023 · 2 comments

Comments

@fanquake
Copy link
Member

Moved from bitcoin/bitcoin#27681.

What version of Bitcoin Core are you using?

V22.0.0 and 24.0.1.

Operating system and version

Mac osx 12.6.5

Machine specifications

2.8 dual core i5 8 gb ram high speed internet
1tb drive

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

Process:               Bitcoin-Qt [844]
Path:                  /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
Identifier:            org.bitcoinfoundation.Bitcoin-Qt
Version:               24.0.1 (24.0.1)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-05-17 11:26:06.6243 -0400
OS Version:            macOS 12.6.5 (21G531)
Report Version:        12
Anonymous UUID:        313168C1-E000-AAE8-529A-18F42A02E846


Time Awake Since Boot: 7000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000100000008
Exception Codes:       0x0000000000000001, 0x0000000100000008
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [844]

VM Region Info: 0x100000008 is not in any region.  Bytes before following region: 143642616
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      1088fd000-10a4d2000    [ 27.8M] r-x/r-x SM=COW  ...OS/Bitcoin-Qt

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   Bitcoin-Qt                    	       0x109730e61 0x1088fd000 + 14892641
1   Bitcoin-Qt                    	       0x108935d23 0x1088fd000 + 232739
2   Bitcoin-Qt                    	       0x1096281a3 0x1088fd000 + 13808035
3   Bitcoin-Qt                    	       0x10986bca8 0x1088fd000 + 16182440
4   Bitcoin-Qt                    	       0x1096282e7 0x1088fd000 + 13808359
5   Bitcoin-Qt                    	       0x1091e02f0 0x1088fd000 + 9319152
6   Bitcoin-Qt                    	       0x1091de8fb 0x1088fd000 + 9312507
7   AppKit                        	    0x7ff8205329a4 -[NSApplication _createDockMenu:] + 165
8   AppKit                        	    0x7ff8205328cc __44-[NSApplication _copyPublicPersistentUIInfo]_block_invoke + 42
9   AppKit                        	    0x7ff8207a981b ___NSMainRunLoopPerformBlockInModes_block_invoke + 25
10  CoreFoundation                	    0x7ff81d943cf1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
11  CoreFoundation                	    0x7ff81d943b9c __CFRunLoopDoBlocks + 445
12  CoreFoundation                	    0x7ff81d942f0d __CFRunLoopRun + 2609
13  CoreFoundation                	    0x7ff81d941e1c CFRunLoopRunSpecific + 562
14  HIToolbox                     	    0x7ff8265f15e6 RunCurrentEventLoopInMode + 292
15  HIToolbox                     	    0x7ff8265f134a ReceiveNextEventCommon + 594
16  HIToolbox                     	    0x7ff8265f10e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
17  AppKit                        	    0x7ff82037bf6d _DPSNextEvent + 927
18  AppKit                        	    0x7ff82037a62a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
19  AppKit                        	    0x7ff82036ccd9 -[NSApplication run] + 586
20  Bitcoin-Qt                    	       0x1091dc8b4 0x1088fd000 + 9304244
21  Bitcoin-Qt                    	       0x109604487 0x1088fd000 + 13661319
22  Bitcoin-Qt                    	       0x109607f82 0x1088fd000 + 13676418
23  Bitcoin-Qt                    	       0x10891b897 0x1088fd000 + 125079
24  dyld                          	       0x114ff352e start + 462

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

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

Thread 3::  Dispatch queue: */O
0   libsystem_kernel.dylib        	    0x7ff81d84122e __open + 10
1   libsystem_kernel.dylib        	    0x7ff81d849621 open + 204
2   AppKit                        	    0x7ff820530320 _NSPersistentUIOpenFileURL + 98
3   AppKit                        	    0x7ff8205339b8 -[NSPersistentUIFileManager openPersistentStateFile] + 140
4   AppKit                        	    0x7ff82053349f -[NSPersistentUIFileManager _writeRecords:withWindowInfos:flushingStaleData:] + 113
5   AppKit                        	    0x7ff820533240 __76-[NSPersistentUIFileManager writeRecords:withWindowInfos:flushingStaleData:]_block_invoke + 59
6   AppKit                        	    0x7ff8203800e1 ___NSPersistentUIDispatchQueueAsync_block_invoke + 28
7   libdispatch.dylib             	    0x7ff81d6c50cc _dispatch_call_block_and_release + 12
8   libdispatch.dylib             	    0x7ff81d6c6317 _dispatch_client_callout + 8
9   libdispatch.dylib             	    0x7ff81d6cc317 _dispatch_lane_serial_drain + 672
10  libdispatch.dylib             	    0x7ff81d6ccdfd _dispatch_lane_invoke + 366
11  libdispatch.dylib             	    0x7ff81d6d6eee _dispatch_workloop_worker_thread + 753
12  libsystem_pthread.dylib       	    0x7ff81d879fd0 _pthread_wqthread + 326
13  libsystem_pthread.dylib       	    0x7ff81d878f57 start_wqthread + 15

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

Thread 5:: Thread (pooled)
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   Bitcoin-Qt                    	       0x1094d1a50 0x1088fd000 + 12405328
3   Bitcoin-Qt                    	       0x1094d18ae 0x1088fd000 + 12404910
4   Bitcoin-Qt                    	       0x1094d17cb 0x1088fd000 + 12404683
5   Bitcoin-Qt                    	       0x1094cec6d 0x1088fd000 + 12393581
6   Bitcoin-Qt                    	       0x1094cb109 0x1088fd000 + 12378377
7   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
8   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 6:: Thread (pooled)
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   Bitcoin-Qt                    	       0x1094d1a50 0x1088fd000 + 12405328
3   Bitcoin-Qt                    	       0x1094d18ae 0x1088fd000 + 12404910
4   Bitcoin-Qt                    	       0x1094d17cb 0x1088fd000 + 12404683
5   Bitcoin-Qt                    	       0x1094cec6d 0x1088fd000 + 12393581
6   Bitcoin-Qt                    	       0x1094cb109 0x1088fd000 + 12378377
7   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
8   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 7:: Thread (pooled)
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   Bitcoin-Qt                    	       0x1094d1a50 0x1088fd000 + 12405328
3   Bitcoin-Qt                    	       0x1094d18ae 0x1088fd000 + 12404910
4   Bitcoin-Qt                    	       0x1094d17cb 0x1088fd000 + 12404683
5   Bitcoin-Qt                    	       0x1094cec6d 0x1088fd000 + 12393581
6   Bitcoin-Qt                    	       0x1094cb109 0x1088fd000 + 12378377
7   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
8   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 8:: Thread (pooled)
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   Bitcoin-Qt                    	       0x1094d1a50 0x1088fd000 + 12405328
3   Bitcoin-Qt                    	       0x1094d18ae 0x1088fd000 + 12404910
4   Bitcoin-Qt                    	       0x1094d17cb 0x1088fd000 + 12404683
5   Bitcoin-Qt                    	       0x1094cec6d 0x1088fd000 + 12393581
6   Bitcoin-Qt                    	       0x1094cb109 0x1088fd000 + 12378377
7   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
8   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 9:: com.apple.CFSocket.private
0   libsystem_kernel.dylib        	    0x7ff81d848d4a __select + 10
1   CoreFoundation                	    0x7ff81d96b659 __CFSocketManager + 641
2   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
3   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 10:: b-shutoff
0   libsystem_kernel.dylib        	    0x7ff81d8420da __ulock_wait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87ec95 _pthread_join + 358
2   libc++.1.dylib                	    0x7ff81d7e5a06 std::__1::thread::join() + 24
3   Bitcoin-Qt                    	       0x108ae6a9d 0x1088fd000 + 2005661
4   Bitcoin-Qt                    	       0x108a949d6 0x1088fd000 + 1669590
5   Bitcoin-Qt                    	       0x108946bd3 0x1088fd000 + 302035
6   Bitcoin-Qt                    	       0x109621a74 0x1088fd000 + 13781620
7   Bitcoin-Qt                    	       0x10973a856 0x1088fd000 + 14932054
8   Bitcoin-Qt                    	       0x10973bbb2 0x1088fd000 + 14937010
9   Bitcoin-Qt                    	       0x109607a36 0x1088fd000 + 13675062
10  Bitcoin-Qt                    	       0x109608b93 0x1088fd000 + 13679507
11  Bitcoin-Qt                    	       0x10964ba89 0x1088fd000 + 13953673
12  Bitcoin-Qt                    	       0x109604487 0x1088fd000 + 13661319
13  Bitcoin-Qt                    	       0x1094ca7c3 0x1088fd000 + 12376003
14  Bitcoin-Qt                    	       0x1094cb109 0x1088fd000 + 12378377
15  libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
16  libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 11:: b-scriptch.0
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   libc++.1.dylib                	    0x7ff81d7dbd22 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   Bitcoin-Qt                    	       0x108d6d213 0x1088fd000 + 4653587
4   Bitcoin-Qt                    	       0x108d6d04d 0x1088fd000 + 4653133
5   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 12:: b-scriptch.1
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   libc++.1.dylib                	    0x7ff81d7dbd22 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   Bitcoin-Qt                    	       0x108d6d213 0x1088fd000 + 4653587
4   Bitcoin-Qt                    	       0x108d6d04d 0x1088fd000 + 4653133
5   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 13:: b-scriptch.2
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   libc++.1.dylib                	    0x7ff81d7dbd22 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   Bitcoin-Qt                    	       0x108d6d213 0x1088fd000 + 4653587
4   Bitcoin-Qt                    	       0x108d6d04d 0x1088fd000 + 4653133
5   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 14:: b-scheduler
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   libc++.1.dylib                	    0x7ff81d7dbdb3 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 93
3   Bitcoin-Qt                    	       0x1090beaad 0x1088fd000 + 8133293
4   Bitcoin-Qt                    	       0x1090be77b 0x1088fd000 + 8132475
5   Bitcoin-Qt                    	       0x108dccdc2 0x1088fd000 + 5045698
6   Bitcoin-Qt                    	       0x108abbaa7 0x1088fd000 + 1829543
7   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
8   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 15:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	    0x7ff81d84096a mach_msg_trap + 10
1   libsystem_kernel.dylib        	    0x7ff81d840cd8 mach_msg + 56
2   CoreFoundation                	    0x7ff81d94434d __CFRunLoopServiceMachPort + 319
3   CoreFoundation                	    0x7ff81d9429d8 __CFRunLoopRun + 1276
4   CoreFoundation                	    0x7ff81d941e1c CFRunLoopRunSpecific + 562
5   AppKit                        	    0x7ff8204e998e _NSEventThread + 132
6   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 16:
0   libsystem_kernel.dylib        	    0x7ff81d8433da __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff81d87da6f _pthread_cond_wait + 1249
2   libc++.1.dylib                	    0x7ff81d7dbd22 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   Bitcoin-Qt                    	       0x109192863 0x1088fd000 + 9001059
4   Bitcoin-Qt                    	       0x1091927ed 0x1088fd000 + 9000941
5   Bitcoin-Qt                    	       0x10919291e 0x1088fd000 + 9001246
6   libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 17:: b-opencon
0   libsystem_kernel.dylib        	    0x7ff81d848d4a __select + 10
1   Bitcoin-Qt                    	       0x108da6bb4 0x1088fd000 + 4889524
2   Bitcoin-Qt                    	       0x108da67bc 0x1088fd000 + 4888508
3   Bitcoin-Qt                    	       0x109088b2b 0x1088fd000 + 7912235
4   Bitcoin-Qt                    	       0x108ace1c2 0x1088fd000 + 1905090
5   Bitcoin-Qt                    	       0x108ad63e3 0x1088fd000 + 1938403
6   Bitcoin-Qt                    	       0x108adde87 0x1088fd000 + 1969799
7   Bitcoin-Qt                    	       0x108af456e 0x1088fd000 + 2061678
8   Bitcoin-Qt                    	       0x108dccdc2 0x1088fd000 + 5045698
9   Bitcoin-Qt                    	       0x108af3ff2 0x1088fd000 + 2060274
10  libsystem_pthread.dylib       	    0x7ff81d87d4e1 _pthread_start + 125
11  libsystem_pthread.dylib       	    0x7ff81d878f6b thread_start + 15

Thread 18:
0   libsystem_pthread.dylib       	    0x7ff81d878f48 start_wqthread + 0

Thread 19::  Dispatch queue: NSPersistentUI Window Snapshotting IO
0   libsystem_platform.dylib      	    0x7ff81d890629 _platform_bzero$VARIANT$Haswell + 41
1   libz.1.dylib                  	    0x7ff8285a139d 0x7ff828597000 + 41885
2   libz.1.dylib                  	    0x7ff82859a195 deflateInit2_ + 537
3   libz.1.dylib                  	    0x7ff828599f76 deflateInit_ + 36
4   AppKit                        	    0x7ff82052f9f4 -[NSPersistentUIWindowSnapshotter writeWindowSnapshot:length:width:height:bytesPerRow:toFile:inDirectory:encryptingWithKey:uuid:checksum:fd:] + 668
5   AppKit                        	    0x7ff820e8f716 __100-[NSPersistentUIWindowSnapshotter captureAndWriteSnapshotForWindowNumber:forWindowID:waitUntilDone:]_block_invoke.95 + 225
6   AppKit                        	    0x7ff820e902f0 ___NSPersistentUIDispatchQueueAsync_block_invoke + 28
7   libdispatch.dylib             	    0x7ff81d6c50cc _dispatch_call_block_and_release + 12
@jarolrod
Copy link
Member

jarolrod commented May 19, 2023

@ddykeman1 would you be able to compile bitcoin core on your own, enabling debug during the configure stage, that would greatly help to identify exactly what is going on.

I'd also suggest sanity checking your setup:

  1. Is the data directory existing and available
  2. Does the crash occur if you choose a different data directory? (You can run the gui on startup with -resetguisettings to be able to choose a new data directory within the gui itself on startup, or pass -datadir when running the gui from the command line

@hebasto
So the GUI ran for 3 hours, then a crash occurred. And now subsequent startups for the gui result in the above crash. So to begin we'd want to look at macOS && GUI specific init code. The current crash log does provide hints with 0x7ff8205329a4 -[NSApplication _createDockMenu:] + 165. Looking at this patch, would it be reasonable to do a check on the delegate to make sure that it's even available in the first place?

So within the constructor for MacDockIconHandler, we could do something like this before calling the setupDockClickHandler:

MacDockIconHandler::MacDockIconHandler() : QObject()
{
    id delegate = [[NSApplication sharedApplication] delegate];
    if (delegate == nil) {
        // delegate not set
    } else {
        //delegate is set
        setupDockClickHandler();
    }
}

@ddykeman1
Copy link

Not sure how to do that at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants