Claude Desktop 1388% CPU — swift_addon.node Go goroutine spin-loop after sleep/wake cycles

Resolved 💬 3 comments Opened Mar 2, 2026 by linust Closed Mar 31, 2026

Summary

Claude Desktop (v1.1.4328) consumed 1388% CPU (saturating ~12.5 of 16 cores) after the Mac went through multiple sleep/wake cycles. The process had to be force-quit. Root cause: 22 Go goroutines inside swift_addon.node entered a tight spin-loop on dead sockets.

Important: This is a Claude Desktop bug (the Electron app), not Claude Code CLI.

Environment

  • App: Claude Desktop v1.1.4328
  • OS: macOS 26.3 (Build 25D125)
  • Hardware: Mac16,6 (Apple M4 Max), 16 cores, 64 GB RAM
  • MCP servers: None user-configured. Only built-in: mcp-registry, Claude in Chrome, office-addin

Steps to reproduce

  1. Launch Claude Desktop
  2. Leave it running while the Mac goes through repeated sleep/wake cycles (15 cycles observed over ~2.5 hours — lid close/open, clamshell mode transitions)
  3. After waking from sleep, Claude Desktop CPU spikes to >1000% and stays there indefinitely

What happened

Timeline (2026-02-27)

| Time | Event |
|------|-------|
| 10:24 | Claude Desktop launched. MCP connections opened for mcp-registry, Claude in Chrome, office-addin |
| 10:56–12:53 | 15 sleep/wake cycles (normal laptop usage — lid open/close) |
| 11:05 | net::ERR_CONNECTION_RESET during skills sync — network disruption after a wake |
| ~13:00 | 1388% CPU noticed in Activity Monitor. Fan at 2870 RPM |
| 13:02 | Spindump captured (10s sample) |
| 13:21 | sample captured (1ms interval, 1509 samples) |
| 13:24 | Force-quit and restart resolved the issue |

Spindump analysis

The 10-second spindump captured 124.7 seconds of CPU time for the Claude process alone.

22 Go runtime threads inside swift_addon.node were the source, each consuming 3–5 seconds of CPU in the 10s window:

| Thread | CPU time | Cycles/Instruction |
|--------|----------|-------------------|
| 0xd1159 | 4.791s | 5.73 c/i |
| 0xe58dd | 4.695s | 5.77 c/i |
| 0xd115b | 4.678s | 5.81 c/i |
| 0xcd9c6 | 4.435s | 5.73 c/i |
| ... (18 more) | 3.1–4.3s each | 5.5–5.8 c/i |

Total across Go threads: ~80s CPU in 10s = 8 cores pinned.

All 22 threads show the same stack:

runtime.asmcgocall.abi0 + 124 (swift_addon.node)
  → read + 8 (libsystem_kernel.dylib)    [~580-608 of 1001 samples]

runtime.asmcgocall.abi0 + 200 (swift_addon.node)
  → runtime.pthread_cond_wait_trampoline  [~419 of 1001 samples]

The read() syscalls are returning immediately (not blocking) — the goroutines are spin-looping on sockets that were invalidated during sleep transitions. The 5.5–5.8 cycles/instruction ratio (vs normal ~1.0) confirms severe L1/L2 cache thrashing from the tight loop across many cores.

What was NOT the cause

  • No custom MCP serversclaude_desktop_config.json only contains UI preferences
  • Docker was running but at 0% CPU — not contributing
  • The main Electron thread (Thread 0xbc3ba) was healthy at 0.2s CPU, idling in mach_msg2_trap (normal event loop)

Expected behavior

Claude Desktop should properly handle macOS sleep/wake transitions without entering a CPU spin-loop. The Go runtime in swift_addon.node should detect dead sockets and either reconnect or back off with exponential retry, not spin-loop on immediate read() returns.

Spindump extract (Claude process only, redacted)

<details>
<summary>Click to expand spindump (sanitized — Claude process only, user paths and org IDs redacted)</summary>

Date/Time: 2026-02-27 13:02:57.538 +0100
End time: 2026-02-27 13:03:07.543 +0100
OS Version: macOS 26.3 (Build 25D125)
Architecture: arm64e
Report Version: 67

Data Source: Stackshots
Shared Cache: 25AE5A2A-FE2A-3998-8D4E-F3C5C6E6CEB6 slid base address 0x192c40000, slide 0x12c40000 (System Primary)
Shared Cache: FADD4891-63D3-31F6-AEC1-556829563B2F slid base address 0x1988b4000, slide 0x188b4000 (DriverKit)

Command: Claude
Path: /Applications/Claude.app/Contents/MacOS/Claude
Identifier: com.anthropic.claudefordesktop
Version: 1.1.4328 (1.1.4328)
Team ID: Q6L2SF6YDW
Is First Party: No
Beta Identifier: 5C3975E9-7D07-5C8B-B59F-2CE49654A5F4
Architecture: arm64
Parent: launchd [1]
PID: 31973
Time Since Fork: 9532s

Duration: 10.00s
Steps: 1001 (10ms sampling interval)

Hardware model: Mac16,6
Active cpus: 16
Memory size: 64 GB
HW page size: 16384
VM page size: 16384
Shared cache residency: 25.89% (1389.39 MB / 5367.34 MB)

Time Since Boot: 85387s
Time Awake Since Boot: 28474s
Time Since Wake: 588s

Fan speed: 2870 rpm
Total CPU Time: 150.629s (526.6G cycles, 292.5G instructions, 1.80c/i)
Advisory levels: Battery -> 3, User -> 2, ThermalPressure -> 0, Combined -> 2
Free disk space: 674.80 GB/926.35 GB, low space threshold 3072 MB

========================================
NOTE: Extracted Claude process only (from full spindump with 1009 processes)
User paths and org IDs redacted for privacy.
========================================

