rust-lang / rust-lang/rust

rustdoc reproducibility issue due to nondeterministic anon.llvm.<hash>

Open
#126,976 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-LLVM A-LTO A-reproducibility C-bug T-compiler
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

I am facing a reproducibility issue with rustdoc in Yocto project. The issue is happening due to a different llvm.<hash> generation between the builds.

anon-1
anon-2

What could be the reason for this llvm.<hash> is nondeterministic. Any optimization settings causing this? (I tried the PGO enabling/disabling but has no effect).

[Info] - This issue we've seen in past https://internals.rust-lang.org/t/rustdoc-binary-is-not-reproducible/20027. There we concluded the issue is fixed by disabling PGO and setting tools = ["rust-demangler",] but it is not fixed. Somehow with those settings rustdoc is not generating at all. (We found that by removing tools = ["rust-demangler",] the rustdoc is generated)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with a reproducible Yocto build of rustdoc, comparing the generated anon.llvm. values while varying PGO and tools = ["rust-demangler",]. No file or test is named; done means identifying the source of the differing hash and documenting or fixing settings so repeated builds produce the same rustdoc.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.