-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Turbo daemon uses 100% CPU even when no tasks are running #8122
Comments
Hi @AdiRishi, thanks for the issue. Could you share the output of |
Logs seem pretty empty 🙃 turbo-logs.mp4 |
Hmm very interesting. How large of a repository are you running inside of? And do you see any logs after a significant amount of time, say 10 minutes? |
I'd say it's a mid-size repository. Around 21 sub-projects in total, it's a mix of around 6 webapps, 7 cloudflare workers and then more utility libaries / configs etc. Nothing crazy. I'll run some further debugging and get the information you want. I'll also try to continue to re-clone and see if I can reporduce the issues on other systems. I'll get back to you on this. |
Gotcha. Any chance you could run the daemon directly by stopping it ( |
Alright, I have some very interesting discoveries to go through. First off I want to start with the fact that when I re-clone this repository into a different location, and run the daemon from it, this behavior does not occur. Next I tried to run I then ran I've captured both logfiles using a command like this on mac Root Cause of BugLooking through the bad logs I realised there were mentions of a I confirmed this by removing the unstaged changes and deleting the Still, a very very odd manifestation, definitely does indicate a subtle bug in turbo haha. |
Thanks for the very thorough explanation! This should be a pretty easy fix. We currently filter out change events for the root |
Related #3455 |
Disabled the daemon to avoid the following issue vercel/turborepo#8122 I set the log order to grouped, the new TUI is not really useful with our 200+ packages. Release notes: https://turbo.build/blog/turbo-2-0 Change-Id: Ic8eabaf9dbdabfd8e3e278a1d298aa18355a4aca
We've just had to disable the daemon in our repo as it was severely harming the performance of |
I think this might be caused by this other bug: |
Today I have experienced it again after a long time without issues...needed to kill the process |
I may also have this issue -- but less so a CPU spike -- but a process spike. I get bash: fork: Resource temporarily unavailable everywhere on my machine, as (on MacOS, at least -- on linux, I've never run in to this), I've hit the process limit (greater than 5300 processes) -- if I force kill all turbo instances in the activity monitor, my system goes down to around 500 processes (I have a lot of browser tabs open) |
Just experienced this again today... was wondering why my laptop's fans suddenly spun up. |
Seems to be caused by vercel/turborepo#8122 Signed-off-by: Matt Strapp <[email protected]>
To me it happens when I install a package while running turbo |
@NullVoxPopuli Is what you're describing above the same as #9455? |
ye |
For visibility: Some of what's being reported on this issue has overlap with #9455. We've fixed 9455 as of 2.3.4-canary.2, so the folks indicating that they have too many processes being left open are likely to see improvement there. |
Verify canary release
Link to code that reproduces this issue
N.A
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
1.13.4-canary.3
Describe the Bug
I recently noticed that after running a turborepo command in my monorepo, the CPU would stay at 100% even after the command had finished. I saw that the
turbo
process was still alive and kicking.After a bit of investigation, I realised that I could trigger this behavior by running the turbo daemon. I've included a video of the behavior I see. NOTE I did install the latest canary version of turbo and test with that, same behavior.
I tried to reproduce this on a new repository made with
npx create-turbo@latest -e with-shell-commands
however that DID NOT reproduce the issue. Runningpnpm turbo daemon start
in that repository did not cause the CPU to spike with a long lived turbo process.Given that I was't able to reproduce this in a new repository, I tried thought to review if I was doing something odd in my current repository, the only things I can think off are
turbo gen
command at the top level of the repositoryTURBO_TEAM
,TURBO_API
,TURBO_TOKEN
andTURBO_REMOTE_CACHE_SIGNATURE_KEY
variables present in my.env
fileTo Reproduce
turbo-daemon.mp4
Additional context
The next thing I was going to try was to delete my local copy of the repository and try to re-clone and set it up again to see if the issue persists. However I figured it may be better to make this issue first in case there are specific debugging steps that may reveal the source of the issue.
The text was updated successfully, but these errors were encountered: