GeezerVison is showing github.com — Unwind vDSO correctly on Linux-ARM64 by apangin · Pull Request #1641 · async-profiler/async-profiler
Conversation
apangin
commented
Jan 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR fixes two issues related to vDSO:
- vDSO symbols (e.g.
__kernel_gettimeofday) are not resolved if vDSO object has no DT_RELAENT program header. In this case, parseDynamicSection returns early despite that loadSymbolTable does not need the value of DT_RELAENT.
- If
vDSO does not have DWARF unwinding info (PT_GNU_EH_FRAME program header), assume an empty frame layout instead of the default layout. There was a partial fix for this problem in Some unwinding problems with the new vm cstack mode on AArch 64 #819, but that fix was incomplete: it did not handle the case when PT_GNU_EH_FRAME was absent.
Related issues
#819, #1636
Motivation and context
When testing an example program from #1636 on linux-arm64, I found that stack walking of System.currentTimeMillis was broken because of the two issues mentioned in the description.
Before the fix:
After the fix:
How has this been tested?
Ubuntu 20.04 AArch64
Amazon Corretto 11
java -agentpath:build/lib/libasyncProfiler.so=start,event=cpu,file=out.html Cpu1
+ Added new test.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -425,7 +425,7 @@ void ElfParser::parseDynamicSection() { |
|
|
}
|
|
|
|
|
|
const char* base = this->base();
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: wouldn't it be better to return immediately after loading the symbol table rather than checking the value twice?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this option, but decided that this condition alone would be less clear than having it directly in the context where relent is used.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Baraa-Hasheesh reacted with thumbs up emoji
|
|
}
|
|
|
|
|
|
// Verify that System.currentTimeMillis() intrinsic is unwound correctly
|
|
|
@Test(mainClass = TimeLoop.class, jvm = Jvm.HOTSPOT, jvmVer = {11, Integer.MAX_VALUE}, debugNonSafepoints = true)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are [unknown] frames on Liberica 8-arm64 for a different reason.
Since this is an exotic configuration, I don't really want to waste time fixing this right now.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
2 more reviewers
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|