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

Investigate why repr-128-dwarf doesn't fail in CI test jobs #138334

Open
jieyouxu opened this issue Mar 11, 2025 · 5 comments
Open

Investigate why repr-128-dwarf doesn't fail in CI test jobs #138334

jieyouxu opened this issue Mar 11, 2025 · 5 comments
Labels
A-compiletest Area: The compiletest test runner A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-download-rustc Area: The `rust.download-rustc` build option. A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

I'm not sure why this passes in CI though. Surely we have some jobs that enable LLVM assertions? Seems like not, test jobs typically don't enable LLVM assertions due to slowness.

That doesn't sound right. LLVM assertions are supposed to be enabled for all test jobs, except those marked NO_LLVM_ASSERTIONS, which is only the apple ones.

Originally posted by @nikic in #138254

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 11, 2025
@jieyouxu jieyouxu changed the title Investigate LLVM assertions being absent when download-rustc is enabled in test jobs Investigate LLVM assertions being absent when download-rustc is eligible and enabled in test jobs Mar 11, 2025
@jieyouxu jieyouxu added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. C-bug Category: This is a bug. A-download-rustc Area: The `rust.download-rustc` build option. A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 11, 2025
@jieyouxu
Copy link
Member Author

See also #138254 (comment):

For reference, this issue is being caused by debuginfo for std enums being included in the binary built by the test. Testing locally with the config from #138254 (comment), the issue seems to also require download-rustc.

@jieyouxu
Copy link
Member Author

@jieyouxu jieyouxu changed the title Investigate LLVM assertions being absent when download-rustc is eligible and enabled in test jobs Investigate LLVM assertions being possibly absent when download-rustc is eligible and enabled in test jobs Mar 11, 2025
@jieyouxu jieyouxu changed the title Investigate LLVM assertions being possibly absent when download-rustc is eligible and enabled in test jobs Investigate why repr-128-dwarf doesn't fail in CI test jobs Mar 11, 2025
@ehuss
Copy link
Contributor

ehuss commented Mar 12, 2025

I think I understand what happened.

  • The tests/run-make/repr128-dwarf test would fail if std had debuginfo-level-std set.
  • None of the jobs that run that test have debuginfo-level-std set.
  • All the builds from when it was introduced in Add DWARF test case for non-C-like repr128 enums #137643 were modifying things like the compiler or bootstrap, and so were not downloading rustc.
    • The cargo update was the first one that used the download rustc logic.
  • The download rustc logic (uncertain?) downloads a rustc from a dist builder that does have debuginfo-level-std set.
    • Thus the test failed only when downloading rustc.

I'm not sure what the best resolution would be. Some ideas:

  • Make sure the download-rustc logic only downloads a rustc that has the exact same configuration as the current build.
    • I think this would prevent the download-rustc logic from working on many jobs.
    • This may be difficult to implement or keep in sync.
    • We could have each job cache its own rustc separately instead of sharing. Not sure how expensive or complicated that would be.
  • Introduce some builder that runs tests with debuginfo enabled so that we have better coverage of that scenario (since that is how most users are using Rust).
    • Or enable it on all test builders? I don't know how expensive it is, but I assume it is expensive.
  • Do nothing and hope a similar scenario doesn't happen.

@jieyouxu
Copy link
Member Author

jieyouxu commented Mar 12, 2025

I think it may be worth trying to enable it on at least some test builders, subject to the usual CI build time efforts.

@jieyouxu jieyouxu added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-compiletest Area: The compiletest test runner labels Mar 13, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Mar 13, 2025

And for compiletest side, I think that test probably needs to be gated by sth like

//@ min-std-debuginfo-level: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-download-rustc Area: The `rust.download-rustc` build option. A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
Development

No branches or pull requests

3 participants