-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Unexpected test failure on CI for scrape_examples_basic #10120
Comments
This continues to happen with a low frequency. @willcrichton is this something you could take a look at? I've been doing some testing on CI, and it seems to happen rarely (maybe once out of a thousand loops). The behavior is that everything is on disk except for the
I took a look at the code that writes the source file to disk, and found this which looks extremely suspicious: https://github.com/rust-lang/rust/blob/f41927f30943e4d57af62cfcedc9f07b819013e7/src/librustdoc/docfs.rs#L62-L68 That is spawning a thread to write some content to disk. However, I don't see anything that waits for that thread to finish. If rustdoc finishes its work quickly, and that thread got delayed for whatever reason, then I think it will just exit without writing the file. |
@ehuss that code does indeed look suspicious, thanks for finding it. cc @rbtcollins @GuillaumeGomez: is there a reason that the DocFS writes aren't eventually synchronized? Seems like Rustdoc might need to wait for all spawned Rayon tasks to complete. |
It's because of perf issues on windows. If we do sync writes, the performance drop can drastically. |
Sorry, I understand why the writes are individually not synchronized. But shouldn't Rustdoc make sure that all the writes are completed before exiting the process? |
Sorry missed that part. Yes it definitely should. |
Ok, I just filed an issue with a proposed solution at rust-lang/rust#109060. |
Thats merged, can this be closed? Sorry for not responding earlier, but yes, clearly exiting before writes have been done will break :P. The rustup code this was inspired by does indeed wait for all the aggregate of IOs to complete. |
I've been doing some stress testing on CI, and it seems to be resolved. Thanks @GuillaumeGomez for the quick fix! |
The
doc::scrape_examples_basic
test unexpectedly failed in CI for PR #10116:I cannot reproduce this locally using macOS or nightly-x86_64-pc-windows-gnu.
Perhaps the CI machine was having a bad day? Opening this to track to see if it ever happens again.
nightly-x86_64-pc-windows-gnu
rustc 1.58.0-nightly (b426445c6 2021-11-24)
The text was updated successfully, but these errors were encountered: