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

Sporadic test failure for srcloc assembly test (non-optimized) #82886

Closed
ehuss opened this issue Mar 8, 2021 · 5 comments
Closed

Sporadic test failure for srcloc assembly test (non-optimized) #82886

ehuss opened this issue Mar 8, 2021 · 5 comments
Labels
A-inline-assembly Area: Inline assembly (`asm!(…)`) C-bug Category: This is a bug. F-asm `#![feature(asm)]` (not `llvm_asm`) I-flaky-test Issue: A test is flaky/unreliable/spuriously fails T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 8, 2021

The srcloc.rs test has seen a couple sporadic failures on CI with the x86_64-gnu-nopt job.

The error is that it is not always emitting all 23 errors. Sometimes I see it report anywhere from 3 to 15 errors.

I'm able to reproduce locally with rust.optimize-tests = false, and running in a loop. The failure rate isn't high, but I can repro within a few seconds.

cc @Amanieu

@ehuss ehuss added the C-bug Category: This is a bug. label Mar 8, 2021
@JohnTitor JohnTitor added the A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) label Mar 8, 2021
@Amanieu
Copy link
Member

Amanieu commented Mar 8, 2021

This doesn't seem to happen with -Ccodegen-units=1. However that doesn't make sense: all the asm!s are in a single function, there's no way they could be split over multiple codegen units, right?

@tmiasko
Copy link
Contributor

tmiasko commented Mar 8, 2021

AFAIK, the channel used for emitting diagnostic from codegen threads is not guaranteed to be fully drained when compilation session is aborted.

@Amanieu Amanieu added A-inline-assembly Area: Inline assembly (`asm!(…)`) F-asm `#![feature(asm)]` (not `llvm_asm`) labels Mar 15, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Mar 26, 2021
Fixes to inline assmebly tests

* Join test thread to make assertion effective in sym.rs test case
* Use a single codegen unit to reduce non-determinism in srcloc.rs test rust-lang#82886
JohnTitor added a commit to JohnTitor/rust that referenced this issue Mar 27, 2021
Fixes to inline assmebly tests

* Join test thread to make assertion effective in sym.rs test case
* Use a single codegen unit to reduce non-determinism in srcloc.rs test rust-lang#82886
JohnTitor added a commit to JohnTitor/rust that referenced this issue Mar 27, 2021
Fixes to inline assmebly tests

* Join test thread to make assertion effective in sym.rs test case
* Use a single codegen unit to reduce non-determinism in srcloc.rs test rust-lang#82886
@Amanieu
Copy link
Member

Amanieu commented Apr 4, 2021

@tmiasko Is this issue considered fixed by #83328?

@tmiasko
Copy link
Contributor

tmiasko commented Apr 9, 2021

@Amanieu I left this open in the case there is an interest in fixing the underlying cause, if not feel free to close.

@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-flaky-test Issue: A test is flaky/unreliable/spuriously fails and removed A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) labels Nov 26, 2024
@jieyouxu jieyouxu changed the title Sporadic test failure for srcloc assembly test (non-optimized). Channel used for emitting diagnostic from codegen threads is not guaranteed to be fully drained when compilation session is aborted Nov 26, 2024
@jieyouxu jieyouxu changed the title Channel used for emitting diagnostic from codegen threads is not guaranteed to be fully drained when compilation session is aborted Sporadic test failure for srcloc assembly test (non-optimized) Nov 26, 2024
@jieyouxu
Copy link
Member

Triage: closing in favor of a new issue to address the underlying problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inline-assembly Area: Inline assembly (`asm!(…)`) C-bug Category: This is a bug. F-asm `#![feature(asm)]` (not `llvm_asm`) I-flaky-test Issue: A test is flaky/unreliable/spuriously fails T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants