-
Notifications
You must be signed in to change notification settings - Fork 230
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
flutter pub upgrade randomly results in: Rename failed, path = '~/.pub-cache/_temp/dirBVDEOH' (OS Error: File exists, errno = 17) #4285
Comments
I wonder what goes on here. Is pub stepping on its own feet? It would be wonderful to see the stack trace. @jonasfj FYI. |
Are you updating all projects concurrently? @sigurdm are we ever deleting the |
Reading the error:
Maybe, moving the temp folder into the right location caused an error, because a different process already created the target. Maybe we don't handle that gracefully. |
No, I wish I could but they are all done sequentially. |
Oh - that is curious. Then the proposed fix in #4286 might not be helping much. A single pub process is doing all operations on a single thread, and should not be able to end up in a situation where it tries to rename the directory on top of an existing. How reliably are you able to reproduce this? Would you mind trying to reproduce where you first do And then replace |
Unfortunately, it's been pretty sporadic, but I can certainly change the script. Does the ... global activate ... command need to be done just once? |
yes. |
One additional bit of info, that I don't think should matter is my ~/.pub-cache is a symlink . (to an nvme drive for performance) |
Yeah - not sure. But that might have to do with the different error message we see (17 instead of 39) perhaps it is file-system dependent. Still if there's only one pub process running at the time, there should never be a collision. |
Reopening I think handling EEXIST error 17 is correct But there might still be something else wrong here... |
invertase/melos#614 Interestingly it only fails on self hosted github runner, but the same image runs well locally. Is there any additional details I could provide to make the investigation easier? |
If you could run with Also if you could try out the patch doing: |
@lukas-tide also, are you running multiple |
Yes if we are setting
|
Wait, what is going one? Are we accidentally logging the contents of all the files we're writing 🙈 500mb seems pretty wild 🤣 If there is nothing secret in there, feel free to share a highly compressed tarball. I'd guess that I'd be curious to how it managed to get that large. Though it's probably not the end of the world, I mean 500mb is easy to grep :D |
We are logging pubspec.lock and .dart_tool/paackage_config.json We are not logging the extracted files from package .tar.gz archives: Line 289 in d165b5f
500mb sounds crazy, but yes - please let us see them if possible. There might be some logging bugs to discover here. |
I am afraid I will not be able to share full logs as they might contain some private data and reviewing 500mb is not an option. I have tried extracting subset which might be helpful
|
I am getting same error on self hosted runner. doesnt happen on github runners. also, for me it happens when doing also, the error is consistent when running on self hosted runners. I thought it was because some of the bricks had same name in pubspec.yaml but looks like that is not the case |
Flutter devs kicked this to y'all. (For reference... flutter/flutter#148650)
Environment
Dart version (run
dart --version
):OS kind and version (e.g. "Windows 10, version 1809" or "macOS 12.4"):
Are you using the Chinese community mirror or a corporate firewall?
Dart SDK version: 3.4.0 (stable) (Mon May 6 07:59:58 2024 -0700) on "linux_x64"
Linux Fedora 39/40
no community mirror/corp firewall
Problem
But I have script that goes through all my flutter projects and does a flutter pub upgrade. After installing flutter 3.22 it randomly fails every so often with
Rename failed, path = '/home/csh/.pub-cache/_temp/dirBVDEOH' (OS Error: File exists, errno = 17)
The random filename is different each time of course. It may happen more frequently if there are actually a lot of packages updated. If I can notice any clear patterns I will update.
I have only seen this on Linux, but I do most of my development on Linux.
Expected behavior
no update failures
Actual behavior
one random project randomly terminates the upgrade sequence.
--trace output
I don't think there is much relevant output besides the error but the next time it happens I can hopefully remember capture the output.
The text was updated successfully, but these errors were encountered: