-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Runaway ripgrep (rg) processes consume all available CPU #13712
Comments
Hi @danepowell Thank you for the report. I tried to reproduce the issue on Ubuntu 22.04.4 with Theia 1.48.0 (electron app started from sources), latest Theia master and version 1.49.101 started from the AppImage, but wasn't successful. I can see the rg process being spawned, but for me it always terminates shortly after being started. Steps I took to test:
Are you doing something different when the problem occurs? Thanks! |
@AlexandraBuzila with #13498 in mind, this might only happen in case a bunch of text is printed into the terminal. I'm not sure though, I'm only speculating based on the changes I've seen. |
Thanks @msujew, you're absolutely right. In such a large workspace, the terminal becomes quite slow. I don't see any stuck rg processes, but there can be quite a number of them depending on the terminal contents. I will have a look. |
This happened to me, too. #13576 No obvious cause of the behavior. |
I'd love to test this; if I'm building my app based on the Theia blueprint, is there a way to test specific PRs? I'm not sure how to build anything other than a semver release in package.json. |
@danepowell You can checkout the branch associated to the PR and build and run Theia. You can see the instructions to build & run here. In order to consume it in a downstream app, you could publish it to a local npm repository like verdaccio, but that is likely a bit of effort. |
Bug Description:
Soon after starting Theia, several
rg
processes start running. Within just a few minutes and no further interaction, these balloon to dozens or hundreds ofrg
processes that eventually consume all available resources and make Theia unresponsive.The processes in question are all in a sleeping state, indicating they are blocked on i/o. Running strace on a stuck
rg
process produces nonsensical output (it indicates it's writing 140 terabytes to a negative file descriptor):This only started to occur in Theia 1.48.0 and rolling back to 1.47.1 fixes it. I suspect this commit is the root cause just based on the description: #13498
It's possible this is related to the number of files in the workspace. We've mostly seen it in workspaces with ~100k files.
Steps to Reproduce:
Additional Information
The text was updated successfully, but these errors were encountered: