Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% cpu freezing does not respond to ctrl c on latest release #3196

Open
trashhalo opened this issue Feb 9, 2025 · 5 comments
Open

100% cpu freezing does not respond to ctrl c on latest release #3196

trashhalo opened this issue Feb 9, 2025 · 5 comments

Comments

@trashhalo
Copy link

trashhalo commented Feb 9, 2025

Issue

Process hangs at 100% CPU while rendering markdown/syntax highlighting. The process becomes unresponsive and requires force termination. This appears to be due to a pathological case in Pygments' lexer pattern matching.

Stack trace indicates issue is triggered during syntax highlighting in Rich/Pygments pipeline:

  • Entry point: aider markdown rendering
  • Through Rich markdown -> syntax highlighting
  • Finally stuck in Pygments lexer processing

Steps to reproduce

  1. Running standard aider chat interface
  2. Process hangs during markdown/code rendering
  3. CPU usage spikes to 100%
  4. Process becomes unresponsive
  5. Requires force termination via kill -6 (SIGABRT)

Stack trace
Most relevant section showing where process got stuck:

pythonCopyFile "/Users/stephensolka/.local/pipx/venvs/aider-chat/lib/python3.12/site-packages/pygments/lexer.py", line 712 in get_tokens_unprocessed
File "/Users/stephensolka/.local/pipx/venvs/aider-chat/lib/python3.12/site-packages/pygments/lexers/scripting.py", line 169 in get_tokens_unprocessed
File "/Users/stephensolka/.local/pipx/venvs/aider-chat/lib/python3.12/site-packages/pygments/lexer.py", line 270 in streamer

Full stack trace attached below for reference.
aider_abort.txt

Version and model info

Python Version: 3.12.9
OS: macOS
Installed via: pipx
❯ aider --version
aider 0.74.1

@trashhalo
Copy link
Author

Confirmed that running aider --no-pretty it no longer happens. So much be tied to syntax highlighting.

@trashhalo
Copy link
Author

My best guess is it's something related to the litellm upgrade from two days ago. There were code changes that landed in the stream processor which shows up in the stack.

@trashhalo
Copy link
Author

I dont know if this makes sense but I think its tied to lua syntax parsing? its happening on a lua repo, but not on an elixir repo?

@UnrealPk
Copy link

Same issue is happening to me.

@MrOrz
Copy link

MrOrz commented Feb 15, 2025

I also encounter this "Process hangs at 100% CPU" issue. In my case I have these symptoms:

  • CPU 100%
  • ctrl-c does not work, aider is not responding.

However in my case:

  • --no-pretty doesn't help
  • Just saying "hi" also triggers this issue

Using verbose mode (aider --verbose) it's stuck at a certain file in my repository. So in my case it's probably related to #1587 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants