RFR: CODETOOLS-7902936 Stray VM warnings in forked PrintPropertiesMain lead to hard to debug XML parse exception
Jason Zaugg
jzaugg at openjdk.java.net
Fri May 21 02:34:39 UTC 2021
On Fri, 21 May 2021 02:27:09 GMT, Jason Zaugg <jzaugg at openjdk.org> wrote:
> - Recover from stray output before the XML prelude
> - Report the output in the exception otherwise
> - Silence VM warnings in PrintPropertiesMain when JEP-158 (-Xlog:) is available (JRE 9+)
This code path is only exercised when specifying an alternative `-jvm`, which doesn't appear to be done in the JMH test suite, presumably because of the hassle of requiring multiple JVMs.
I manually tested the change by:
- Running just the diagnostic on a server that gives the VM warnings about duplicate cpusets. The error message included the VM warning.
- JMH worked again on that machine with the commit that adds `-Xlog:all=error`
- Locally, I added `System.out.println("VM OUTPUT")` to `PrintPropertiesMain` and tested that the recovery logic worked.
-------------
PR: https://git.openjdk.java.net/jmh/pull/41
More information about the jmh-dev
mailing list