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

Confusing CI error when compiler build fails #127869

Closed
RalfJung opened this issue Jul 17, 2024 · 8 comments
Closed

Confusing CI error when compiler build fails #127869

RalfJung opened this issue Jul 17, 2024 · 8 comments
Labels
A-ci Area: Our Github Actions CI T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

Opening this failed log shows a somewhat confusing error message:

image

It very much looks like this toolstate error is what makes the build fail. That's wrong though, there is another error hiding inside "Building compiler artifacts", and that is the true error.

Is there a way we can avoid showing errors that are entirely unrelated to the actual problem? Also, is there a way we can avoid hiding the compiler error? AFAIK github doesn't fold a group if the endgroup is missing, so ideally we'd not emit endgroup if there was an error that aborts the build.

Cc @rust-lang/bootstrap

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 17, 2024
@fmease fmease added the A-ci Area: Our Github Actions CI label Jul 17, 2024
@saethlin saethlin added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 17, 2024
@tgross35
Copy link
Contributor

tgross35 commented Jul 18, 2024

I feel like this may be a recent change, I have noticed RLA capturing this output a lot since about last week.

@onur-ozkan
Copy link
Member

This could be related with one of the BootstrapCommand PRs. cc @Kobzol

@RalfJung
Copy link
Member Author

What's RLA?

@tgross35
Copy link
Contributor

Rust log analyzer. Or Rust length array if we come up with safer VLAs :)

@Kobzol
Copy link
Contributor

Kobzol commented Jul 18, 2024

This behavior is specific to the checktools.sh script. It essentially ignores errors (set +e), then it tries to build some tools, and then records the output of the build in the toolstate.

So in this case, the actual error that fails the CI job is really

ERROR: Tool `book` was not recorded in tool state.
ERROR: Tool `nomicon` was not recorded in tool state.
ERROR: Tool `reference` was not recorded in tool state.
ERROR: Tool `rust-by-example` was not recorded in tool state.
ERROR: Tool `edition-guide` was not recorded in tool state.
ERROR: Tool `embedded-book` was not recorded in tool state.

not the previous compiler ICE (that is explicitly allowed by the script).

@Kobzol
Copy link
Contributor

Kobzol commented Jul 18, 2024

To clarify: bootstrap is doing everything correctly here. The compiler build fails, it produces an error, and doesn't end its group. But because checktools.sh uses set +e, it swallows this error, and continues with another bootstrap execution, which opens a new group, which causes GHA to automatically close the previous group containing the error.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 18, 2024 via email

tgross35 added a commit to tgross35/rust that referenced this issue Jul 18, 2024
…up, r=onur-ozkan

Add missing GHA group for building `llvm-bitcode-linker`

Found while investigating rust-lang#127869.

r? `@onur-ozkan`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 18, 2024
Rollup merge of rust-lang#127901 - Kobzol:llvm-bitcode-linker-gha-group, r=onur-ozkan

Add missing GHA group for building `llvm-bitcode-linker`

Found while investigating rust-lang#127869.

r? `@onur-ozkan`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 19, 2024
…onur-ozkan

Improve error when a compiler/library build fails in `checktools.sh`

Suggested by `@RalfJung` [here](rust-lang#127869 (comment)).

`x86_64-gnu-tools` should take ~45 minutes, let's see if this doesn't regress it.

r? `@onur-ozkan`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 19, 2024
…onur-ozkan

Improve error when a compiler/library build fails in `checktools.sh`

Suggested by ``@RalfJung`` [here](rust-lang#127869 (comment)).

`x86_64-gnu-tools` should take ~45 minutes, let's see if this doesn't regress it.

r? ``@onur-ozkan``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 19, 2024
Rollup merge of rust-lang#127934 - Kobzol:checktools-better-error, r=onur-ozkan

Improve error when a compiler/library build fails in `checktools.sh`

Suggested by ``@RalfJung`` [here](rust-lang#127869 (comment)).

`x86_64-gnu-tools` should take ~45 minutes, let's see if this doesn't regress it.

r? ``@onur-ozkan``
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jul 20, 2024
Improve error when a compiler/library build fails in `checktools.sh`

Suggested by ``@RalfJung`` [here](rust-lang/rust#127869 (comment)).

`x86_64-gnu-tools` should take ~45 minutes, let's see if this doesn't regress it.

r? ``@onur-ozkan``
@onur-ozkan
Copy link
Member

#127934 is merged, closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: Our Github Actions CI T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

7 participants