Skip to content

Confusing CI error when compiler build fails #127869

Closed
@RalfJung

Description

@RalfJung
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

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Jul 17, 2024
added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Jul 17, 2024
tgross35

tgross35 commented on Jul 18, 2024

@tgross35
Contributor

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

onur-ozkan

onur-ozkan commented on Jul 18, 2024

@onur-ozkan
Member

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

RalfJung

RalfJung commented on Jul 18, 2024

@RalfJung
MemberAuthor

What's RLA?

tgross35

tgross35 commented on Jul 18, 2024

@tgross35
Contributor

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

Kobzol

Kobzol commented on Jul 18, 2024

@Kobzol
Member

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

Kobzol commented on Jul 18, 2024

@Kobzol
Member

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

RalfJung commented on Jul 18, 2024

@RalfJung
MemberAuthor
added a commit that references this issue on Jul 18, 2024

Rollup merge of rust-lang#127901 - Kobzol:llvm-bitcode-linker-gha-gro…

16d2b61
added a commit that references this issue on Jul 18, 2024

6 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CIArea: Our Github Actions CIT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @RalfJung@Kobzol@saethlin@tgross35@fmease

        Issue actions

          Confusing CI error when compiler build fails · Issue #127869 · rust-lang/rust