Skip to content

Frozen after auto-update relaunch (1.4.187→1.4.191): "no workspace found", permanent main-thread deadlock in NSStatusItem/FrontBoardServices scene update on macOS 26.5.1 #17045

Description

@srs-adamr

Summary

After the in-app auto-update relaunched Orca (1.4.187 → 1.4.191), the new main process hung permanently within its first second of life. The window renders but shows only "no workspace found", the app cannot be quit via Cmd+Q or the Dock (the main thread is dead), and Orca's own hang watchdog recorded the hang with selfRecovered: false.

A sample of the hung process shows the cause: a main-thread self-deadlock inside AppKit/FrontBoardServices scene-settings handling for the NSStatusItem (menu-bar item). While the main thread is executing a callout from the FBSWorkspace callout queue, an NSStatusItem display update triggers an NSWindow frame change, whose notification re-enters -[FBSScene _updateClientSettings:], which calls -[BSServiceDispatchQueue performAsyncAndWait:] back onto the queue the thread is already running a callout from → __DISPATCH_WAIT_FOR_QUEUE__ blocks forever.

All 2,292 samples (3s @ 1ms) show this identical stack; no other thread is doing anything (NSEventThread idle in mach_msg, all Chromium/libuv workers parked). This is an OS-framework re-entrancy deadlock, but it is presumably triggered by how/when Orca creates or updates its status item during startup window setup, and it makes the post-update relaunch a brick.

"No workspace found" appears to be a symptom, not the fault: the renderer came up, but the frozen main process never answered its workspace queries.

Environment

  • Orca 1.4.191 (updated from 1.4.187 via in-app updater), packaged build
  • Electron 43.1.0 (per crashpad annotations)
  • macOS 26.5.1 (25F80), Darwin 25.5.0, Apple Silicon (ARM64)

Timeline (from logs/main.trace.ndjson crash breadcrumbs, local time)

Time Event
13:34:58 updater_will_quit_cleanup_started — old 1.4.187 process quits for the update (daemonTeardown: "disconnect")
13:35:24 New 1.4.191 process launches (per sample header launch time)
13:35:36 main_process_lifecycle_started breadcrumb written; skill.recovery span completes 67 ms later — these are the last two trace entries the process ever writes
13:35:36 Daemon accepts the new app's control/stream hellos (daemon itself, still running the 1.4.187 entry script, is unaffected and healthy)
13:36:26 Watchdog writes main-thread-hang.json
+6 min Still frozen when sampled; identical stack across the whole sample window

main-thread-hang.json:

{"detectedAt":1787942186051,"parentPid":<pid>,"unresponsiveMs":49715,"selfRecovered":false}

Main-thread stack (from sample, 2292/2292 samples identical)

