Visitar URL original
JVM Profiling Follow ups · Issue #4778 · getsentry/sentry-java · GitHub
Skip to content

JVM Profiling Follow ups #4778

Description

@adinauer

Description

We have released JVM Profiling in https://github.com/getsentry/sentry-java/releases/tag/8.23.0

There are still tasks /improvements we could do:

Maybe later

  • We could reduce profile chunk size / duration based on thread count of the application. This could help in case profiles are dropped due to being too large. Thread.activeCount() or ThreadMXBean (more accurate)
  • Continuous Profiling could upload JFR files #4768 (we should wait for feedback first, maybe we don't need this)
  • JVM Profiling Windows support #4779
  • Detect that async-profiler is the (major) version we expect on startup, crash otherwise

Activity

  1. linear commented on Oct 3, 2025

    @linear
  2. joaocanaverde-blue commented on Oct 3, 2025

    @joaocanaverde-blue

    @adinauer great news on this being released!

    Appreciate it's early days for this feature, but wanted to ask if there any environments where profiling is not expected to work yet?

    Haven't had a chance to do much troubleshooting yet (would need to spin it up again and grab the log file/core dump), but tried enabling profiling and it caused a crash.

    Running on ECS Fargate on an arm64 instance. It's a Spring Boot app written in Kotlin.

    Maybe it's not compatible with arm64? Or Kotlin?

    Relevant startup logs:

    DEBUG: Started Profiler.
    A fatal error has been detected by the Java Runtime Environment:
    SIGSEGV (0xb) at pc=0x0000000000000000, pid=1, tid=203
    JRE version: OpenJDK Runtime Environment Corretto-24.0.2.12.1 (24.0.2+12) (build 24.0.2+12-FR)
    Java VM: OpenJDK 64-Bit Server VM Corretto-24.0.2.12.1 (24.0.2+12-FR, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-aarch64)
    Problematic frame:
    C [libasyncProfiler-1255257512175285949.so+0x1f990]
    Core dump will be written. Default location: //core.1
    An error report file with more information is saved as:
    //hs_err_pid1.log
    The crash happened outside the Java Virtual Machine in native code.
    See problematic frame for where to report the bug.
    If you would like to submit a bug report, please visit:
    https://github.com/corretto/corretto-24/issues/
    

    Thanks in advance!

  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Oct 3, 2025
  4. lcian commented on Oct 3, 2025

    @lcian
    Member

    Hey @joaocanaverde-blue! Thanks for reaching out and wanting to try profiling.
    It's known that the async-profiler library on version 3.0 (which is the one we're using at the moment for our profiling feature) segfaults on JDK 23 and later, so that's what's happening in your case.
    As you can see in the list of follow-ups, we have an item to upgrade to the newest version of the library.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Oct 3, 2025
  6. pinned this issue on Oct 3, 2025
  7. joaocanaverde-blue commented on Oct 3, 2025

    @joaocanaverde-blue

    Hey @joaocanaverde-blue! Thanks for reaching out and wanting to try profiling. It's known that the async-profiler library on version 3.0 (which is the one we're using at the moment for our profiling feature) segfaults on JDK 23 and later, so that's what's happening in your case. As you can see in the list of follow-ups, we have an item to upgrade to the newest version of the library.

    @lcian I see, missed that one. Thanks!

  8. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Oct 3, 2025
  9. 20 remaining items

  10. reszkapiotr commented on Nov 21, 2025

    @reszkapiotr

    @lbloder Got it set to TRACE. Interestingly, in another project that uses Java 21 it works - there are flamegraphs for transactions. In the one running on Java 24, it doesn’t seem to collect transaction profiles specifically (although profiles for the slowest functions are available).

  11. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Nov 21, 2025
  12. lbloder commented on Nov 21, 2025

    @lbloder
    Collaborator

    @reszkapiotr Thanks for the additional Info, will give it a try locally to confirm

  13. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Nov 21, 2025
  14. lbloder commented on Dec 15, 2025

    @lbloder
    Collaborator

    Hi @reszkapiotr,
    sorry for the long wait. However we have not been able to reproduce this problem.
    We used Spring Boot 3 and tested with both Java 24 and 25.

    Did you, by any chance, use a different Spring Boot Version? Also, we've been testing on Mac OS, what system are you running this on?

  15. reszkapiotr commented on Dec 16, 2025

    @reszkapiotr

    Hello @lbloder
    We've used spring boot version 3 as well. And system: Mac OS and linux.
    I guess it's something application specific then that's causing this behaviour.
    Testing in the meantime integration with otel.
    Anyway great to have profiling available for Java 24.
    Thank you for help and regards!

  16. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Dec 16, 2025
  17. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions