Skip to content

[Bug] High CPU usage and input lag from futex contention with sched_yield spin-waiting #17460

Closed as duplicate

Description

@blockems

Bug Description
futex contention + sched_yield spin-waiting causing 80%+ CPU and multi-second input lag

time % seconds usecs/call calls errors syscall
67.17 8.648213 1292 6691 593 futex
11.06 1.423371 118614 12 4 restart_syscall
9.77 1.257509 19960 63 epoll_pwait2
7.80 1.004175 85 11791 sched_yield
3.74 0.481445 59 8105 madvise
0.28 0.036002 10 3499 pread64
0.05 0.007019 38 184 statx
0.04 0.005431 27 196 184 access
0.04 0.005192 13 383 clock_gettime
0.02 0.002756 30 89 write
0.01 0.001065 28 38 recvfrom
0.00 0.000453 18 24 timerfd_settime
0.00 0.000342 342 1 gettid
0.00 0.000312 62 5 rt_sigprocmask
0.00 0.000305 12 25 24 epoll_ctl
0.00 0.000244 244 1 clone3
0.00 0.000215 23 9 close
0.00 0.000163 163 1 prctl
0.00 0.000140 17 8 openat
0.00 0.000111 111 1 set_robust_list
0.00 0.000109 109 1 sched_getaffinity
0.00 0.000088 1 55 read
0.00 0.000059 59 1 sched_setscheduler
0.00 0.000029 29 1 rseq
0.00 0.000000 0 1 sendto
100.00 12.874748 412 31185 805 total

Environment Info

  • Platform: linux
  • Terminal: windows-terminal
  • Version: 2.1.4
  • Feedback ID: a8e5e4a4-93a2-409b-aa8c-2f0825ce6d04

Errors

[{"error":"Error: String not found in file. Failed to apply edit.\n    at jyH (/$bunfs/root/claude:2039:731)\n    at YC$ (/$bunfs/root/claude:2039:107)\n    at s9D (/$bunfs/root/claude:2092:123)\n    at HdI (/$bunfs/root/claude:1798:2286)\n    at E5 (/$bunfs/root/claude:680:20691)\n    at fG (/$bunfs/root/claude:680:39063)\n    at _R (/$bunfs/root/claude:680:49671)\n    at W5 (/$bunfs/root/claude:680:85807)\n    at ph (/$bunfs/root/claude:680:84787)\n    at Fq (/$bunfs/root/claude:680:84612)","timestamp":"2026-01-11T08:51:02.632Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at jyH (/$bunfs/root/claude:2039:731)\n    at YC$ (/$bunfs/root/claude:2039:107)\n    at s9D (/$bunfs/root/claude:2092:123)\n    at HdI (/$bunfs/root/claude:1798:2286)\n    at E5 (/$bunfs/root/claude:680:20691)\n    at fG (/$bunfs/root/claude:680:39063)\n    at _R (/$bunfs/root/claude:680:49671)\n    at W5 (/$bunfs/root/claude:680:85807)\n    at ph (/$bunfs/root/claude:680:84787)\n    at Fq (/$bunfs/root/claude:680:84612)","timestamp":"2026-01-11T08:51:03.896Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at jyH (/$bunfs/root/claude:2039:731)\n    at YC$ (/$bunfs/root/claude:2039:107)\n    at s9D (/$bunfs/root/claude:2092:123)\n    at HdI (/$bunfs/root/claude:1798:2286)\n    at E5 (/$bunfs/root/claude:680:20691)\n    at fG (/$bunfs/root/claude:680:39063)\n    at _R (/$bunfs/root/claude:680:49671)\n    at W5 (/$bunfs/root/claude:680:85807)\n    at ph (/$bunfs/root/claude:680:84787)\n    at Fq (/$bunfs/root/claude:680:84612)","timestamp":"2026-01-11T08:51:13.437Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at jyH (/$bunfs/root/claude:2039:731)\n    at YC$ (/$bunfs/root/claude:2039:107)\n    at s9D (/$bunfs/root/claude:2092:123)\n    at HdI (/$bunfs/root/claude:1798:2286)\n    at E5 (

Note: Error logs were truncated.

Activity

  1. github-actions commented on Jan 11, 2026

    @github-actions

    Found 2 possible duplicate issues:

    1. High CPU usage (27-33%) when idle - busy-wait loop in sched_yield/futex #17142
    2. [BUG] Critical performance regression on WSL2: Slash commands trigger infinite futex spinlock causing 110% CPU usage (v2.0.76 & v2.0.67) #15689

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. added
    duplicateThis issue or pull request already exists
    and removed
    bugSomething isn't working
    has reproHas detailed reproduction steps
    platform:linuxIssue specifically occurs on Linux
    on Jan 15, 2026
  3. github-actions commented on Jan 15, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #17142.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  4. github-actions commented on Jan 23, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  5. locked as resolved and limited conversation to collaborators on Jan 23, 2026
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

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions