Skip to content

[Bug]: macOS 26 (Tahoe): permanent browser-process main-thread deadlock in AppKit/FrontBoardServices scene update (_setFrameCommon:fromServer: → FBSScene _sendUpdate: → performAsyncAndWait self-wait) #52437

Closed as not planned

Description

@brennanb2025

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

Electron Version

43.1.0

What operating system(s) are you using?

macOS

Operating System Version

macOS 26.5.1 (25F80), Tahoe

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

Unknown — single field incident so far; the deadlock is inside Apple frameworks and likely OS-version-gated rather than Electron-version-gated (details below).

Expected Behavior

The browser process main thread survives window-server-initiated frame updates.

Actual Behavior

The browser process main thread (CrBrowserMain) permanently deadlocked inside Apple's AppKit/FrontBoardServices scene-update machinery while handling a window frame update delivered from the window server. macOS flagged the process "Unresponsive for 1305 seconds before sampling"; two samples 3 minutes apart show the identical stack (100% of samples), CPU ~0. All child processes (GPU, renderers, network) remained healthy. The app never recovers; only SIGKILL ends it.

Full kernel-annotated spindump excerpt (single process, scrubbed): https://gist.github.com/brennanb2025/d7f6f5a64aaf4353c410315225e1006b

The deadlock chain, read from the spindump:

  1. The main thread picks up a BoardServices run-loop-source callout — i.e. it is executing a block belonging to the FrontBoard callout queue: __CFRunLoopDoSource0 → BSServiceMainRunLoopSourceHandler → __BSSERVICEMAINRUNLOOPQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ → -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]. While this runs, the underlying BSServiceDispatchQueue's dispatch ownership is in a transient state.
  2. The scene-settings update runs -[NSWindow _setFrameCommon:display:fromServer:], which triggers AppKit autolayout (-[NSView layoutSubtreeIfNeeded] → NSViewActuallyUpdateFrameFromLayoutEngine → -[NSView setFrame:]), which posts NSViewFrameDidChangeNotification, whose (AppKit-internal) observer re-enters _setFrameCommon:display:fromServer: — the two nested _setFrameCommon frames are visible in the stack.
  3. The nested frame change posts another notification, whose AppKit-internal observer sends a scene update back: -[FBSScene _updateClientSettings:] → -[FBSScene _sendUpdate:] → -[BSServiceDispatchQueue performAsyncAndWait:] — on the same queue from step 1 → _dispatch_async_and_wait_f_slow → __DISPATCH_WAIT_FOR_QUEUE__ → kevent_id, kernel-annotated "(blocked by queue in a transient state)". The wait can never be satisfied.

Every frame between the run loop and the deadlock is Apple code (FrontBoardServices, AppKit, CoreFoundation, BoardServices). No Electron/Chromium frames participate. This machinery (scene-backed AppKit windows) is new in macOS 26, so the deadlock cannot occur on earlier macOS.

Corroboration from another app: openai/codex#23695 shows the same terminal signature (FBSScene _sendUpdate: → performAsyncAndWait → __DISPATCH_WAIT_FOR_QUEUE__, low CPU, permanent) entered via the NSStatusItem scene path instead of a window frame update — same self-deadlock, different door.

Repro attempts: a stress harness (bare Electron 43.1.0, two scene-backed windows, ~18,000 operations over 12 minutes: setSize re-entrantly from show/restore/resize handlers, hide/show/minimize/restore, occlusion churn) did not reproduce it on macOS 26.5.1. The trigger appears to require a genuine race with the window server (a server-delivered frame update colliding with an in-flight client scene update mid-callout), which client-side behavior alone cannot force. Filing primarily so there is a canonical tracking issue for this signature; we are also filing a Feedback Assistant report with Apple with the full spindump.

Window configuration of the affected app: titleBarStyle: 'hidden' with custom traffic-light positioning; the freeze followed an hour of normal use, with text-input XPC churn (NSRemoteView/CursorUIViewService connect/invalidate cycles) in the seconds before onset.

App-side mitigations we're shipping, in case they're useful to others hitting this: (1) never mutate window frames synchronously inside show/restore handlers and skip repaint size-nudges entirely on Darwin 25+; (2) an out-of-process heartbeat watchdog that SIGKILLs and relaunches the app after sustained main-thread silence, since no in-process code can run once this hits.

Testcase Gist URL

No response (not reproducible on demand; spindump gist above)

Additional Information

Happy to provide the full multi-process spindump and both sample captures privately if useful to maintainers or for the Apple report (FB number will be added here once filed).

Activity

  1. nikwen commented on Jul 24, 2026

    @nikwen
    Member

    Thanks for reporting!

    We can't really do much with the bug report until we see code to produce the issue. Please let us know when you've found a way to repro it.

  2. added
    blocked/need-repro
    on Jul 24, 2026
  3. moved this to 👀 Unsorted Items in 43-x-yon Jul 24, 2026
  4. added theissue type on Jul 24, 2026
  5. electron-issue-triage commented on Jul 24, 2026

    @electron-issue-triage

    Hello @brennanb2025. Thanks for reporting this and helping to make Electron better!

    Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

    Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

    Now adding the blocked/need-repro Needs a test case to reproduce the bug label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

  6. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 43-x-yon Jul 29, 2026
  7. electron-issue-triage commented on Aug 4, 2026

    @electron-issue-triage

    Unfortunately, without a way to reproduce this issue, we're unable to continue investigation. This issue has been closed and will not be monitored further. If you're able to provide a minimal test case that reproduces this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    43-x-yblocked/need-reprobug 🪲platform/macOS

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions