Skip to content

Occasional non-reproducibility when building librls and libcargo #68608

Closed
@jgalenson

Description

@jgalenson

Occasionally (perhaps 1/3 of the time, so it's not that rare) when doing multiple builds with extended = true (and hence building tools including rls and cargo), I get different libcargo.rlib and librls.rlib files.

During a normal build, libcargo gets built once (reproducibly for me), but on these bad builds it gets built twice. The command line is slightly different the second time, as it has ,artifacts appended to its --json argument (due to this code). This difference gets propagated to librls, which depends on libcargo.

I believe this is due to rustc's bootstrap compiler invoking cargo separately for each tool. If the cargo build finishes early enough, the rls build can use its result. But if it does not, the rls build seems to fire off its own compile, which causes the above issue.

Note that this is a part of #34902.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-reproducibilityArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions