-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Nondeterministic compiletest failure on long compiler output #53332
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
Comments
cc @Zoxc maybe related to parallel rustc things? |
It is probably disabled here. A lot of tests would fail otherwise. |
Found the problem: rust/src/tools/compiletest/src/runtest.rs Lines 3259 to 3273 in 7c13eb4
So what's happening is compiletest reads the compiler output from a pipe using read2_abbreviated , which throws away the middle of the output if it's too long and inserts a helpful error in its place. Fortunately for us, since the head of the output is almost always truncated in the middle of a line, we get a JSON parse error, rather than a bunch of incorrect "expected error not found" messages (which would have made this harder to debug).
|
I'll see what happens if I change the caller to use |
It works! I'll submit a PR and we can work through the finer details there. |
If I write a UI test that produces a lot of compiler errors, the test fails with a message like this:
I can reliably trigger the bug with a UI test like this one:
However, the exact column at which the JSON parse fails is apparently nondeterministic. I ran the test multiple times under varying system load and got 237, 302, and 678. Seems like a race condition to me, although I don't know enough about compiletest to guess where the race might be.
version info
The bug is present on commit 3e05f80.
The text was updated successfully, but these errors were encountered: