Integrated: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6

2025-04-24 Thread David Beaumont
On Wed, 16 Apr 2025 12:12:14 GMT, David Beaumont wrote: > Increasing timeout for deadlock detection and adjusting for the timeout > factor in higher tiers. This pull request has now been integrated. Changeset: e01e33d1 Author: David Beaumont Committer: Daniel Fuchs URL:

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-16 Thread David Beaumont
> Increasing timeout for deadlock detection and adjusting for the timeout > factor in higher tiers. David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Removing test from the problem list. - Changes: - all:

RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6

2025-04-16 Thread David Beaumont
Increasing timeout for deadlock detection and adjusting for the timeout factor in higher tiers. - Commit messages: - Increasing timeout for deadlock detection. Changes: https://git.openjdk.org/jdk/pull/24687/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24687&range=00

RFR: 8354513: Bug in j.u.l.Handler deadlock test allows null pointer during race condition

2025-04-15 Thread David Beaumont
Add null pointer guard in test formatter (since it can be called with a log record without parameters). - Commit messages: - Adding null check for test formatter. Changes: https://git.openjdk.org/jdk/pull/24619/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24619&range=00

Integrated: 8354513: Bug in j.u.l.Handler deadlock test allows null pointer during race condition

2025-04-14 Thread David Beaumont
On Mon, 14 Apr 2025 10:56:45 GMT, David Beaumont wrote: > Add null pointer guard in test formatter (since it can be called with a log > record without parameters). This pull request has now been integrated. Changeset: 313c34ae Author: David Beaumont Committer: Daniel Fuch

Integrated: 8353683: [REDO] j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-04-10 Thread David Beaumont
On Tue, 8 Apr 2025 11:00:27 GMT, David Beaumont wrote: > 8353683: j.u.l.Handler classes create deadlock risk via synchronized > publish() method. > > 1. Remove synchronization of calls to publish() in Handlers in > java.util.logging package. > 2. Add explanatory comments t

Re: RFR: 8353683: [REDO] j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-04-09 Thread David Beaumont
On Tue, 8 Apr 2025 16:15:13 GMT, Chen Liang wrote: >> 8353683: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2. Add explanatory comments to various affected

Re: RFR: 8353683: [REDO] j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-04-08 Thread David Beaumont
On Tue, 8 Apr 2025 11:00:27 GMT, David Beaumont wrote: > 8353683: j.u.l.Handler classes create deadlock risk via synchronized > publish() method. > > 1. Remove synchronization of calls to publish() in Handlers in > java.util.logging package. > 2. Add explanatory comments t

RFR: 8353683: [REDO] j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-04-08 Thread David Beaumont
8353683: j.u.l.Handler classes create deadlock risk via synchronized publish() method. 1. Remove synchronization of calls to publish() in Handlers in java.util.logging package. 2. Add explanatory comments to various affected methods. 3. Add a test to ensure deadlocks no longer occur. Note that

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v13]

2025-04-05 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Tweak wording. - Changes: - all: https://

Integrated: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-04-04 Thread David Beaumont
On Thu, 6 Feb 2025 12:07:57 GMT, David Beaumont wrote: > 8349206: j.u.l.Handler classes create deadlock risk via synchronized > publish() method. > > 1. Remove synchronization of calls to publish() in Handlers in > java.util.logging package. > 2. Add explanatory comments t

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v12]

2025-04-02 Thread David Beaumont
On Wed, 2 Apr 2025 13:54:03 GMT, Daniel Fuchs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Reworking user warnings about synchronization and deadlocking based on >> Joe's c

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v12]

2025-04-02 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Reworking user warnings about synchronization and deadlo

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v11]

2025-03-31 Thread David Beaumont
On Mon, 3 Mar 2025 10:15:53 GMT, David Beaumont wrote: >> 8349206: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2.

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v11]

2025-03-03 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Final round of comment tweaks. - Changes: - al

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v10]

2025-03-03 Thread David Beaumont
On Sun, 2 Mar 2025 03:16:02 GMT, Jason Mehrens wrote: >> I'd have to disagree with the points you make. >> >> The fact is that loggers are never expected to modify the passed parameters. >> To ask people to "disown" the parameters they pass to a logger requires that >> your best advice on how

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v10]

2025-02-28 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Final round of comment tweaks. - Changes: - al

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-28 Thread David Beaumont
On Tue, 25 Feb 2025 01:19:14 GMT, Stuart Marks wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweaking @implNote for better rendering. > > src/java.logging/share/classes/java/u

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v9]

2025-02-28 Thread David Beaumont
On Fri, 28 Feb 2025 09:28:29 GMT, Daniel Fuchs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix @implNote to @apiNote. > > src/java.logging/share/classes/java/util/loggi

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-28 Thread David Beaumont
On Fri, 28 Feb 2025 01:00:49 GMT, Stuart Marks wrote: >> src/java.logging/share/classes/java/util/logging/StreamHandler.java line 184: >> >>> 182: * >>> 183: * @param record description of the log event. A null record is >>> 184: * silently ignored and is not pub

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v9]

2025-02-28 Thread David Beaumont
On Fri, 28 Feb 2025 01:09:21 GMT, Stuart Marks wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix @implNote to @apiNote. > > src/java.logging/share/classes/java/util/loggi

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-28 Thread David Beaumont
On Tue, 25 Feb 2025 11:35:18 GMT, David Beaumont wrote: >> src/java.logging/share/classes/java/util/logging/Formatter.java line 94: >> >>> 92: * important to avoid making callbacks to unknown user-provided >>> arguments >>> 93: * (e.g. log r

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v9]

2025-02-28 Thread David Beaumont
On Thu, 27 Feb 2025 14:07:17 GMT, Jason Mehrens wrote: >> Need to update to have single call to getFormatter(). > >>Keeping an unformatted log record around for any time after the log statement >>that created it has exited would be quite problematic (it prevents GC of >>arbitrary things). > >

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v9]

2025-02-27 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Fix @implNote to @apiNote. - Changes: - al

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v8]

2025-02-27 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Make class level docs just docs (no annotation).

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v7]

2025-02-27 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Rewording notes and spec changes in docs. Small ch

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-25 Thread David Beaumont
On Tue, 25 Feb 2025 01:27:04 GMT, Stuart Marks wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweaking @implNote for better rendering. > > src/java.logging/share/classes/java/util/

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-25 Thread David Beaumont
On Tue, 25 Feb 2025 01:18:35 GMT, Stuart Marks wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweaking @implNote for better rendering. > > src/java.logging/share/classes/java/util

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-25 Thread David Beaumont
On Tue, 25 Feb 2025 01:17:21 GMT, Stuart Marks wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweaking @implNote for better rendering. > > src/java.logging/share/classes/java/uti

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-25 Thread David Beaumont
On Tue, 25 Feb 2025 01:12:55 GMT, Stuart Marks wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweaking @implNote for better rendering. > > src/java.logging/share/classes/java/uti

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v5]

2025-02-24 Thread David Beaumont
On Mon, 24 Feb 2025 13:03:38 GMT, David Beaumont wrote: >> src/java.logging/share/classes/java/util/logging/Handler.java line 47: >> >>> 45: * >>> 46: * Subclass Implementation Notes >>> 47: * >> >> Have you looked at how this is rendered

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v5]

2025-02-24 Thread David Beaumont
On Mon, 24 Feb 2025 12:19:19 GMT, Daniel Fuchs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adding @implNote to new JavaDoc. > > src/java.logging/share/classes/java/util/logging/

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v6]

2025-02-24 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Tweaking @implNote for better rendering.

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v5]

2025-02-24 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Adding @implNote to new JavaDoc. - Changes:

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v4]

2025-02-21 Thread David Beaumont
On Fri, 21 Feb 2025 10:41:25 GMT, Daniel Fuchs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Updating code and tests according to feedback and discussions. > > src/java.logging/s

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v4]

2025-02-20 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Updating code and tests according to feedback and discus

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v3]

2025-02-18 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Revert to original state (no stream hooks).

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-18 Thread David Beaumont
On Tue, 18 Feb 2025 02:08:58 GMT, Jason Mehrens wrote: >> The issue with a non-JDK stream handler subclass, is that it doesn't have >> the privilege of being able to do anything before the `super.publish(...)` >> call has finished and the handler instance is unlocked. >> >> Using a package pro

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-17 Thread David Beaumont
On Fri, 14 Feb 2025 19:51:19 GMT, Jason Mehrens wrote: >> The reason I'm pushing back a little here is that the idea of making a >> "secret handshake" method between StreamHandler and FileHandler isn't a >> solution for anyone who made their own handler (e.g. an >> "EncryptedLogFileHandler" th

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 15:50:20 GMT, Daniel Fuchs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Reworking FileHandler so rotation occurs synchronously after the last log >> entry is

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-14 Thread David Beaumont
e deadlocks no longer occur. > > Note that this change does not address issue in MemoryHandler (see > JDK-8349208). David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Reworking FileHandler so rotation occurs synchronously after

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 15:01:37 GMT, David Beaumont wrote: >> src/java.logging/share/classes/java/util/logging/StreamHandler.java line 210: >> >>> 208: if (!doneHeader) { >>> 209: writer.write(getForma

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 06:14:34 GMT, Jason Mehrens wrote: >> 8349206: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2. Add explanatory comments to various affec

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 10:39:54 GMT, David Beaumont wrote: >>>Yes, it's certainly something you can deliberately provoke in a way that >>>wasn't possible before. >> >> Setting limit to 1 byte with a large count is a way to make sure each log >>

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-14 Thread David Beaumont
On Fri, 14 Feb 2025 06:04:09 GMT, Jason Mehrens wrote: >> Yes, it's certainly something you can deliberately provoke in a way that >> wasn't possible before. >> However I'm not sure that the statement "Old code should only allow at most >> 2 records ...", while true of the code itself was ever

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-13 Thread David Beaumont
On Thu, 13 Feb 2025 19:38:47 GMT, Jason Mehrens wrote: >> We could, but I don't think it matters. This issue is the first one pointed >> out in the CSR, and my current feeling is that since it's stated that the >> limit is "best effort" and there's always the chance that the final log >> befor

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-13 Thread David Beaumont
On Thu, 13 Feb 2025 09:36:08 GMT, David Beaumont wrote: >> test/jdk/java/util/logging/LoggingDeadlock5.java line 115: >> >>> 113: >>> 114: private static class DeadLocker { >>> 115: private final static Duration JOIN_WAIT = >>> Dura

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-13 Thread David Beaumont
On Wed, 12 Feb 2025 18:28:19 GMT, Daniel Fuchs wrote: > The code changes look reasonable. WRT to detecting deadlocks a possibility is > also to use `ManagementFactory.getThreadMXBean().findDeadlockedThreads();` > > See for instance > > https://github.com/openjdk/jdk/blob/336d0d8592aed734e7b813

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-13 Thread David Beaumont
On Wed, 12 Feb 2025 20:07:51 GMT, Daniel Fuchs wrote: >> src/java.logging/share/classes/java/util/logging/FileHandler.java line 755: >> >>> 753: synchronized(this) { >>> 754: flush(); >>> 755: if (limit > 0 && (meter.written >= limit || meter.written >>> < 0)) {

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-13 Thread David Beaumont
On Thu, 13 Feb 2025 00:30:14 GMT, Stuart Marks wrote: > A couple days ago the bot warned > > > This pull request contains merges that bring in commits not present in the > > target repository. > > I'm not sure why this happened. It might be because of this commit earlier in > this branch: >

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-12 Thread David Beaumont
On Thu, 6 Feb 2025 16:27:19 GMT, Chen Liang wrote: >> 8349206: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2. Add explanatory comments to various affected

RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-02-12 Thread David Beaumont
8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method. 1. Remove synchronization of calls to publish() in Handlers in java.util.logging package. 2. Add explanatory comments to various affected methods. 3. Add a test to ensure deadlocks no longer occur. Note that