Full main-thread call graph
    2292 Thread_16379519   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2292 start  (in dyld) + 6992  [0x189c97e00]
    +   2292 ElectronMain  (in Electron Framework) + 200  [0x10e30dc5c]
    +     2292 ElectronMain  (in Electron Framework) + 1832  [0x10e30e2bc]
    +       2292 v8::Context::UseDefaultSecurityToken()  (in Electron Framework) + 5272  [0x10de1f030]
    +         2292 node::LibuvStreamWrap::HasDoTryWrite() const  (in Electron Framework) + 55700  [0x10e329814]
    +           2292 v8::internal::OptimizingCompileTaskExecutor::EnsureStarted()  (in Electron Framework) + 5632  [0x10db93d40]
    +             2292 v8::internal::OptimizingCompileTaskExecutor::EnsureStarted()  (in Electron Framework) + 8952  [0x10db94a38]
    +               2292 v8::internal::OptimizingCompileTaskExecutor::EnsureStarted()  (in Electron Framework) + 9180  [0x10db94b1c]
    +                 2292 v8::internal::OptimizingCompileTaskExecutor::EnsureStarted()  (in Electron Framework) + 9728  [0x10db94d40]
    +                   2292 v8::SharedMemoryStatistics::SharedMemoryStatistics()  (in Electron Framework) + 122952  [0x10db14634]
    +                     2292 v8::SharedMemoryStatistics::SharedMemoryStatistics()  (in Electron Framework) + 124524  [0x10db14c58]
    +                       2292 uv__getaddrinfo_translate_error  (in Electron Framework) + 1996  [0x10e7b35bc]
    +                         2292 ares_dns_rr_get_ttl  (in Electron Framework) + 3039188  [0x111b2cc40]
    +                           2292 -[NSApplication run]  (in AppKit) + 368  [0x18e53313c]
    +                             2292 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:]  (in AppKit) + 72  [0x18f0d55bc]
    +                               2292 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]  (in AppKit) + 688  [0x18f0d58b0]
    +                                 2292 _DPSNextEvent  (in AppKit) + 576  [0x18e540084]
    +                                   2292 _DPSBlockUntilNextEventMatchingListInMode  (in AppKit) + 228  [0x18ebec35c]
    +                                     2292 _BlockUntilNextEventMatchingListInMode  (in HIToolbox) + 48  [0x19708414c]
    +                                       2292 ReceiveNextEventCommon  (in HIToolbox) + 488  [0x196efa8bc]
    +                                         2292 RunCurrentEventLoopInMode  (in HIToolbox) + 320  [0x196ef7560]
    +                                           2292 _CFRunLoopRunSpecificWithOptions  (in CoreFoundation) + 532  [0x18a1e41c4]
    +                                             2292 __CFRunLoopRun  (in CoreFoundation) + 820  [0x18a111854]
    +                                               2292 __CFRunLoopDoSources0  (in CoreFoundation) + 332  [0x18a112c94]
    +                                                 2292 __CFRunLoopDoSource0  (in CoreFoundation) + 172  [0x18a112ec4]
    +                                                   2292 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__  (in CoreFoundation) + 28  [0x18a112f30]
    +                                                     2292 BSServiceMainRunLoopSourceHandler  (in BoardServices) + 224  [0x1a4678690]
    +                                                       2292 __BSSERVICEMAINRUNLOOPQUEUE_IS_CALLING_OUT_TO_A_BLOCK__  (in BoardServices) + 48  [0x1a467990c]
    +                                                         2292 _dispatch_block_invoke_direct  (in libdispatch.dylib) + 284  [0x189e9f714]
    +                                                           2292 _dispatch_client_callout  (in libdispatch.dylib) + 16  [0x189eb44b0]
    +                                                             2292 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]  (in FrontBoardServices) + 188  [0x1a4567b78]
    +                                                               2292 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2  (in FrontBoardServices) + 100  [0x1a45b06d8]
    +                                                                 2292 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2.cold.1  (in FrontBoardServices) + 388  [0x1a45f0cb0]
    +                                                                   2292 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]  (in FrontBoardServices) + 780  [0x1a458294c]
    +                                                                     2292 -[FBSScene _callOutQueue_maybeCoalesceClientSettingsUpdates:]  (in FrontBoardServices) + 136  [0x1a45816b4]
    +                                                                       2292 __76-[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.138  (in FrontBoardServices) + 832  [0x1a4582e9c]
    +                                                                         2292 -[FBSSceneObserver scene:didUpdateSettings:]  (in FrontBoardServices) + 148  [0x1a45f728c]
    +                                                                           2292 -[NSSceneStatusItem scene:didUpdateSettings:]  (in AppKit) + 52  [0x18efa10bc]
    +                                                                             2292 -[NSSceneStatusItem _updateForDiff:]  (in AppKit) + 124  [0x18efa0dc0]
    +                                                                               2292 -[NSStatusItem _setDisplayIdentifier:]  (in AppKit) + 100  [0x18e74d9c0]
    +                                                                                 2292 -[NSWindow _setFrameCommon:display:fromServer:]  (in AppKit) + 2724  [0x18e582bb8]
    +                                                                                   2292 -[NSNotificationCenter postNotificationName:object:userInfo:]  (in Foundation) + 88  [0x18b90b4a4]
    +                                                                                     2292 _CFXNotificationPost  (in CoreFoundation) + 740  [0x18a0d63d0]
    +                                                                                       2292 _CFXRegistrationPost  (in CoreFoundation) + 440  [0x18a193fd0]
    +                                                                                         2292 ___CFXRegistrationPost_block_invoke  (in CoreFoundation) + 92  [0x18a19408c]
    +                                                                                           2292 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__  (in CoreFoundation) + 128  [0x18a1079a8]
    +                                                                                             2292 ???  (in AppKit)  load address 0x18e507000 + 0x684878  [0x18eb8b878]
    +                                                                                               2292 ???  (in AppKit)  load address 0x18e507000 + 0x4befa8  [0x18e9c5fa8]
    +                                                                                                 2292 ???  (in AppKit)  load address 0x18e507000 + 0x4bed5c  [0x18e9c5d5c]
    +                                                                                                   2292 -[FBSScene _updateClientSettings:]  (in FrontBoardServices) + 672  [0x1a457f6a8]
    +                                                                                                     2292 -[FBSScene _sendUpdate:]  (in FrontBoardServices) + 1120  [0x1a457fbac]
    +                                                                                                       2292 -[FBSWorkspaceScenesClient scene:didUpdateClientSettings:withDiff:transitionContext:]  (in FrontBoardServices) + 256  [0x1a4568d18]
    +                                                                                                         2292 -[BSServiceDispatchQueue performAsyncAndWait:]  (in BoardServices) + 84  [0x1a4677c30]
    +                                                                                                           2292 _dispatch_async_and_wait_f  (in libdispatch.dylib) + 100  [0x189ea105c]
    +                                                                                                             2292 _dispatch_async_and_wait_f_slow  (in libdispatch.dylib) + 44  [0x189eaac24]
    +                                                                                                               2292 __DISPATCH_WAIT_FOR_QUEUE__  (in libdispatch.dylib) + 432  [0x189eaa6ac]
    +                                                                                                                 2292 _dispatch_event_loop_wait_for_ownership  (in libdispatch.dylib) + 460  [0x189ebe474]
    +                                                                                                                   2292 _dispatch_kq_poll  (in libdispatch.dylib) + 220  [0x189ebda64]
    +                                                                                                                     2292 kevent_id  (in libsystem_kernel.dylib) + 8  [0x18a013a74]

Key frames, inner to outer:

kevent_id
_dispatch_kq_poll
_dispatch_event_loop_wait_for_ownership
__DISPATCH_WAIT_FOR_QUEUE__                          ← waits forever
_dispatch_async_and_wait_f_slow
-[BSServiceDispatchQueue performAsyncAndWait:]
-[FBSWorkspaceScenesClient scene:didUpdateClientSettings:withDiff:transitionContext:]
-[FBSScene _sendUpdate:] / _updateClientSettings:    ← re-entry
... (NSNotificationCenter post from window frame change)
-[NSWindow _setFrameCommon:display:fromServer:]
-[NSStatusItem _setDisplayIdentifier:]
-[NSSceneStatusItem _updateForDiff:] / scene:didUpdateSettings:
-[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]
-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]   ← already on this queue
BSServiceMainRunLoopSourceHandler (main run loop source0)
-[NSApplication run] → ElectronMain

