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

Attempt at adding debugging to delete-by-compiler to test https://git… #5483

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MasterDuke17
Copy link
Contributor

@MasterDuke17
Copy link
Contributor Author

@ugexe so it looks like the outermost rmdir is failing? Which must mean the inner one is "succeeding", but something is left behind.

@MasterDuke17
Copy link
Contributor Author

Ah ha, the ‘6B’ subdirectory is failing to be deleted, but then can’t be listed. Maybe it is just the usual Windows terribleness and we just need to add a delay and/or retry,

@ugexe
Copy link
Member

ugexe commented Dec 2, 2023

Hmm, I think retrying is only needed for renaming. What I suspect is that since it is iterating over .dir that the directory handle for the e.g. ‘6B’ subdirectory is still open when we try to rmdir it. Maybe we should try to make the calls to .dir not lazy so that (presumably) the directory handle gets closed by the time we try to rmdir it.

edit: actually looking at the loops again I don't know why the handle would be left open since we are indeed done iterating over it when we try to delete it. Perhaps that suggests something in the libuv changes is leaving a handle open though.

@MasterDuke17
Copy link
Contributor Author

MasterDuke17 commented Dec 2, 2023 via email

@ugexe
Copy link
Member

ugexe commented Dec 2, 2023

Actually I overlooked the can't be listed part. I'm not sure what that could mean actually...

@ugexe
Copy link
Member

ugexe commented Dec 2, 2023

It looks like the sleeps work. Why would this start happening when using libuv though... 🤔

@ugexe
Copy link
Member

ugexe commented Dec 2, 2023

https://nodejs.org/api/fs.html#fs_fs_rmdirsync_path_options shows they have a maxRetries option, although it defaults to 0 so I'm not sure if that is to avoid a similar issue or not

@ugexe
Copy link
Member

ugexe commented Dec 2, 2023

@MasterDuke17
Copy link
Contributor Author

MasterDuke17 commented Dec 2, 2023 via email

@ugexe
Copy link
Member

ugexe commented Dec 2, 2023

Hard to say. One issue with putting it in Rakudo is we don't have a good way of determining if the error was e.g.ENOENT or ENOTDIR to determine which errors we should actually retry. I also wonder what the JVM does... if it also does its own IO retry stuff automatically that also probably suggests it should occur in MoarVM. However, if we ever wanted to provide max-retries and/or retry-delay options to all users (similar to what nodejs does) then it feels like we'd want it in Rakudo. I suspect the easiest way to get the most immediate benefit would be implementing the retry in MoarVM only on Windows.

@MasterDuke17
Copy link
Contributor Author

MasterDuke17 commented Dec 2, 2023 via email

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

Successfully merging this pull request may close these issues.

None yet

2 participants