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

vm/dart/use_dwarf_stack_traces_flag_test fails on AOT bots #50286

Closed
sstrickl opened this issue Oct 24, 2022 · 7 comments
Closed

vm/dart/use_dwarf_stack_traces_flag_test fails on AOT bots #50286

sstrickl opened this issue Oct 24, 2022 · 7 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening

Comments

@sstrickl
Copy link
Contributor

There are new test failures on Enable overridden_fields in analyzer/....Resolve RecordPattern(s)..

The tests

vm/dart_2/use_dwarf_stack_traces_flag_test RuntimeError (expected Pass)

are failing on configurations

dartkp-linux-debug-x64c

Strangely enough, the bisection points to a5ad599, which is completely unrelated. Will continue looking into this, but approving for now, especially since the failure doesn't cause any issues in using the native_stack_traces package to decode dwarf stack traces since all the other tests using this functionality passes. This is just failing while testing something I thought would be an invariant that perhaps isn't as much of one as I thought.

@sstrickl sstrickl added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening labels Oct 24, 2022
@sstrickl sstrickl self-assigned this Oct 24, 2022
@mkustermann
Copy link
Member

Today it seems this test started failing again. Though running it locally seems to pass.

Maybe there is something not quite deterministic in this test?

The specific place it fails is when comparing virtual addresses to be matching across runs. Are those virtual addresses relative to dso base or actual runtime virtual addresses (which may not match across runs due to ASLR)?

@sstrickl
Copy link
Contributor Author

Those should be relocated addresses, IIRC, e.g., relative to the DSO base. That's what's confusing to me, as that calculation shouldn't be non-deterministic, since the comparisons that are failing are only run when we're compiling directly to ELF, in which case we control the relocated addresses and thus they should be the same in both separate debugging info and the snapshot. I'll take a look at this again in a bit.

However, I might just remove the checks entirely, since we never actually end up using the virt-marked addresses when actually symbolicizing stack traces, and, as the lack of other failing tests shows, that symbolicization is currently always succeeding. It's just odd that those values aren't consistently equal to the other calculations of relocated addresses, since they should be, but maybe it's the calculation of the virt-marked addresses in the runtime that's to blame (or something that calculation depends on).

@sstrickl
Copy link
Contributor Author

sstrickl commented Nov 9, 2022

Seeing a failure on vm-kernel-precomp-win-debug-x64c today as well. The fact that it only seems to be happening on compressed pointer architectures is interesting, and might be the clue to figuring this out. It's my gardening day, so I'll allocate cycles to pinning this down.

@sstrickl
Copy link
Contributor Author

sstrickl commented Nov 9, 2022

Note that this does seem to be somewhat flaky, as dartkp-linux-debug-x64c is currently passing (not just approved failing).

@alexmarkov alexmarkov changed the title vm/dart_2/use_dwarf_stack_traces_flag_test fails on dartkp-linux-debug-x64c vm/dart/use_dwarf_stack_traces_flag_test fails on AOT bots Apr 10, 2024
@alexmarkov
Copy link
Contributor

vm/dart/use_dwarf_stack_traces_flag_test started failing consistently on vm-aot-msan-linux-release-x64 bot.

It is also flaky on several other AOT bots: https://dart-current-results.web.app/#/filter=vm/dart/use_dwarf_stack_traces_flag_test&showAll

@alexmarkov
Copy link
Contributor

Historically, it has been flipping between Pass, flaky and RuntimeError:

https://dart-ci.firebaseapp.com/#showLatestFailures=false&test=vm/dart/use_dwarf_stack_traces_flag_test

@sstrickl
Copy link
Contributor Author

I think I've figured out why this is happening while working on CL 362380. It looks like sometimes the call info for the address returned by VMInternalsForTesting.randomInstructionsOffsetInsideAllocateObjectStub() isn't attributed to the stub, but rather just a random address in the instructions section. (That is, I got a failure at this check during one of my runs of the new test, which is derived from the test that's flaky and so would be similarly flaky.)

I'll take a look and see which part is at fault: the VM runtime for returning an address that shouldn't be within the stub or the generated DWARF for not appropriately capturing the proper address range for the stub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening
Projects
None yet
Development

No branches or pull requests

3 participants