rust-lang / rust-lang/rust

parallel compiler: async fns not reproducible

Open
#162,202 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-async-await A-parallel-compiler A-reproducibility C-bug T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I tried this code:

async fn test1(_: &'_ u8) {}
async fn test2<'s>(_: &'s u8,) {}
fn main() {}

rustc --edition=2024 -Zremap-cwd-prefix=reproducible_dir -Ccodegen-units=1 -Zthreads=30 --crate-type=lib --crate-name=test -o out ; md5sum out

I expected to see this happen:
constant md5sum

Instead, this happened:
the md5sum is flipflopping between d1afc31db4a80828c5c3937fae627a66 and 56d12483eea2eaaca0cd435f83439b59

Meta

rustc --version --verbose:

rustc 1.100.0-nightly (5db7f4be8 2026-09-01)
binary: rustc
commit-hash: 5db7f4be8a36c1b8ae19299469e2be2b0f052c21
commit-date: 2026-09-01
host: x86_64-unknown-linux-gnu
release: 1.100.0-nightly
LLVM version: 23.1.0

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 by compiling the two async functions with the reported rustc command, including --edition=2024, -Zremap-cwd-prefix, -Ccodegen-units=1, and -Zthreads=30, then compare the output hashes across runs. Done means the generated library produces a consistent md5sum instead of alternating between the two reported values.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.