Big Sur crash - related to too many Layout Window passes?
Reported by Tom Scogland | August 30th, 2021 @ 06:08 PM
I've been running into crashes on Big Sur for some time now, order a month, and it doesn't seem to be improved by any of the recent test builds. After a crash this morning, I got the following "problem detail" trace that seems to point to an obj-c exception being thrown and killing the program with an illegal instruction after something (hint it might be the status bar window) gets marked as needing more Layout Window passes than there are views in the window.
I would attach this, or the full output, but lighthouse is telling me I have reached my upload quota:
Process: MailMate [86451]
Path: /Applications/MailMate.app/Contents/MacOS/MailMate
Identifier: com.freron.MailMate
Version: 1.14 (5818)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: MailMate [86451]
User ID: 37084
Date/Time: 2021-08-30 11:02:04.869 -0700
OS Version: macOS 11.4 (20F71)
Report Version: 12
Bridge OS Version: 5.4 (18P4663)
Anonymous UUID: 0C158777-30A4-DE55-505F-D51DD304F1D3
Sleep/Wake UUID: 59DDA4FE-A191-4AEE-8291-EF4B530001B8
Time Awake Since Boot: 880000 seconds
Time Since Wake: 610000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [86451]
Application Specific Information:
Crashing on exception: The window has been marked as needing another Layout Window pass, but it has already had more Layout Window passes than there are views in the window.
<NSStatusBarWindow: 0x7fb699953780> 0x3cd8f (249231) {{-1243, 1416}, {44, 24}} Item-0 English
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff206ed87b __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20425d92 objc_exception_throw + 48
2 CoreFoundation 0x00007fff206ed6df +[NSException raise:format:] + 189
3 AppKit 0x00007fff22ebae57 -[NSWindow(NSDisplayCycle) _postWindowNeedsLayoutUnlessPostingDisabled] + 1698
4 AppKit 0x00007fff22eba75a -[NSWindow(NSConstraintBasedLayout) _setViewsNeedLayout:] + 51
5 AppKit 0x00007fff22e93002 -[NSView setNeedsLayout:] + 658
6 AppKit 0x00007fff2313fcdc -[NSView(NSConstraintBasedLayout) _adjustLayoutForResolutionChangeToRetina:] + 175
7 AppKit 0x00007fff2313fd7b -[NSView(NSConstraintBasedLayout) _adjustLayoutForResolutionChangeToRetina:] + 334
8 AppKit 0x00007fff2372382c -[NSWindow _updateInheritedBackingScaleFactorIfNeeded] + 100
9 AppKit 0x00007fff230bf280 __67-[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:]_block_invoke + 509
10 AppKit 0x00007fff22ec4cf3 NSPerformVisuallyAtomicChange + 132
11 AppKit 0x00007fff230bf07d -[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:] + 69
12 AppKit 0x00007fff22ec6544 -[NSWindow _setFrameCommon:display:fromServer:] + 1401
13 AppKit 0x00007fff230bddc2 -[NSWindow(NSConstraintBasedLayout) _fromConstraintsSetWindowFrame:] + 168
14 AppKit 0x00007fff22f483b4 -[NSWindow(NSConstraintBasedLayout) _changeWindowFrameFromConstraintsIfNecessary] + 584
15 CoreAutoLayout 0x00007fff273a184a -[NSISEngine withBehaviors:performModifications:] + 84
16 AppKit 0x00007fff22f48107 -[NSWindow(NSConstraintBasedLayout) layoutIfNeeded] + 206
17 AppKit 0x00007fff22f47f70 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 430
18 AppKit 0x00007fff22f471e5 NSDisplayCycleObserverInvoke + 155
19 AppKit 0x00007fff22f46d70 NSDisplayCycleFlush + 953
20 QuartzCore 0x00007fff26dd81f6 _ZN2CA11Transaction19run_commit_handlersE18CATransactionPhase + 92
21 QuartzCore 0x00007fff26dd6f8d _ZN2CA11Transaction6commitEv + 375
22 AppKit 0x00007fff22ff6cbc __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
23 AppKit 0x00007fff2374bcc3 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
24 CoreFoundation 0x00007fff20672d31 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
25 CoreFoundation 0x00007fff20672bc5 __CFRunLoopDoObservers + 543
26 CoreFoundation 0x00007fff20672058 __CFRunLoopRun + 841
27 CoreFoundation 0x00007fff2067164c CFRunLoopRunSpecific + 563
28 HIToolbox 0x00007fff288afab3 RunCurrentEventLoopInMode + 292
29 HIToolbox 0x00007fff288af815 ReceiveNextEventCommon + 587
30 HIToolbox 0x00007fff288af5b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
31 AppKit 0x00007fff22e726f2 _DPSNextEvent + 864
32 AppKit 0x00007fff22e70ec5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
33 AppKit 0x00007fff22e63239 -[NSApplication run] + 586
34 AppKit 0x00007fff22e3747c NSApplicationMain + 816
35 MailMate 0x0000000109265f4d main + 851
36 libdyld.dylib 0x00007fff20595f5d start + 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.AppKit 0x00007fff2321ed28 -[NSApplication _crashOnException:] + 347
1 com.apple.AppKit 0x00007fff22ff6ef8 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 857
2 com.apple.AppKit 0x00007fff2374bcc3 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
3 com.apple.CoreFoundation 0x00007fff20672d31 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
4 com.apple.CoreFoundation 0x00007fff20672bc5 __CFRunLoopDoObservers + 543
5 com.apple.CoreFoundation 0x00007fff20672058 __CFRunLoopRun + 841
6 com.apple.CoreFoundation 0x00007fff2067164c CFRunLoopRunSpecific + 563
7 com.apple.HIToolbox 0x00007fff288afab3 RunCurrentEventLoopInMode + 292
8 com.apple.HIToolbox 0x00007fff288af815 ReceiveNextEventCommon + 587
9 com.apple.HIToolbox 0x00007fff288af5b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
10 com.apple.AppKit 0x00007fff22e726f2 _DPSNextEvent + 864
11 com.apple.AppKit 0x00007fff22e70ec5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
12 com.apple.AppKit 0x00007fff22e63239 -[NSApplication run] + 586
13 com.apple.AppKit 0x00007fff22e3747c NSApplicationMain + 816
14 com.freron.MailMate 0x0000000109265f4d main + 851
15 libdyld.dylib 0x00007fff20595f5d start + 1
Thread 1:: JavaScriptCore bmalloc scavenger
0 libsystem_kernel.dylib 0x00007fff20547cde __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff2057ae49 _pthread_cond_wait + 1298
2 libc++.1.dylib 0x00007fff204e3d72 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3 com.apple.JavaScriptCore 0x00007fff3760de44 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 84
4 com.apple.JavaScriptCore 0x00007fff3761291b bmalloc::Scavenger::threadRunLoop() + 251
5 com.apple.JavaScriptCore 0x00007fff376124f9 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 9
6 com.apple.JavaScriptCore 0x00007fff37613ba7 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*) + 39
7 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
8 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 2:: com.apple.coreanimation.render-server
0 libsystem_kernel.dylib 0x00007fff205452ba mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2054562c mach_msg + 60
2 com.apple.QuartzCore 0x00007fff26e1cdcc CA::Render::Server::server_thread(void*) + 498
3 com.apple.QuartzCore 0x00007fff26e1cbc7 thread_fun(void*) + 25
4 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
5 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 3:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff2054d656 __select + 10
1 com.apple.CoreFoundation 0x00007fff2069a0d3 __CFSocketManager + 630
2 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
3 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 4:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff205452ba mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2054562c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff20673b5f __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff2067223f __CFRunLoopRun + 1328
4 com.apple.CoreFoundation 0x00007fff2067164c CFRunLoopRunSpecific + 563
5 com.apple.CFNetwork 0x00007fff24b10358 0x7fff248d0000 + 2360152
6 com.apple.Foundation 0x00007fff213f8477 __NSThread__start__ + 1068
7 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
8 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 5:: com.apple.CFStream.LegacyThread
0 libsystem_kernel.dylib 0x00007fff205452ba mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2054562c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff20673b5f __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff2067223f __CFRunLoopRun + 1328
4 com.apple.CoreFoundation 0x00007fff2067164c CFRunLoopRunSpecific + 563
5 com.apple.CoreFoundation 0x00007fff206edc4c _legacyStreamRunLoop_workThread + 251
6 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
7 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 6:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff205452ba mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2054562c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff20673b5f __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff2067223f __CFRunLoopRun + 1328
4 com.apple.CoreFoundation 0x00007fff2067164c CFRunLoopRunSpecific + 563
5 com.apple.AppKit 0x00007fff22ff868a _NSEventThread + 124
6 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
7 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 7:: LocalStorage
0 libsystem_kernel.dylib 0x00007fff20547cde __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff2057ae49 _pthread_cond_wait + 1298
2 com.apple.JavaScriptCore 0x00007fff375993f0 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3760
3 com.apple.WebKitLegacy 0x00007fff34db345a bool WTF::Condition::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 154
4 com.apple.WebKitLegacy 0x00007fff34db64b3 std::__1::unique_ptr<WTF::Function<void ()>, std::__1::default_delete<WTF::Function<void ()> > > WTF::MessageQueue<WTF::Function<void ()> >::waitForMessageFilteredWithTimeout<WTF::MessageQueue<WTF::Function<void ()> >::waitForMessage()::'lambda'(WTF::Function<void ()> const&)>(WTF::MessageQueueWaitResult&, WTF::MessageQueue<WTF::Function<void ()> >::waitForMessage()::'lambda'(WTF::Function<void ()> const&)&&, WTF::Seconds) + 147
5 com.apple.WebKitLegacy 0x00007fff34db5b26 WebCore::StorageThread::threadEntryPoint() + 86
6 com.apple.JavaScriptCore 0x00007fff375b827f WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 223
7 com.apple.JavaScriptCore 0x00007fff3653d4b9 WTF::wtfThreadEntryPoint(void*) + 9
8 libsystem_pthread.dylib 0x00007fff2057a8fc _pthread_start + 224
9 libsystem_pthread.dylib 0x00007fff20576443 thread_start + 15
Thread 8:: Dispatch queue: com.freron.server-background
0 libsystem_kernel.dylib 0x00007fff205452ba mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2054562c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff20673b5f __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff2067223f __CFRunLoopRun + 1328
4 com.apple.CoreFoundation 0x00007fff2067164c CFRunLoopRunSpecific + 563
5 com.freron.MailMate 0x000000010956319b connection_t::wait_for_select(bool, bool) + 319
6 com.freron.MailMate 0x00000001095886f4 int connection_t::read<std::__1::back_insert_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(std::__1::back_insert_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, bool, int) + 488
7 com.freron.MailMate 0x0000000109577b07 imap_t::read_response() + 1299
8 com.freron.MailMate 0x000000010956ab43 imap_t::run_action() + 4061
9 com.freron.MailMate 0x0000000109564748 connection_t::run() + 1048
10 com.freron.MailMate 0x0000000109568a61 invocation function for block in connection::run_in_background(std::__1::shared_ptr<connection_t>, connection_callbacks_t*) + 74
11 libdispatch.dylib 0x00007fff203cf623 _dispatch_call_block_and_release + 12
12 libdispatch.dylib 0x00007fff203d0806 _dispatch_client_callout + 8
13 libdispatch.dylib 0x00007fff203d31b0 _dispatch_continuation_pop + 423
14 libdispatch.dylib 0x00007fff203d2887 _dispatch_async_redirect_invoke + 708
15 libdispatch.dylib 0x00007fff203df818 _dispatch_root_queue_drain + 326
16 libdispatch.dylib 0x00007fff203dff70 _dispatch_worker_thread2 + 92
17 libsystem_pthread.dylib 0x00007fff20577417 _pthread_wqthread + 244
18 libsystem_pthread.dylib 0x00007fff2057642f start_wqthread + 15
Thread 9:
0 libsystem_pthread.dylib 0x00007fff20576420 start_wqthread + 0
Thread 10:
0 libsystem_pthread.dylib 0x00007fff20576420 start_wqthread + 0
Thread 11:
0 libsystem_pthread.dylib 0x00007fff20576420 start_wqthread + 0
Comments and changes to this ticket
-
Tom Scogland August 30th, 2021 @ 07:08 PM
This thread looks relevant: https://developer.apple.com/forums/thread/666566
I'm trying mail mate confined to my MBP's built-in monitor now to see if it stabilizes. Apparently some kind of issue related to the separate spaces for each monitor setting and external displays caused the same error.
Testing over the last few minutes does not show that helping, up to four crashes in five minutes, moving window between monitors may actually make it more likely.
Somehow Xcode apparently fixed it, but I don't see how they fixed it. Another thread over here: https://developer.apple.com/forums/thread/678769 implies that the same issue is caused when invalidating too many times due to looping or invalidating whole collections, not sure how applicable it is.
-
Tom Scogland September 3rd, 2021 @ 04:14 PM
To my surprise, after the first few terrible minutes, keeping mail mate on only my built-in monitor helped a great deal. I got through several hours of email processing without a crash (which I hadn't been able to do for over a week). I'll try disabling the per-monitor spaces today to see if that helps as well.
-
Tom Scogland September 8th, 2021 @ 06:13 PM
Turning off per-monitor spaces also seems to completely work around the issue. I'd prefer not to keep it like this, for a variety of reasons, but it's at least workable for now. Crashes are completely gone to be clear, not just less.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Mac OS X email client.