Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-03 Thread Alan Bateman
On Wed, 1 Mar 2023 16:59:51 GMT, Roger Riggs wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > Roger Riggs has updated the pull request incrementally with one addi

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-03 Thread Jaikiran Pai
On Wed, 1 Mar 2023 16:59:51 GMT, Roger Riggs wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > Roger Riggs has updated the pull request incrementally with one addi

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-02 Thread David Holmes
On Wed, 1 Mar 2023 16:59:51 GMT, Roger Riggs wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > Roger Riggs has updated the pull request incrementally with one addi

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-02 Thread Roger Riggs
On Fri, 3 Mar 2023 02:49:01 GMT, Chris Plummer wrote: > Are you going to remove VMOutOfMemoryException001.java from the problem list? I'll do that a separate PR to avoid mixing the issues and solutions. This change is not only to address JDK-8303057. - PR: https://git.openjdk.org/j

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-02 Thread Chris Plummer
On Wed, 1 Mar 2023 16:59:51 GMT, Roger Riggs wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > Roger Riggs has updated the pull request incrementally with one addi

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-02 Thread Roger Riggs
On Wed, 1 Mar 2023 16:59:51 GMT, Roger Riggs wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > Roger Riggs has updated the pull request incrementally with one addi

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-01 Thread Chris Hegarty
On Tue, 28 Feb 2023 14:09:50 GMT, Alan Bateman wrote: >> But does that logging include the thread identity? If multiple threads can >> race to exit and all log, then the developer/user needs to know which >> logging came from which thread. > >> But does that logging include the thread identity?

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-01 Thread Roger Riggs
> Consolidate logging and handle exceptions by printing to standard error and > ignoring the exception. > Exceptions while logging will not interfere with Runtime.exit. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add exit status t

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-03-01 Thread Jaikiran Pai
On Wed, 1 Mar 2023 15:13:06 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/Shutdown.java line 186: >> >>> 184: try { >>> 185: // Exceptions from the Logger are printed but do not >>> prevent exit >>> 186: System.err.println("Runtime.

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-03-01 Thread Roger Riggs
On Wed, 1 Mar 2023 11:03:39 GMT, Jaikiran Pai wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > src/java.base/share/classes/java/lang/Shutdown.java line 186: > >>

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-03-01 Thread Jaikiran Pai
On Mon, 27 Feb 2023 15:41:01 GMT, Roger Riggs wrote: > Consolidate logging and handle exceptions by printing to standard error and > ignoring the exception. > Exceptions while logging will not interfere with Runtime.exit. src/java.base/share/classes/java/lang/Shutdown.java line 186: > 184:

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-28 Thread Alan Bateman
On Tue, 28 Feb 2023 02:45:36 GMT, David Holmes wrote: > But does that logging include the thread identity? If multiple threads can > race to exit and all log, then the developer/user needs to know which logging > came from which thread. That's really up to the Logger and its configuration. If

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 23:20:07 GMT, Roger Riggs wrote: >> I can't tell if the thread identity will be included in the log the message? >> >> I'm not so sure it is useful to allow competing exit calls to all log their >> intent. I would have kept the logging itself inside the locked region as per

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 23:00:45 GMT, David Holmes wrote: >> Yes, its racy, and intentional, but from a diagnostic view, the developer >> should know that multiple callers were trying to exit. All but one will >> hang. >> Consolidating the code in a single method is cleaner and with fewer >> int

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 16:05:44 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/Shutdown.java line 189: >> >>> 187: } catch (Throwable throwable2) { >>> 188: // Ignore >>> 189: } >> >> The update means that several threads racing to exit may

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 15:58:33 GMT, Alan Bateman wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > src/java.base/share/classes/java/lang/Shutdown.java line 189: > >

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Alan Bateman
On Mon, 27 Feb 2023 15:41:01 GMT, Roger Riggs wrote: > Consolidate logging and handle exceptions by printing to standard error and > ignoring the exception. > Exceptions while logging will not interfere with Runtime.exit. src/java.base/share/classes/java/lang/Shutdown.java line 189: > 187:

RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
Consolidate logging and handle exceptions by printing to standard error and ignoring the exception. Exceptions while logging will not interfere with Runtime.exit. - Commit messages: - Consolidate logging and handle exceptions by printing to standard error Changes: https://git.openj