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 — VM/VMX is not unwinding stacks correctly on JDK tip · Issue #1395 · async-profiler/async-profiler

VM/VMX is not unwinding stacks correctly on JDK tip #1395

New issue
Copy link
New issue
Copy link
Closed
Closed
VM/VMX is not unwinding stacks correctly on JDK tip#1395
Copy link
Labels
bug

Description

@Baraa-Hasheesh
Baraa-Hasheesh
opened on Jul 16, 2025
Issue body actions

Describe the bug

On recent builds of OpenJDK (for example 26-ea+5-453), the VM/VMX stack-walker will fail to correctly unwind the stack frames

This was observed while investigating #1380

This issue is relevant for both macOS & Linux

Expected vs. actual behavior

VM/VMX should adapt to latest changes on tip

Reproduction Steps

Build OpenJDK from tip & run async-profiler using VM/VMX stack walkers

Additional Information/Context

No response

Async-profiler version

latest

Environment details

No response

Activity

  1. Baraa-Hasheesh
    added
    bug
    on Jul 16, 2025
  2. Baraa-Hasheesh
    changed the title [-]VM/VMX is not unwinding stacks correct on JDK tip[/-] [+]VM/VMX is not unwinding stacks correctly on JDK tip[/+] on Jul 16, 2025
  3. krk commented on Jul 16, 2025

    @krk
    krk
    on Jul 16, 2025
    Contributor
    More actions

    I bisected this to openjdk/jdk#25267.

    Current hypothesis is that because jmethodIDs are now zeroed instead of being left around, we have less chance to find valid jmethodIDs during stack walking.

    In addition to the failing tests, there is a larger issue:

    For example, in the renaissance als benchmark, we are getting %82 attribution to break_interpreted in the flamegraph with the mentioned change. Without the change, there is none.

  4. apangin
    added a commit that references this issue on Jul 28, 2025

    #1395: VMStructs unwinding fails on JDK 26

    2a0bae6
  5. apangin commented on Jul 28, 2025

    @apangin
    apangin
    on Jul 28, 2025
    Collaborator
    More actions

    @krk found the right issue: since JDK-8268406, jmethodID is no longer a pointer, it's just an arbitrary number that serves as a key in a hash table. Therefore, previous goodPtr check is now meaningless for jmethodID. Fortunately, the check can be safely removed: since JDK 26 does not dereference jmethodID, there is no risk of crashes when jmethodID is wrong: if a value is invalid, new implementation will simply fail to find it in a hash table and will return a standard JVM TI error code.

    I pushed the fix.

  6. Baraa-Hasheesh commented on Jul 28, 2025

    @Baraa-Hasheesh
    Baraa-Hasheesh
    on Jul 28, 2025
    ContributorAuthor
    More actions

    The issue is fixed after 2a0bae6

  7. Baraa-Hasheesh
    closed this as completedon Jul 28, 2025
  8. jbachorik
    added 2 commits that reference this issue on Jan 2, 2026

    async-profiler#1395: VMStructs unwinding fails on JDK 26

    9acdebe

    async-profiler#1395: VMStructs unwinding fails on JDK 26

    71ea766
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.