Skip to content

Test failures in tests/ui/panics on aarch64-apple-darwin #133997

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

Closed
Zalathar opened this issue Dec 7, 2024 · 8 comments
Closed

Test failures in tests/ui/panics on aarch64-apple-darwin #133997

Zalathar opened this issue Dec 7, 2024 · 8 comments
Labels
A-panic Area: Panicking machinery A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status O-AArch64 Armv8-A or later processors in AArch64 mode O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Zalathar
Copy link
Contributor

Zalathar commented Dec 7, 2024

Using an unmodified profile = "compiler" build on aarch64 macOS (14.7.1), I see the following tests fail from ./x test tests/ui/panics:

failures:
    [ui] tests/ui/panics/issue-47429-short-backtraces.rs
    [ui] tests/ui/panics/runtime-switch.rs
    [ui] tests/ui/panics/short-ice-remove-middle-frames-2.rs
    [ui] tests/ui/panics/short-ice-remove-middle-frames.rs

All of the failure diffs look something like this:

diff of run.stderr:

1	thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:24:5:
2	explicit panic
3	stack backtrace:
-	   0: std::panicking::begin_panic
+	   0: begin_panic<&str>
5	   1: issue_47429_short_backtraces::main
6	note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
7	


The actual run.stderr differed from the expected run.stderr.

I see the same failures with --stage=1 and --stage=2.


Not sure if this is a test output normalization problem, or an actual bug.

Discussion elsewhere indicates that this might be related to #123244.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 7, 2024
@Zalathar
Copy link
Contributor Author

Zalathar commented Dec 7, 2024

I'm seeing the same failures with all of:

rust.new-symbol-mangling = true
rust.new-symbol-mangling = false
# rust.new-symbol-mangling not set

@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. A-panic Area: Panicking machinery E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 7, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Dec 7, 2024

I cannot repro on x86_64 linux, x86_64 msvc, aarch64 linux, tagging aarch64 + apple unless someone else can repro this on a different environment.

@jieyouxu jieyouxu added O-macos Operating system: macOS O-AArch64 Armv8-A or later processors in AArch64 mode labels Dec 7, 2024
@Zalathar
Copy link
Contributor Author

Zalathar commented Dec 7, 2024

I can also confirm that for me the tests pass before #123244, and fail after it.

@jieyouxu
Copy link
Member

jieyouxu commented Dec 7, 2024

#123244 added some additional normalizations, FTR

@Mark-Simulacrum
Copy link
Member

We probably(?) need some extra normalization in the tests. The symbol in question (begin_panic) is probably found a bit differently by backtrace on this platform?

That said, we run these tests in CI for this platform, so it's not clear whether it's some local delta as well. Perhaps you have e.g. lld enabled or some other optimization setting that's not set in CI?

@madsmtm
Copy link
Contributor

madsmtm commented Dec 8, 2024

I can reproduce it on my machine too (also using macOS 14.7.1), on both Aarch64 and x86_64 (using Rosetta), so that's at least weak evidence that it's not something environment specific.

Not sure what the underlying issue is yet though.

@Zalathar
Copy link
Contributor Author

I can make the failures go away by setting rust.debuginfo-level = 1, and then make them appear again by setting rust.debuginfo-level = "line-tables-only", which is the compiler profile default.

That helps to explain why it doesn't show up on CI.

jieyouxu added a commit to jieyouxu/rust that referenced this issue Dec 26, 2024
…ieyouxu

Add more `begin_panic` normalizations to panic backtrace tests

Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace.

The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1.

The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation.

---

Will conflict with rust-lang#134759.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Dec 26, 2024
…ieyouxu

Add more `begin_panic` normalizations to panic backtrace tests

Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace.

The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1.

The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation.

---

Will conflict with rust-lang#134759.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 26, 2024
Rollup merge of rust-lang#134781 - Zalathar:backtrace, r=SparrowLii,jieyouxu

Add more `begin_panic` normalizations to panic backtrace tests

Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace.

The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1.

The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation.

---

Will conflict with rust-lang#134759.
@Zalathar
Copy link
Contributor Author

Fixed by adding more normalizations in #134781.

poliorcetics pushed a commit to poliorcetics/rust that referenced this issue Dec 28, 2024
…ieyouxu

Add more `begin_panic` normalizations to panic backtrace tests

Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace.

The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1.

The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation.

---

Will conflict with rust-lang#134759.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-panic Area: Panicking machinery A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status O-AArch64 Armv8-A or later processors in AArch64 mode O-macos Operating system: macOS 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