GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unwind vDSO correctly on Linux-ARM64 by apangin · Pull Request #1641 · async-profiler/async-profiler

Conversation

@apangin

@apangin apangin commented Jan 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Description

This PR fixes two issues related to vDSO:

  1. 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.
  2. 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:

before

After the fix:

after

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.

All reactions
@apangin
Unwind vDSO correctly on Linux-ARM64
e8d5e9d
Baraa-Hasheesh
Baraa-Hasheesh reviewed Jan 6, 2026
View reviewed changes
Comment thread src/symbols_linux.cpp
@@ -425,7 +425,7 @@ void ElfParser::parseDynamicSection() {
}

const char* base = this->base();

@Baraa-Hasheesh Baraa-Hasheesh Jan 6, 2026

Copy link
Copy Markdown
Contributor

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?

if (relent == 0) return;

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@apangin apangin Jan 6, 2026

Copy link
Copy Markdown
Collaborator Author

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
All reactions
  • 👍 1 reaction
fandreuz
fandreuz reviewed Jan 7, 2026
View reviewed changes
Comment thread test/test/recovery/RecoveryTests.java
}

// Verify that System.currentTimeMillis() intrinsic is unwound correctly
@Test(mainClass = TimeLoop.class, jvm = Jvm.HOTSPOT, jvmVer = {11, Integer.MAX_VALUE}, debugNonSafepoints = true)

@fandreuz fandreuz Jan 7, 2026

Copy link
Copy Markdown
Contributor

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.

Why not JDK 8?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@apangin apangin Jan 7, 2026

Copy link
Copy Markdown
Collaborator Author

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.

All reactions
@apangin
apangin merged commit ee4ac6e into master Jan 7, 2026
@apangin
apangin deleted the currentTimeMillis branch January 7, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@fandreuz fandreuz fandreuz left review comments
@Baraa-Hasheesh Baraa-Hasheesh Baraa-Hasheesh left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

3 participants

@apangin @fandreuz @Baraa-Hasheesh
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.