Process: Claude [31973]
UUID: 4C4C445A-5555-3144-A135-D1BBDECA15FC
Path: /Applications/Claude.app/Contents/MacOS/Claude
Identifier: com.anthropic.claudefordesktop
Version: 1.1.4328 (1.1.4328)
Team ID: Q6L2SF6YDW
Is First Party: No
Beta Identifier: 5C3975E9-7D07-5C8B-B59F-2CE49654A5F4
Shared Cache: 25AE5A2A-FE2A-3998-8D4E-F3C5C6E6CEB6 slid base address 0x192c40000, slide 0x12c40000 (System Primary)
Architecture: arm64
Parent: launchd [1]
UID: 501
Memory Limit: 0MB
Jetsam Priority: 100
Footprint: 123.46 MB
Time Since Fork: 9532s
Num samples: 1001 (1-1001)
CPU Time: 124.685s (449.6G cycles, 81.6G instructions, 5.51c/i)
Note: Suspended for 122 samples
Num threads: 90
Note: 4 idle work queue threads omitted

Thread 0xbc3ba DispatchQueue "com.apple.main-thread"(1) Thread name "CrBrowserMain" 1001 samples (1-1001) priority 46 (base 46) cpu time 0.200s (770.2M cycles, 972.3M instructions, 0.79c/i)
1001 start + 7184 (dyld + 36180) [0x192d51d54]
1001 ElectronMain + 120 (Electron Framework + 43227788) [0x119e6da8c]
1001 v8::ObjectTemplate::SetHandler(v8::NamedPropertyHandlerConfiguration const&) + 38920 (Electron Framework + 31710364) [0x119371c9c]
1001 v8::ObjectTemplate::SetHandler(v8::NamedPropertyHandlerConfiguration const&) + 40500 (Electron Framework + 31711944) [0x1193722c8]
1001 v8_inspector::V8StackTraceId::V8StackTraceId(unsigned long, std::__Cr::pair<long long, long long>, bool) + 3812 (Electron Framework + 28871948) [0x1190bcd0c]
1001 v8::TryCatch::Exception() const + 584 (Electron Framework + 37729876) [0x11992f654]
1001 v8::Isolate::RequestInterrupt(void ()(v8::Isolate, void), void) + 49828 (Electron Framework + 33565384) [0x119536ac8]
1001 v8::Isolate::RequestInterrupt(void ()(v8::Isolate, void), void) + 50080 (Electron Framework + 33565636) [0x119536bc4]
1001 v8::Message::GetLineNumber(v8::Local<v8::Context>) const + 91580 (Electron Framework + 32860272) [0x11948a870]
1001 v8::Message::GetLineNumber(v8::Local<v8::Context>) const + 91756 (Electron Framework + 32860448) [0x11948a920]
1001 rust_png$cxxbridge1$Reader$try_get_gama + 28472 (Electron Framework + 24909156) [0x118cf5564]
1001 v8::internal::compiler::CompilationDependencies::DependOnEmptyContextExtension(v8::internal::compiler::ScopeInfoRef) + 53160 (Electron Framework + 24555892) [0x118c9f174]
1001 node::PrincipalRealm::http2session_on_origin_function() const + 48908 (Electron Framework + 30708776) [0x11927d428]
1001 node::PrincipalRealm::http2session_on_origin_function() const + 49396 (Electron Framework + 30709264) [0x11927d610]
1001 -[NSApplication run] + 368 (AppKit + 100224) [0x1975cb780]
1001 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72 (AppKit + 11430808) [0x198099b98]
1001 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 (AppKit + 11431564) [0x198099e8c]
1000 _DPSNextEvent + 588 (AppKit + 130632) [0x1975d2e48]
1000 _DPSBlockUntilNextEventMatchingListInMode + 236 (AppKit + 5382164) [0x197ad5014]
1000 _BlockUntilNextEventMatchingListInMode + 48 (HIToolbox + 2419556) [0x19fe82b64]
1000 ReceiveNextEventCommon + 488 (HIToolbox + 805560) [0x19fcf8ab8]
1000 RunCurrentEventLoopInMode + 316 (HIToolbox + 792464) [0x19fcf5790]
963 _CFRunLoopRunSpecificWithOptions + 532 (CoreFoundation + 1150780) [0x193273f3c]
929 __CFRunLoopRun + 1188 (CoreFoundation + 386312) [0x1931b9508]
929 __CFRunLoopServiceMachPort + 160 (CoreFoundation + 392112) [0x1931babb0]
929 mach_msg + 24 (libsystem_kernel.dylib + 4020) [0x1930d8fb4]
929 mach_msg_overwrite + 484 (libsystem_kernel.dylib + 39308) [0x1930e198c]
929 mach_msg2_trap + 8 (libsystem_kernel.dylib + 3124) [0x1930d8c34]
*853 ??? (kernel.release.t6041 + 195684) [0xfffffe00088afc64]
*61 ??? (kernel.release.t6041 + 195684) [0xfffffe00088afc64] (suspended)
*14 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
*1 ??? (kernel.release.t6041 + 18604) [0xfffffe00088848ac] (running)
27 __CFRunLoopRun + 2168 (CoreFoundation + 387292) [0x1931b98dc]
27 __CFRunLoopDoSource1 + 508 (CoreFoundation + 392876) [0x1931baeac]
27 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60 (CoreFoundation + 393092) [0x1931baf84]
20 __CFMachPortPerform + 240 (CoreFoundation + 506952) [0x1931d6c48]
20 MessageHandler(__CFMachPort, void, long, void*) + 60 (HIToolbox + 759120) [0x19fced550]
10 PullEventsFromWindowServerOnConnection(unsigned int, unsigned char, __CFMachPortBoost*) + 80 (HIToolbox + 770460) [0x19fcf019c]
10 SLEventCreateNextEvent + 20 (SkyLight + 927304) [0x1999dd648]
10 SLSGetNextEventRecordInternal + 296 (SkyLight + 1479156) [0x199a641f4]
7 CGSSnarfAndDispatchDatagrams + 168 (SkyLight + 36428) [0x199903e4c]
7 mach_msg + 24 (libsystem_kernel.dylib + 4020) [0x1930d8fb4]
7 mach_msg_overwrite + 484 (libsystem_kernel.dylib + 39308) [0x1930e198c]
7 mach_msg2_trap + 8 (libsystem_kernel.dylib + 3124) [0x1930d8c34]
*7 ??? (kernel.release.t6041 + 195684) [0xfffffe00088afc64] (blocked by turnstile waiting for WindowServer [415])
3 CGSSnarfAndDispatchDatagrams + 2568 (SkyLight + 38828) [0x1999047ac]
3 CGSDatagramReadStream::VMData::release() + 44 (SkyLight + 4598112) [0x199d5d960]
3 CGSDatagramReadStream::VMData::~VMData() + 48 (SkyLight + 4598188) [0x199d5d9ac]
3 _kernelrpc_mach_vm_deallocate_trap + 8 (libsystem_kernel.dylib + 2728) [0x1930d8aa8]
*2 ??? (kernel.release.t6041 + 15928) [0xfffffe0008883e38]
*2 ??? (kernel.release.t6041 + 1864528) [0xfffffe0008a47350]
*2 ??? (kernel.release.t6041 + 1839564) [0xfffffe0008a411cc]
*2 mach_vm_deallocate + 104 (kernel.release.t6041 + 1585116) [0xfffffe0008a02fdc]
*2 ??? (kernel.release.t6041 + 1221896) [0xfffffe00089aa508]
*1 ??? (kernel.release.t6041 + 1183492) [0xfffffe00089a0f04]
*1 ??? (kernel.release.t6041 + 1767260) [0xfffffe0008a2f75c]
*1 ??? (kernel.release.t6041 + 1729916) [0xfffffe0008a2657c]
*1 ??? (kernel.release.t6041 + 1732636) [0xfffffe0008a2701c]
*1 ??? (kernel.release.t6041 + 1732636) [0xfffffe0008a2701c] (running)
*1 ??? (kernel.release.t6041 + 1180720) [0xfffffe00089a0430]
*1 ??? (kernel.release.t6041 + 1180720) [0xfffffe00089a0430] (running)
*1 ??? [0xfffffff0270e70c8] (running)
8 PullEventsFromWindowServerOnConnection(unsigned int, unsigned char, __CFMachPortBoost*) + 320 (HIToolbox + 770700) [0x19fcf028c]
8 SLEventCreateNextEvent + 20 (SkyLight + 927304) [0x1999dd648]
8 SLSGetNextEventRecordInternal + 296 (SkyLight + 1479156) [0x199a641f4]
8 CGSSnarfAndDispatchDatagrams + 168 (SkyLight + 36428) [0x199903e4c]
8 mach_msg + 24 (libsystem_kernel.dylib + 4020) [0x1930d8fb4]
8 mach_msg_overwrite + 484 (libsystem_kernel.dylib + 39308) [0x1930e198c]
8 mach_msg2_trap + 8 (libsystem_kernel.dylib + 3124) [0x1930d8c34]
*6 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
*2 ??? (kernel.release.t6041 + 195684) [0xfffffe00088afc64] (blocked by turnstile waiting for WindowServer [415] after 2 hops)
1 PullEventsFromWindowServerOnConnection(unsigned int, unsigned char, __CFMachPortBoost*) + 300 (HIToolbox + 770680) [0x19fcf0278]
1 PushToCGEventQueue(__CGEvent, unsigned int, unsigned char, __CFMachPortBoost) + 2092 (HIToolbox + 763228) [0x19fcee55c]
1 CFRunLoopTimerSetNextFireDate + 424 (CoreFoundation + 562620) [0x1931e45bc]
1 __CFRunLoopCopyMode + 148 (CoreFoundation + 1149632) [0x193273ac0]
1 CFSetGetValue + 148 (CoreFoundation + 214424) [0x19318f598]
1 __CFStringHash + 180 (CoreFoundation + 30424) [0x1931626d8] (running)
1 SLEventGetType + 0 (SkyLight + 917952) [0x1999db1c0] (running)
7 __CFMachPortPerform + 288 (CoreFoundation + 507000) [0x1931d6c78]
7 UC::DriverCore::continueProcessing() + 84 (UpdateCycle + 4860) [0x28550e2fc]
5 stepTransactionFlush + 220 (AppKit + 7461380) [0x197cd0a04]
5 CA::Transaction::flush_as_runloop_observer(bool) + 140 (QuartzCore + 2010664) [0x19d0a8e28]
3 CA::Transaction::commit() + 644 (QuartzCore + 9196) [0x19cec03ec]
2 CA::Context::commit_transaction(CA::Transaction, double, double) + 14048 (QuartzCore + 1812212) [0x19d0786f4]
2 CA::Render::Encoder::send_message(unsigned int, unsigned int, unsigned int*, unsigned long) + 1112 (QuartzCore + 2750772) [0x19d15d934]
2 CA::Render::Message::send_message() + 84 (QuartzCore + 101236) [0x19ced6b74]
2 mach_msg + 24 (libsystem_kernel.dylib + 4020) [0x1930d8fb4]
2 mach_msg_overwrite + 484 (libsystem_kernel.dylib + 39308) [0x1930e198c]
2 mach_msg2_trap + 8 (libsystem_kernel.dylib + 3124) [0x1930d8c34]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
*1 ??? (kernel.release.t6041 + 15928) [0xfffffe0008883e38]
*1 ??? (kernel.release.t6041 + 1864528) [0xfffffe0008a47350]
*1 ??? (kernel.release.t6041 + 1839564) [0xfffffe0008a411cc]
*1 ??? (kernel.release.t6041 + 278176) [0xfffffe00088c3ea0]
*1 ??? (kernel.release.t6041 + 276768) [0xfffffe00088c3920]
*1 ??? (kernel.release.t6041 + 189256) [0xfffffe00088ae348]
*1 ??? (kernel.release.t6041 + 263868) [0xfffffe00088c06bc]
*1 ??? (kernel.release.t6041 + 257120) [0xfffffe00088bec60]
*1 ??? (kernel.release.t6041 + 633268) [0xfffffe000891a9b4] (running)
1 CA::Context::commit_transaction(CA::Transaction, double, double) + 17636 (QuartzCore + 1815800) [0x19d0794f8]
1 _dispatch_event_loop_poke + 336 (libdispatch.dylib + 148292) [0x192f81344]
1 kevent_id + 8 (libsystem_kernel.dylib + 10848) [0x1930daa60]
*1 ??? (kernel.release.t6041 + 15928) [0xfffffe0008883e38]
*1 ??? (kernel.release.t6041 + 1863376) [0xfffffe0008a46ed0]
*1 ??? (kernel.release.t6041 + 7702932) [0xfffffe0008fd8994]
*1 ??? (kernel.release.t6041 + 6015360) [0xfffffe0008e3c980]
*1 ??? (kernel.release.t6041 + 6015736) [0xfffffe0008e3caf8]
*1 ??? (kernel.release.t6041 + 6003272) [0xfffffe0008e39a48]
*1 ??? (kernel.release.t6041 + 5983996) [0xfffffe0008e34efc]
*1 ??? (kernel.release.t6041 + 5983012) [0xfffffe0008e34b24]
*1 ??? (kernel.release.t6041 + 5812444) [0xfffffe0008e0b0dc]
*1 ??? (kernel.release.t6041 + 5794500) [0xfffffe0008e06ac4] (running)
2 CA::Transaction::commit() + 316 (QuartzCore + 8868) [0x19cec02a4]
2 CA::Transaction::run_commit_handlers(CATransactionPhase) + 120 (QuartzCore + 15612) [0x19cec1cfc]
2 NSDisplayCycleFlush + 656 (AppKit + 462352) [0x197623e10]
2 NSDisplayCycleObserverInvoke + 168 (AppKit + 463252) [0x197624194]
2 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 364 (AppKit + 465100) [0x1976248cc]
2 -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded] + 240 (AppKit + 17024280) [0x1985ef518]
2 -[NSWindow(NSConstraintBasedLayoutInternal) _layoutViewTree] + 120 (AppKit + 17023744) [0x1985ef300]
2 -[NSView layoutSubtreeIfNeeded] + 96 (AppKit + 273680) [0x1975f5d10]
2 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
2 -[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 100 (AppKit + 13480788) [0x19828e354]
2 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
2 __56-[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:]_block_invoke + 908 (AppKit + 13481708) [0x19828e6ec]
2 -[NSView _layoutSubtreeWithOldSize:] + 100 (AppKit + 13477992) [0x19828d868]
2 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
2 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 684 (AppKit + 13478688) [0x19828db20]
2 -[NSView _layoutSubtreeWithOldSize:] + 100 (AppKit + 13477992) [0x19828d868]
2 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
2 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 372 (AppKit + 13478376) [0x19828d9e8]
2 _NSViewLayout + 96 (AppKit + 274740) [0x1975f6134]
2 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
1 ___NSViewLayout_block_invoke + 760 (AppKit + 13545472) [0x19829e000]
1 ??? (AppKit + 3529748) [0x197910c14]
1 ??? (AppKit + 3527188) [0x197910214]
1 swift_unknownObjectWeakInit + 80 (libswiftCore.dylib + 596012) [0x1a65ad82c] (running)
1 ___NSViewLayout_block_invoke + 624 (AppKit + 13545336) [0x19829df78]
1 ??? (AppKit + 3513816) [0x19790cdd8]
1 ??? (AppKit + 3512256) [0x19790c7c0]
1 ??? (AppKit + 3759660) [0x197948e2c]
1 ??? (AppKit + 3759620) [0x197948e04]
1 @objc NSHostingView.layout() + 28 (SwiftUI + 8905808) [0x1c7b6c450]
1 NSHostingView.layout() + 504 (SwiftUI + 8904312) [0x1c7b6be78]
1 +[NSAnimationContext runAnimationGroup:] + 56 (AppKit + 14728128) [0x1983bebc0]
1 <deduplicated_symbol> + 44 (SwiftUI + 8880248) [0x1c7b66078]
1 <deduplicated_symbol> + 28 (SwiftUI + 9020040) [0x1c7b88288]
1 closure #1 in NSHostingView.layout() + 520 (SwiftUI + 8905016) [0x1c7b6c138]
1 ViewGraphRootValueUpdater.render(interval:updateDisplayList:targetTimestamp:) + 528 (SwiftUICore + 13959436) [0x2425ea10c]
1 closure #1 in ViewGraphRootValueUpdater.render(interval:updateDisplayList:targetTimestamp:) + 860 (SwiftUICore + 13967128) [0x2425ebf18]
1 AGGraphGetWeakValue + 372 (AttributeGraph + 191028) [0x1c8a63a34]
1 AG::Graph::value_ref(AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&) + 296 (AttributeGraph + 86716) [0x1c8a4a2bc]
1 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, unsigned int) + 352 (AttributeGraph + 56564) [0x1c8a42cf4]
1 AG::Graph::UpdateStack::update() + 500 (AttributeGraph + 54612) [0x1c8a42554]
1 specialized implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 72 (SwiftUICore + 7964880) [0x2420328d0]
1 specialized GeometryEffectDisplayList.value.getter + 452 (SwiftUICore + 7744812) [0x241ffcd2c]
1 ??? (CoreGraphics + 1214788) [0x199fca944] (running)
1 +[CADisplayLink(CADisplayLinkPrivate) dispatchDeferredDisplayLinks] + 0 (QuartzCore + 863120) [0x19cf90b90] (running)
1 stepTransactionFlushDone + 52 (AppKit + 7461696) [0x197cd0b40]
1 objc_release + 120 (libobjc.A.dylib + 33160) [0x192ccc188] (running)
6 __CFRunLoopRun + 820 (CoreFoundation + 385944) [0x1931b9398]
6 __CFRunLoopDoSources0 + 232 (CoreFoundation + 390920) [0x1931ba708]
6 __CFRunLoopDoSource0 + 172 (CoreFoundation + 391580) [0x1931ba99c]
6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CoreFoundation + 391688) [0x1931baa08]
6 UC::DriverCore::continueProcessing() + 84 (UpdateCycle + 4860) [0x28550e2fc]
6 modeScheduling + 396 (AppKit + 7459220) [0x197cd0194]
6 +[NSDisplayTiming(NSDisplayTimingCreation) displayTimingsForActiveScreens] + 60 (AppKit + 715856) [0x197661c50]
6 SLSGetActiveDisplayList + 180 (SkyLight + 1705600) [0x199a9b680]
6 CGSDisplayState::isActive() const + 32 (SkyLight + 18560) [0x1998ff880]
*6 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 __CFRunLoopRun + 804 (CoreFoundation + 385928) [0x1931b9388]
1 __CFRunLoopDoBlocks + 216 (CoreFoundation + 390304) [0x1931ba4a0]
1 CFSetContainsValue + 68 (CoreFoundation + 214904) [0x19318f778]
1 CFBasicHashGetCountOfKey + 184 (CoreFoundation + 133068) [0x19317b7cc]
1 __CFStringHash + 228 (CoreFoundation + 30472) [0x193162708] (running)
36 _CFRunLoopRunSpecificWithOptions + 484 (CoreFoundation + 1150732) [0x193273f0c]
36 __CFRunLoopDoObservers + 648 (CoreFoundation + 388436) [0x1931b9d54]
36 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CoreFoundation + 388696) [0x1931b9e58]
36 UC::DriverCore::continueProcessing() + 84 (UpdateCycle + 4860) [0x28550e2fc]
36 stepTransactionFlush + 220 (AppKit + 7461380) [0x197cd0a04]
36 CA::Transaction::flush_as_runloop_observer(bool) + 140 (QuartzCore + 2010664) [0x19d0a8e28]
36 CA::Transaction::commit() + 316 (QuartzCore + 8868) [0x19cec02a4]
36 CA::Transaction::run_commit_handlers(CATransactionPhase) + 120 (QuartzCore + 15612) [0x19cec1cfc]
36 NSDisplayCycleFlush + 656 (AppKit + 462352) [0x197623e10]
36 NSDisplayCycleObserverInvoke + 168 (AppKit + 463252) [0x197624194]
30 __NSWindowGetDisplayCycleObserverForUpdateConstraints_block_invoke + 364 (AppKit + 463668) [0x197624334]
30 -[NSWindow(NSConstraintBasedLayoutInternal) updateConstraintsIfNeeded] + 172 (AppKit + 17024928) [0x1985ef7a0]
30 -[NSView updateConstraintsForSubtreeIfNeeded] + 96 (AppKit + 393904) [0x1976132b0]
30 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
30 __45-[NSView updateConstraintsForSubtreeIfNeeded]_block_invoke + 224 (AppKit + 394140) [0x19761339c]
30 __45-[NSView updateConstraintsForSubtreeIfNeeded]_block_invoke_2 + 52 (AppKit + 13476788) [0x19828d3b4]
30 -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] + 372 (AppKit + 13475020) [0x19828cccc]
30 -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] + 596 (AppKit + 13475244) [0x19828cdac]
30 ??? (AppKit + 3523316) [0x19790f2f4]
28 ??? (AppKit + 3521780) [0x19790ecf4]
28 ??? (AppKit + 3759660) [0x197948e2c]
28 ??? (AppKit + 3759620) [0x197948e04]
28 @objc NSHostingView.updateConstraints() + 28 (SwiftUI + 8903764) [0x1c7b6bc54]
28 NSHostingView.updateConstraints() + 132 (SwiftUI + 8903444) [0x1c7b6bb14]
28 NSHostingView.updateWindowContentSizeExtremaIfNecessary() + 1020 (SwiftUI + 8830836) [0x1c7b59f74]
28 ViewRendererHost.updateViewGraph<A>(body:) + 96 (SwiftUICore + 13965204) [0x2425eb794]
28 closure #1 in ViewRendererHost.updateViewGraph<A>(body:) + 108 (SwiftUICore + 13974264) [0x2425edaf8]
28 GraphHost.instantiateIfNeeded() + 0 (SwiftUICore + 9023352) [0x242134f78]
*28 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 type metadata accessor for ObservationTracking + 0 (libswiftObservation.dylib + 48416) [0x29228ed20]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 ??? (AppKit + 3521224) [0x19790eac8]
1 ??? (AppKit + 1763972) [0x197761a84]
1 swift::metadataimpl::FixedSizeBufferValueWitnesses<swift::metadataimpl::ValueWitnesses<swift::metadataimpl::OpaqueExistentialBox<0u>>, true, 32ul, 8ul, true>::getEnumTagSinglePayload(swift::OpaqueValue const, unsigned int, swift::TargetMetadata<swift::InProcess> const) + 0 (libswiftCore.dylib + 324468) [0x1a656b374]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
6 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 364 (AppKit + 465100) [0x1976248cc]
6 -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded] + 240 (AppKit + 17024280) [0x1985ef518]
6 -[NSWindow(NSConstraintBasedLayoutInternal) _layoutViewTree] + 120 (AppKit + 17023744) [0x1985ef300]
6 -[NSView layoutSubtreeIfNeeded] + 96 (AppKit + 273680) [0x1975f5d10]
6 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
6 -[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 100 (AppKit + 13480788) [0x19828e354]
6 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
6 __56-[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:]_block_invoke + 908 (AppKit + 13481708) [0x19828e6ec]
6 -[NSView _layoutSubtreeWithOldSize:] + 100 (AppKit + 13477992) [0x19828d868]
6 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
6 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 684 (AppKit + 13478688) [0x19828db20]
6 -[NSView _layoutSubtreeWithOldSize:] + 100 (AppKit + 13477992) [0x19828d868]
6 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
6 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 372 (AppKit + 13478376) [0x19828d9e8]
6 _NSViewLayout + 96 (AppKit + 274740) [0x1975f6134]
6 NSPerformVisuallyAtomicChange + 108 (AppKit + 268816) [0x1975f4a10]
6 ___NSViewLayout_block_invoke + 624 (AppKit + 13545336) [0x19829df78]
6 ??? (AppKit + 3513816) [0x19790cdd8]
6 ??? (AppKit + 3512256) [0x19790c7c0]
6 ??? (AppKit + 3759660) [0x197948e2c]
6 ??? (AppKit + 3759620) [0x197948e04]
6 @objc NSHostingView.layout() + 28 (SwiftUI + 8905808) [0x1c7b6c450]
6 NSHostingView.layout() + 504 (SwiftUI + 8904312) [0x1c7b6be78]
6 +[NSAnimationContext runAnimationGroup:] + 56 (AppKit + 14728128) [0x1983bebc0]
6 <deduplicated_symbol> + 44 (SwiftUI + 8880248) [0x1c7b66078]
6 <deduplicated_symbol> + 28 (SwiftUI + 9020040) [0x1c7b88288]
6 closure #1 in NSHostingView.layout() + 520 (SwiftUI + 8905016) [0x1c7b6c138]
6 ViewGraphRootValueUpdater.render(interval:updateDisplayList:targetTimestamp:) + 528 (SwiftUICore + 13959436) [0x2425ea10c]
3 closure #1 in ViewGraphRootValueUpdater.render(interval:updateDisplayList:targetTimestamp:) + 424 (SwiftUICore + 13966692) [0x2425ebd64]
3 GraphHost.flushTransactions() + 184 (SwiftUICore + 9025864) [0x242135948]
2 specialized GraphHost.runTransaction(_:do:id:) + 388 (SwiftUICore + 9145244) [0x242152b9c]
1 AG::Subgraph::update(unsigned int) + 960 (AttributeGraph + 119344) [0x1c8a52230]
1 AG::Graph::UpdateStack::update() + 500 (AttributeGraph + 54612) [0x1c8a42554]
1 partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32 (SwiftUICore + 3234220) [0x241baf9ac]
1 DynamicBody.updateValue() + 1184 (SwiftUICore + 6399840) [0x241eb4760]
1 closure #1 in DynamicBody.updateValue() + 204 (SwiftUICore + 6401000) [0x241eb4be8]
1 withUnsafeMutablePointer<A, B, C>(to:_:) + 160 (SwiftUICore + 9864060) [0x24220237c]
1 partial apply for closure #1 in closure #1 in DynamicBody.updateValue() + 32 (SwiftUICore + 6410272) [0x241eb7020]
1 closure #1 in closure #1 in DynamicBody.updateValue() + 304 (SwiftUICore + 6402544) [0x241eb51f0]
1 _DynamicPropertyBuffer.update(container:phase:) + 144 (SwiftUICore + 5653248) [0x241dfe300]
1 static BoxVTable.update(elt:property:phase:) + 140 (SwiftUICore + 5657780) [0x241dff4b4]
1 StatePropertyBox.update(property:phase:) + 412 (SwiftUICore + 12390528) [0x24246b080]
1 StoredLocationBase.updateValue.getter + 160 (SwiftUICore + 10954488) [0x24230c6f8]
1 closure #1 in StoredLocationBase.updateValue.getter + 256 (SwiftUICore + 10956376) [0x24230ce58]
1 <deduplicated_symbol> + 0 (libswiftCore.dylib + 4594488) [0x1a697db38]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 AG::Graph::UpdateStack::push(AG::data::ptr<AG::Node>, AG::Node&, bool, bool) + 64 (AttributeGraph + 53564) [0x1c8a4213c] (running)
1 specialized GraphHost.runTransaction(_:do:id:) + 200 (SwiftUICore + 9145056) [0x242152ae0]
1 specialized closure #1 in withTransaction<A>(_:_:) + 352 (SwiftUICore + 5681060) [0x241e04fa4]
1 StoredLocationBase.BeginUpdate.apply() + 36 (SwiftUICore + 10958204) [0x24230d57c]
1 StoredLocationBase.beginUpdate() + 428 (SwiftUICore + 10958676) [0x24230d754]
1 AG::Graph::propagate_dirty(AG::AttributeID) + 440 (AttributeGraph + 51220) [0x1c8a41814]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
2 closure #1 in ViewGraphRootValueUpdater.render(interval:updateDisplayList:targetTimestamp:) + 3524 (SwiftUICore + 13969792) [0x2425ec980]
1 NSHostingView.requestUpdate(after:) + 416 (SwiftUI + 8914112) [0x1c7b6e4c0]
1 swift_unknownObjectWeakInit + 88 (libswiftCore.dylib + 596020) [0x1a65ad834]
1 objc_initWeak + 436 (libobjc.A.dylib + 84252) [0x192cd891c]
1 weak_register_no_lock + 184 (libobjc.A.dylib + 60524) [0x192cd2c6c]
1 append_referrer(weak_entry_t, objc_object*) + 320 (libobjc.A.dylib + 61468) [0x192cd301c]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 NSHostingView.requestUpdate(after:) + 192 (SwiftUI + 8913888) [0x1c7b6e3e0]
1 SLSInputModifierKeyState + 216 (SkyLight + 480996) [0x1999706e4] (running)
1 closure #1 in ViewGraphRootValueUpdater.render(interval:updateDisplayList:targetTimestamp:) + 860 (SwiftUICore + 13967128) [0x2425ebf18]
1 AGGraphGetWeakValue + 372 (AttributeGraph + 191028) [0x1c8a63a34]
1 AG::Graph::value_ref(AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&) + 296 (AttributeGraph + 86716) [0x1c8a4a2bc]
1 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, unsigned int) + 352 (AttributeGraph + 56564) [0x1c8a42cf4]
1 AG::Graph::UpdateStack::update() + 500 (AttributeGraph + 54612) [0x1c8a42554]
1 specialized implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 72 (SwiftUICore + 7938916) [0x24202c364]
1 specialized RendererEffectDisplayList.value.getter + 492 (SwiftUICore + 7766200) [0x2420020b8]
1 AGGraphGetValue + 168 (AttributeGraph + 190088) [0x1c8a63688] (running)
1 _CFRunLoopRunSpecificWithOptions + 160 (CoreFoundation + 1150408) [0x193273dc8]
1 CFEqual + 1388 (CoreFoundation + 33300) [0x193163214]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 _DPSNextEvent + 868 (AppKit + 130912) [0x1975d2f60]
1 SendEventToEventTarget + 40 (HIToolbox + 738604) [0x19fce852c]
1 SendEventToEventTargetInternal(OpaqueEventRef, OpaqueEventTargetRef, HandlerCallRec*) + 316 (HIToolbox + 811852) [0x19fcfa34c]
1 DispatchEventToHandlers(EventTargetRec, OpaqueEventRef, HandlerCallRec*) + 2336 (HIToolbox + 744012) [0x19fce9a4c]
1 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef, OpaqueEventRef, void*) + 492 (HIToolbox + 808544) [0x19fcf9660]
1 SendEventToEventTargetWithOptions + 44 (HIToolbox + 2394820) [0x19fe7cac4]
1 SendEventToEventTargetInternal(OpaqueEventRef, OpaqueEventTargetRef, HandlerCallRec*) + 316 (HIToolbox + 811852) [0x19fcfa34c]
1 DispatchEventToHandlers(EventTargetRec, OpaqueEventRef, HandlerCallRec*) + 1268 (HIToolbox + 742944) [0x19fce9620]
1 GlobalObserverHandler + 92 (AppKit + 7602548) [0x197cf3174]
1 thunk for @escaping @callee_guaranteed (@guaranteed NSEvent) -> () + 48 (swift_addon.node + 378944) [0x1674bc840]
1 closure #2 in MouseMoveTracker.MouseTrackingView.init() + 68 (swift_addon.node + 379916) [0x1674bcc0c]
1 MouseMoveTracker.MouseTrackingView.handleMouseEvent(_:) + 196 (swift_addon.node + 380308) [0x1674bcd94]
1 closure #4 in QuickEntryBar.body.getter + 116 (swift_addon.node + 499836) [0x1674da07c]
1 State.wrappedValue.setter + 32 (SwiftUICore + 12388348) [0x24246a7fc]
1 <deduplicated_symbol> + 68 (SwiftUICore + 9640620) [0x2421cbaac]
1 StoredLocationBase.set(_:transaction:) + 380 (SwiftUICore + 10956988) [0x24230d0bc]
1 closure #2 in StoredLocationBase.set(_:transaction:) + 348 (SwiftUICore + 10957940) [0x24230d474] (running)

