-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
tmp directory filled by yarn (and not cleaned) #6685
Comments
I am getting the same results on I noticed each tmp entry has a shell script relating to |
Yarn creates a temporary directory each time a script is executed, in order to setup "fake" Node and "fake" Yarn binaries that point towards the exact same Yarn/Node than those currently being executed (to prevent the case where the global Node is different from the one used to run Yarn itself). The problem is that they never get removed at the moment: |
Yep, also see this. |
My
Was this a regression? I don't remember my CI agents being filled by this in the past. |
The same problem with |
Still happening for me with |
In the meantime.... Is it safe to manually remove all of them? Or the removal could break anything? |
I wrote crontab that does "mkdir -p /tmp/yarn & mv /tmp/yarn-* /tmp/yarn/"
(typing by memory, don't have my laptop to check). In Linux if you rename
directory it still can be used by program that already has file descriptor,
same goes for deletion I think. Never had issues with renaming via cron,
never had issues removing them manually, I would assume it's probably safe
to delete it from cron as well. Worst case scenario I would assume your
currently running "yarn run something" will crash.
…On Mon, Jun 17, 2019, 12:33 Xavi Montero ***@***.***> wrote:
In the meantime.... Is it sure to manually remove all of them? Or removal
could break anything?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6685?email_source=notifications&email_token=AAABW4UKLTC7IRND2RCFOTDP27RIZA5CNFSM4GEERUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4G3BQ#issuecomment-502820230>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABW4SVFYLVBE4F3H7ZRQ3P27RIZANCNFSM4GEERUTQ>
.
|
@xmontero We removed files older than 1 day on our dev server. |
There is no risk removing those files when Yarn isn't running. Even when running, it should be relatively safe as they're usually only used when the program boots. Fwiw this problem will be fixed from the v2 onward; the artifacts will be properly discarded right after the commands return. |
Running build in Docker image is also a good workaround. It protects you
from such leaks to CI workers system, by design.
…On Tue, Jun 18, 2019, 11:37 Maël Nison ***@***.***> wrote:
There is no risk removing those files when Yarn isn't running. Even when
running, it should be relatively safe as they're usually only used when the
program boots.
Fwiw this problem will be fixed from the v2 onward; the artifacts will be
properly discarded right after the commands return.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6685?email_source=notifications&email_token=AADISDU4FFFFWZZI37RRY4TP3CUGXA5CNFSM4GEERUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX5ZV4I#issuecomment-503028465>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADISDVU55SPQE54EYNMLVDP3CUGXANCNFSM4GEERUTQ>
.
|
Still getting this at the current version |
It's still not fixed at this time, even on latest |
Is this issue persistent with yarn |
@djsiddz Did v2 fix it for you? |
De issue still exists in the latest version
|
I can confirm this still happens on the very same version ( |
Any update on this? we still have several problems with hard disk and "no left space" on Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-38-generic x86_64) with |
still not fixed? :/ my server is filled with tmp yarn files |
Yarn was so good, until this. Funny thing is this issue has been reported since like more than 2 years ago, and no collaborator care about fixing this, even there is an existing PR #7207 to review. |
@arcanis wrote:
Just for clarification (even if it will hurt), I guess this means version 1.x will not receive a fix, but 2.x has the issue fixed? In this case the issue could IMO be closed, but it would be nice to have clarity on that. Comparing to the description of this repository itself:
|
Indeed. Note that the migration should be fairly painless if you follow the migration guide, since it explains how to stay on the typical |
This comment has been minimized.
This comment has been minimized.
Is there a "manual" script we could run that would clean up after yarn finished? |
On Unix-based systems (Linux & co): rm /tmp/yarn--* |
on Windows OS this can be used:
|
version 1.22.19 still exsits. the problem reported in 2018, and still not fixed in 2023 :) |
This comment was marked as abuse.
This comment was marked as abuse.
Instead of marking comment as "abusive" you can fix this up? |
@jcruz97 No, because it's already fixed in modern releases - upgrade and you won't have this problem anymore. As for your post, it was quite unprofessional and wasn't really worth visibility. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Each "yarn run" will create a directory under "/tmp" directory which looks like
If the current behavior is a bug, please provide the steps to reproduce.
Let's say we have a script in package.json as follow:
If we play this dummy script and we check number of directories before and after in /tmp:
Running the dummy script will increment the result each time.
FYI:
What is the expected behavior?
Tmp directory should not be filled indefinitely: it should reuse the already created temporary files (if tmp is really needed) or it should have some kind of cleaning mechanism to avoid overwhelmingly the tmp directory.
Please mention your node.js, yarn and operating system version.
node: v8.9.4
nvm: 0.33.2
yarn: 1.12.3
os: Debian 3.16.51-3
The text was updated successfully, but these errors were encountered: