RFR 8244105: JDK 11.0.7 -Xlog gc issue with file path if not exist

David Holmes david.holmes at oracle.com
Tue May 12 07:32:27 UTC 2020


Hi Harold,

On 9/05/2020 3:22 am, Harold Seigel wrote:
> Hi,
> 
> Please review this fix for JDK-8244105.  The fix continues program 
> execution even when specified logging options are invalid.  Previously, 
> invalid logging options terminated the program.  Now, a warning is 
> issued.  For example:
> 
>      > java -Xlog:"gc*:file=/dont/exist" -version
>     [0.001s][error][logging] Error opening log file '/dont/exist': No
>     such file or directory
>     [0.001s][error][logging] Initialization of output 'file=/dont/exist'
>     using options '(null)' failed.
>     Java HotSpot(TM) 64-Bit Server VM warning: Invalid -Xlog option
>     '-Xlog:gc*:file=/dont/exist', see error log for details.
> 
>     java version "15-internal" 2020-09-15
>     Java(TM) SE Runtime Environment (fastdebug build
>     15-internal+0-2020-05-08-1313404.hseigel.bug8244105)
>     Java HotSpot(TM) 64-Bit Server VM (fastdebug build
>     15-internal+0-2020-05-08-1313404.hseigel.bug8244105, mixed mode,
>     sharing)

But if I am reading this correctly you are now only issuing a warning 
and disabling logging if there are any errors of any kind in the -Xlog 
arguments! That is not desirable IMO and a significant change in behaviour.

Even just changing the behaviour in relation to a non-existent log file 
will require a CSR request.

Thanks,
David
-----

> Open Webrev: 
> http://cr.openjdk.java.net/~hseigel/bug_8244105/webrev/index.html
> 
> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8244105
> 
> The fix was regression tested by running Mach5 tiers 1 and 2 tests and 
> builds on Linux-x64, Solaris, Windows, and Mac OS X and by running Mach5 
> tiers 3-5 tests on Linux-x64.
> 
> Thanks, Harold
> 
> 


More information about the serviceability-dev mailing list