Thread 0xd1159 1001 samples (1-1001) priority 13-31 (base 31) cpu time 4.791s (17.6G cycles, 3.1G instructions, 5.73c/i)
588 runtime.asmcgocall.abi0 + 124 (swift_addon.node + 2430044) [0x1676b145c]
581 <patched truncated backtrace>
581 read + 8 (libsystem_kernel.dylib + 6408) [0x1930d9908]
*495 ??? (kernel.release.t6041 + 15928) [0xfffffe0008883e38]
*491 ??? (kernel.release.t6041 + 1863376) [0xfffffe0008a46ed0]
*491 ??? (kernel.release.t6041 + 7702932) [0xfffffe0008fd8994]
*491 ??? (kernel.release.t6041 + 6445392) [0xfffffe0008ea5950]
*243 ??? (kernel.release.t6041 + 6444972) [0xfffffe0008ea57ac]
*221 ??? (kernel.release.t6041 + 5938884) [0xfffffe0008e29ec4]
*220 ??? (kernel.release.t6041 + 435352) [0xfffffe00088ea498] (running)
*1 ??? (kernel.release.t6041 + 436212) [0xfffffe00088ea7f4] (running)
*22 ??? (kernel.release.t6041 + 5938844) [0xfffffe0008e29e9c]
*21 ??? (kernel.release.t6041 + 440692) [0xfffffe00088eb974]
*21 ??? (kernel.release.t6041 + 1900856) [0xfffffe0008a50138]
*21 ??? (kernel.release.t6041 + 295592) [0xfffffe00088c82a8]
*21 ??? (kernel.release.t6041 + 571116) [0xfffffe000890b6ec]
*21 ??? (kernel.release.t6041 + 576068) [0xfffffe000890ca44] (runnable)
*1 ??? (kernel.release.t6041 + 5938844) [0xfffffe0008e29e9c] (running)
*212 ??? (kernel.release.t6041 + 6445056) [0xfffffe0008ea5800]
*211 ??? (kernel.release.t6041 + 435352) [0xfffffe00088ea498] (running)
*1 ??? (kernel.release.t6041 + 436212) [0xfffffe00088ea7f4] (running)
*35 ??? (kernel.release.t6041 + 6445072) [0xfffffe0008ea5810]
*35 ??? (kernel.release.t6041 + 440692) [0xfffffe00088eb974]
*35 ??? (kernel.release.t6041 + 1900856) [0xfffffe0008a50138]
*35 ??? (kernel.release.t6041 + 295592) [0xfffffe00088c82a8]
*35 ??? (kernel.release.t6041 + 571116) [0xfffffe000890b6ec]
*35 ??? (kernel.release.t6041 + 576068) [0xfffffe000890ca44] (runnable)
*1 ??? (kernel.release.t6041 + 6444884) [0xfffffe0008ea5754]
*1 soreceive + 316 (kernel.release.t6041 + 6653156) [0xfffffe0008ed84e4] (running)
*2 ??? (kernel.release.t6041 + 1863116) [0xfffffe0008a46dcc]
*1 ??? (kernel.release.t6041 + 1863116) [0xfffffe0008a46dcc] (running)
*1 ??? (kernel.release.t6041 + 16224) [0xfffffe0008883f60]
*1 ??? (kernel.release.t6041 + 16764) [0xfffffe000888417c]
*1 ??? (kernel.release.t6041 + 295592) [0xfffffe00088c82a8]
*1 ??? (kernel.release.t6041 + 571116) [0xfffffe000890b6ec]
*1 ??? (kernel.release.t6041 + 576068) [0xfffffe000890ca44] (runnable)
*1 ??? (kernel.release.t6041 + 1863360) [0xfffffe0008a46ec0]
*1 ??? (kernel.release.t6041 + 1863360) [0xfffffe0008a46ec0] (running)
*1 ??? (kernel.release.t6041 + 1863116) [0xfffffe0008a46dcc] (running)
*43 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
*41 ??? (kernel.release.t6041 + 296404) [0xfffffe00088c85d4] (runnable)
*2 ??? (kernel.release.t6041 + 18588) [0xfffffe000888489c]
*2 ??? (kernel.release.t6041 + 18588) [0xfffffe000888489c] (running)
7 <patched truncated backtrace>
7 read + 8 (libsystem_kernel.dylib + 6408) [0x1930d9908] (running)
413 <truncated backtrace>
399 runtime.pthread_cond_wait_trampoline.abi0 + 24 (swift_addon.node + 2435784) [0x1676b2ac8]
399 __psynch_cvwait + 8 (libsystem_kernel.dylib + 17656) [0x1930dc4f8]
*259 psynch_cvcontinue + 0 (pthread + 18500) [0xfffffe000c104464]
*70 psynch_cvcontinue + 0 (pthread + 18500) [0xfffffe000c104464] (suspended)
*62 psynch_cvcontinue + 0 (pthread + 18500) [0xfffffe000c104464] (runnable)
*6 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
*1 ??? (kernel.release.t6041 + 18604) [0xfffffe00088848ac] (suspended, running)
*1 ??? (kernel.release.t6041 + 18588) [0xfffffe000888489c]
*1 ??? (kernel.release.t6041 + 18588) [0xfffffe000888489c] (running)
4 runtime.walltime_trampoline.abi0 + 24 (swift_addon.node + 2434392) [0x1676b2558]
4 clock_gettime + 256 (libsystem_c.dylib + 61132) [0x192fb5ecc]
4 gettimeofday + 56 (libsystem_c.dylib + 28000) [0x192fadd60]
3 mach_absolute_time + 108 (libsystem_kernel.dylib + 4348) [0x1930d90fc] (running)
1 mach_absolute_time + 108 (libsystem_kernel.dylib + 4348) [0x1930d90fc]
*1 ??? (kernel.release.t6041 + 296404) [0xfffffe00088c85d4] (runnable)
2 mach_absolute_time + 108 (libsystem_kernel.dylib + 4348) [0x1930d90fc] (running)
1 _sigtramp + 0 (libsystem_platform.dylib + 14124) [0x19312572c]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 net.(*conn).Read + 0 (swift_addon.node + 2888576) [0x167721380] (running)
1 internal/poll.(*FD).Read + 424 (swift_addon.node + 2718056) [0x1676f7968]
*1 ??? (kernel.release.t6041 + 296404) [0xfffffe00088c85d4] (runnable)
1 runtime.asmcgocall.abi0 + 16 (swift_addon.node + 2429936) [0x1676b13f0]
*1 ??? (kernel.release.t6041 + 296404) [0xfffffe00088c85d4] (runnable)
1 time.runtimeNow + 88 (swift_addon.node + 2414392) [0x1676ad738]
*1 ??? (kernel.release.t6041 + 296404) [0xfffffe00088c85d4] (runnable)
1 runtime.(*timer).modify + 672 (swift_addon.node + 2322464) [0x167697020] (running)
1 runtime.nanotime1.abi0 + 40 (swift_addon.node + 2318360) [0x167696018]
*1 ??? (kernel.release.t6041 + 759592) [0xfffffe0008939728] (suspended)
1 runtime.(*pollDesc).publishInfo + 76 (swift_addon.node + 2164908) [0x1676708ac] (running)


</details>

## Possibly related issues

- #18532 — 100% CPU, infinite loop
- #4580 — CPU freeze during multi-agent JSON serialization
- #11615 — Code Helper Renderer 99.8% CPU

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