RFR: 8118: Add user configuration for delay between JVM discovery and attachment

Alex Macdonald aptmac at openjdk.org
Mon Aug 28 19:40:43 UTC 2023


This PR addresses JMC-8118 [0], in which it'd be nice to be able to specify a time delay between when a JVM is discovered and when JVM is attached to (for the JvmDescriptor creation). I've placed this option into the Preferences menu at Preferences > JDK Mission Control > JVM Browser > Local, with a maximum delay time of 1 minute and a default time of 0ms (current).

There is currently an issue where if a newly launched JVM is not fully set-up by the time JMC discovers and attaches to it (via JvmDescriptor creation), then the target JVM could through an error and/or crash on startup. For example, if an application uses a custom logging manager that hasn't been fully initialized prior to JvmDescriptor creation, it may/will just crash.

Example:
![8118](https://github.com/openjdk/jmc/assets/10425301/d199cf50-2dba-4577-86fb-1dd65973d67a)

[0] https://bugs.openjdk.org/browse/JMC-8118

-------------

Commit messages:
 - 8118: Add user configuration for delay between JVM discovery and attachment

Changes: https://git.openjdk.org/jmc/pull/513/files
 Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=513&range=00
  Issue: https://bugs.openjdk.org/browse/JMC-8118
  Stats: 55 lines in 6 files changed: 55 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jmc/pull/513.diff
  Fetch: git fetch https://git.openjdk.org/jmc.git pull/513/head:pull/513

PR: https://git.openjdk.org/jmc/pull/513


More information about the jmc-dev mailing list