Additional observations

  • No crash report: Crashpad completed/ and pending/ are empty — the process hung, it never crashed, so nothing was auto-reported. The hang watchdog file + a sample were the only diagnostics.
  • The app process is parented to launchd and holds the SingletonLock; only SIGKILL/Force Quit clears it.
  • The Orca daemon (Orca Helper running daemon-entry.js, started by the previous version, uptime 4+ days) and all terminal sessions under it survived both the update quit and the hang — they are separate processes and reattach fine.
  • Because the deadlock fires inside status-item scene-settings handling on macOS 26.5.1, a possible mitigation on the app side is deferring NSStatusItem creation/updates out of the initial window-frame/scene-update window, or avoiding synchronous scene-settings work re-entrancy at startup.

Steps to reproduce (as experienced)

  1. Run Orca 1.4.187 on macOS 26.5.1 with an active workspace and terminal sessions.
  2. Accept the in-app auto-update to 1.4.191; the app quits and relaunches itself.
  3. Relaunched app shows "no workspace found" and is permanently frozen (not repro-verified a second time — the hung instance was kept alive for diagnostics).

Happy to provide the full sample file, trace tails, or run further diagnostics on the hung instance if requested.

Activity

  1. srs-adamr commented on Aug 28, 2026

    @srs-adamr
    ContributorAuthor

    Additional observation that may explain the trigger: after force-killing the hung instance and relaunching 1.4.191, macOS immediately showed the keychain authorization prompt — "Orca wants to use your confidential information stored in 'orca Safe Storage' in your keychain" (Electron safeStorage). It prompted twice; once the login keychain password was entered, the app started up completely normally (workspace loaded, hang watchdog marker was cleaned up).

    So the post-update relaunch of the updated binary triggers keychain ACL re-authorization at startup. During the original frozen launch this prompt was never visibly presented — plausibly the SecurityAgent dialog presentation is what drove the scene-settings update in which the main thread deadlocked (the NSStatusItem/FBSScene stack in the report), leaving the auth pending and the app permanently stuck at "no workspace found".

    Possible repro path: update → binary change → safeStorage keychain prompt due at first launch → main-thread deadlock in scene-settings handling while the modal is being presented. May be worth deferring safeStorage/keychain access and status-item setup off the initial launch path.

  2. added
    bugSomething isn't working
    os:macosIssues affecting macOS
    on Sep 19, 2026
  3. added theissue type on Sep 19, 2026
  4. AmethystLiang commented on Sep 27, 2026

    @AmethystLiang
    Contributor

    Another occurrence on 1.4.215-adhoc.20260926234546 (macOS 26.5.1 / 25F80, Apple Silicon), also on the first launch after an updater relaunch (from 1.4.207-hourly). Full write-up, sample and timeline are in #23279 (closed as a duplicate of this issue).

    This one was entered through a different path that the #10473 deferral doesn't cover:

    • Entry: CoreAnimation transaction flush (UC::DriverCore::continueProcessing → CA::Transaction::commit) → NSStatusBarButtonCell drawWithFrame: → NSSystemStatusBar drawBackgroundInRect: → NSSceneStatusItem _setSelectedContentFrame: → NSStatusItemScene updateSettings:
    • Same terminal wait: FBSScene _updateClientSettings: → _sendUpdate: → BSServiceDispatchQueue performAsyncAndWait: → _dispatch_event_loop_wait_for_ownership, with 2513/2513 samples, still identical about 6 min later, at 0% CPU

    The update comes from AppKit's own draw of the menu-bar button, not from Orca calling tray.setImage/setToolTip, so deferring Orca's tray mutations can't prevent it. The process's last log line came 1s after launch, just as ControlCenter created the status-item Replicant[1] scene during the post-update "reconnect". renderer_bootstrap_started was never written. Force-quit and relaunch recovered it.

    Both occurrences so far happened right after an updater relaunch. Possible directions: delay new Tray() on that launch (or until after the first window has shown and the ControlCenter reconnect has settled), and let the hang watchdog force-relaunch when selfRecovered: false.

  5. mad-aran commented on Oct 17, 2026

    @mad-aran

    Similar issue after auto-update relaunch, with a remote Orca server environment.

    Versions: macOS desktop <Mac版のバージョン> (after auto-update), remote runtime 1.4.224 on Rocky Linux 9 (headless orca serve, reached over Tailscale at ws://:6768)

    What happened

    • 17:10:59 JST the desktop logged updater_will_quit_cleanup_started with daemonTeardown: "disconnect" and relaunched for the update.
    • The remote host's sshd shows a clean client disconnect at the same second (reason 11, by application). Host, network and Tailscale were healthy throughout (no sleep, no OOM, direct path kept).
    • After relaunch, the desktop did not reconnect to the existing remote environment / SSH target. I had to create a new connection to get back in.
    • A sidebar group that belonged to the previous connection can no longer be opened, even though the remote runtime and its project setup report ready.

    Expected
    The existing environment and its groups are restored automatically after an update relaunch.

  6. FMsongX2 commented on Nov 7, 2026

    @FMsongX2

    Another occurrence, and this one is not tied to an updater relaunch: it hit 5h28m into a normal session on 1.4.251 (Electron 43.8.6), macOS 26.7.2 (25G332), Apple Silicon. Same terminal wait, entered through the window-frame path from electron/electron#52437 rather than the status-item paths above.

    Timeline (KST, from the unified log and main.trace.ndjson)

    Time Event
    14:30:55 – 14:31:25 Every ~30 s: NSPersistentUIManager flushAllChanges, then Orca's main thread sends NSSceneFenceAction updates for the menu-bar item scenes (com.apple.controlcenter:…-NSStatusItemView, …-Replicant[1]-Aux[1]-NSStatusItemView)
    14:31:13.4 Last trace span: sidebar_worktree_activate
    14:31:25.354 Last log line from any Orca thread: main thread, Sending action(s) in update: NSSceneFenceAction for the status-item scene
    14:31:25.452 ControlCenter moves that status-item scene BG-Active[40] → XX-None[0]
    14:34 sample ×2, 16 s apart: 813/813 and 810/810 samples on the identical main-thread stack, 0 % CPU. CLI calls time out; the renderer keeps running. Force-killed and relaunched; terminals reattached from the daemon.

    Main-thread stack (identical in both samples: 813/813 and 810/810; verbatim frames)

    __CFRunLoopDoSource0
    BSServiceMainRunLoopSourceHandler  (in BoardServices)
    -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]  (in FrontBoardServices)   ← running a scene callout
    __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2
    -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]
    -[FBSSceneObserver scene:didUpdateSettings:]
    ???  (in AppKit) +0x4bf7a0 / +0x4bf1dc
    -[NSWindow _setFrameCommon:display:fromServer:]  (in AppKit) + 2908
    -[NSView displayIfNeeded] → -[NSView layoutSubtreeIfNeeded] → … → NSViewActuallyUpdateFrameFromLayoutEngine
    -[NSView setFrame:] → -[NSView setFrameSize:] → -[NSView _postFrameChangeNotification]
    __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ → ???  (in AppKit) +0x6848ec / +0x4bf0e8
    -[NSWindow _setFrameCommon:display:fromServer:]  (in AppKit) + 2724                         ← re-entered
    -[NSNotificationCenter postNotificationName:object:userInfo:]
    __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ → ???  (in AppKit) +0x6848ec / +0x4bf01c / +0x4bedd0
    -[FBSScene _updateClientSettings:]
    -[FBSScene _sendUpdate:]
    -[FBSWorkspaceScenesClient scene:didUpdateClientSettings:withDiff:transitionContext:]
    -[BSServiceDispatchQueue performAsyncAndWait:]                                              ← back onto the callout queue
    _dispatch_async_and_wait_f_slow
    __DISPATCH_WAIT_FOR_QUEUE__
    _dispatch_event_loop_wait_for_ownership
    kevent_id
    

    Everything above __CFRunLoopDoSource0 is -[NSApplication run] from ElectronMain. There are no Orca or Electron frames inside the deadlock. None of the other 58 threads holds a FrontBoard or BoardServices frame, so nothing else in the process can release the queue.

    So there are now three doors into one self-wait: the status-item _setDisplayIdentifier: path (original report), the status-bar draw path (#23279), and the server-delivered window-frame path (this one). Deferring Orca's own AppKit mutations can't close the last two. #39312 lets the existing hang watchdog relaunch Orca only when two live sample captures prove this exact self-wait; every other stall stays observation-only.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingos:macosIssues affecting macOS

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions