oracle / oracle/visualvm

Profiling is unstable when using LaunchWrapper

Open
#93 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3.3k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

Something LaunchWrapper does breaks profiling (not sampling), and sometimes causes everything to freeze. This mainly causes issues with profiling Minecraft modifications. It's likely to be an issue with LaunchWrapper as I don't remember it ever working reliably with profiling, but it seems like it got much worse in 1.4.1. Also note that LaunchWrapper does NOT work with java 9 and above.

When trying to start profiling when the application is already running, it sometimes works but most of the time (especially when profiling all classes) it the application will stop responding. When using startup profiling, it will almost always freeze at some point, usually in the same place, when loading some class.

I was able to reproduce the issue just by wrapping an existing project that I could profile without any issues in LaunchWrapper, but no matter what small synthetic test I came up with, everything worked fine. So this means I don't have a small test case that reproduces the issue.

This is example thread dump I got when it froze: https://pastebin.com/raw/Zfw7ZWss

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing profiling with a project wrapped in LaunchWrapper, comparing startup profiling with profiling an already running application. Review the provided thread dump when the application freezes and determine whether the failure is specific to LaunchWrapper or VisualVM. Done means the cause is isolated and profiling no longer intermittently freezes the wrapped application.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.