Profiling is unstable when using LaunchWrapper
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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