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

Marcus Hirt hirt at openjdk.org
Wed Oct 11 21:22:23 UTC 2023


On Mon, 28 Aug 2023 19:34:56 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

> 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

Marked as reviewed by hirt (Lead).

That sounds like an issue we should fix in the JDK. That said, the workaround looks reasonable and is a good escape hatch for people currently experiencing this problem.

Do you know if there is an issue reported on the JDK for this?

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

PR Review: https://git.openjdk.org/jmc/pull/513#pullrequestreview-1672617835
PR Comment: https://git.openjdk.org/jmc/pull/513#issuecomment-1758559966


More information about the jmc-dev mailing list