-
Notifications
You must be signed in to change notification settings - Fork 13k
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
PATH variable grows each time compiler is run #17327
Comments
Doesn't reproduce locally so must be related to the length of the temp dir on the bots specifically. |
The error seems related to this one on so. At some point in execution CreateProcess just starts failing with error 206 and then keeps failing. It doesn't have anything to do with the length of the tmp path. |
Related Eclipse bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=327193 |
I suspect that you may want to fix this block of code to only append something once. Perhaps that's where the huge environment is coming from? |
With either |
In rustdoc all instances of rustc happen in the same process, so that environment variable is just continuously growing. |
@alexcrichton That is an interesting block of code! With rustdoc running in-process rustc's in parallel this is very racy (though even without parallel tests this is failing). |
It does seem like a possibility that the environment is accumulating w/o bound |
@alexcrichton That block of code does try to reset the environment, which seems like it should work sequentially. |
It is a bit racy, yes, but I'd be more worried about every test adding the same paths to |
There's more racy environment code in phase 6. |
@alexcrichton This code does try to restore the original |
I'll instrument the compiler to check out the environment at every step. |
Oh, is rustdoc actually running multiple compilations in parallel in the same process? Yes, in that case mutating a global variable is not good. |
The PATH variable is definitely going off the rails here even with sequential testing. |
Hm, wait. The revision I'm testing on the bots contains neither of those setenv calls.... /me confused |
It would definitely help if I was using a build of Rust that wasn't from August. |
Still investigating how master treats PATH across multiple compilations, but I can't reproduce the original error. This may be nothing (though the race is still an issue). |
Indeed I think this is not an issue. |
Trying to turn on windows tests (#16457) I'm now hitting errors like
Windows hates long paths.
The text was updated successfully, but these errors were encountered: