Re: RFR: 8314515: java/util/concurrent/SynchronousQueue/Fairness.java failed with "Error: fair=false i=8 j=0"

2024-01-10 Thread Alan Bateman
On Tue, 12 Dec 2023 15:13:01 GMT, Viktor Klang wrote: > While this might not fix 8314515, it should at least make it more exact. test/jdk/java/util/concurrent/SynchronousQueue/Fairness.java line 42: > 40: private static void testFairness(boolean fair, > 41:

Re: RFR: JDK-8322979: Add informative discussion to Modifier

2024-01-10 Thread Alan Bateman
On Wed, 10 Jan 2024 06:00:18 GMT, Joe Darcy wrote: > Add a few apiNote concerning source-level modifiers that are not represented > in java.lang.reflect.Modifier. src/java.base/share/classes/java/lang/reflect/Modifier.java line 237: > 235: * To make a high-fidelity representation of the

Re: RFR: 8309218: java/util/concurrent/locks/Lock/OOMEInAQS.java still times out with ZGC, Generational ZGC, and SerialGC [v2]

2024-01-10 Thread Alan Bateman
On Tue, 9 Jan 2024 11:08:39 GMT, Viktor Klang wrote: >> As per conversation in the issue. > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Updating copyright year for zgc and zgc-gen problem lists > - Removing OOMEInAQS

Re: [jdk22] RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable

2024-01-10 Thread Alan Bateman
> > The commit being backported was authored by Serguei Spitsyn on 19 Dec 2023 > and was reviewed by Leonid Mesnik and Alan Bateman. > > Thanks! Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk22/pull/23#pullrequestreview-1812613022

Re: [jdk22] RFR: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order

2024-01-09 Thread Alan Bateman
eing backported was authored by Mandy Chung on 9 Jan 2024 and was > reviewed by Alan Bateman. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk22/pull/46#pullrequestreview-1812555013

Re: RFR: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order [v3]

2024-01-09 Thread Alan Bateman
On Tue, 9 Jan 2024 18:13:43 GMT, Mandy Chung wrote: >> One optimization of Jlink SystemModulesPlugin pre-resolves the module graph >> for modules with a main class. It stores the name of the initial module and >> the generated `SystemModules` class name in two arrays that can be obtained >>

Re: RFR: 8322565 (zipfs) Files.setPosixPermissions should preserve 'external file attributes' bits [v2]

2024-01-09 Thread Alan Bateman
On Tue, 9 Jan 2024 10:22:40 GMT, Eirik Bjørsnøs wrote: >> This PR suggests that `Files.setPosixPermissions`as implemented by >> `ZipFileSystem` should preserve the leading seven bits of the 'external file >> attributes' field. These bits contain the 'file type', 'setuid', 'setgid', >> and

Re: RFR: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order

2024-01-09 Thread Alan Bateman
On Tue, 9 Jan 2024 00:17:48 GMT, Mandy Chung wrote: > One optimization of Jlink SystemModulesPlugin pre-resolves the module graph > for modules with a main class. It stores the name of the initial module and > the generated `SystemModules` class name in two arrays that can be obtained > from

Integrated: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

2024-01-08 Thread Alan Bateman
On Tue, 2 Jan 2024 10:21:11 GMT, Alan Bateman wrote: > In preparation for when virtual threads can unmount while holding a monitor > or unmount when blocking on monitorenter, the implementation of > VirtualThread's interrupt method is refactored to avoid parking/blocking > w

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

2024-01-08 Thread Alan Bateman
lementations of > sun.nio.ch.Interruptible are refactored to close/wakeup the > InterruptibleChannel/Selector after releasing the interrupt lock. There is a > lot of test coverage for async close and interrupt, no additional tests are > added. Alan Bateman has updated the pull request wi

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

2024-01-08 Thread Alan Bateman
On Fri, 5 Jan 2024 17:28:30 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java >> line 180: >> >>> 178: Thread me = Thread.currentThread(); >>> 179: if (me.isInterrupted()) { >&g

Integrated: 8322846: Running with -Djdk.tracePinnedThreads set can hang

2024-01-06 Thread Alan Bateman
On Tue, 2 Jan 2024 13:53:39 GMT, Alan Bateman wrote: > -Djdk.tracePinnedThreads is a debugging option that dates from early > development in the loom repo to identify pinned threads. It has several > issues and this tracing option will eventually be removed (use the JFR events

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

2024-01-05 Thread Alan Bateman
On Fri, 5 Jan 2024 17:35:01 GMT, Jaikiran Pai wrote: >> In preparation for when virtual threads can unmount while holding a monitor >> or unmount when blocking on monitorenter, the implementation of >> VirtualThread's interrupt method is refactored to avoid parking/blocking >> while holding

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

2024-01-05 Thread Alan Bateman
On Fri, 5 Jan 2024 17:27:30 GMT, Jaikiran Pai wrote: >> In preparation for when virtual threads can unmount while holding a monitor >> or unmount when blocking on monitorenter, the implementation of >> VirtualThread's interrupt method is refactored to avoid parking/blocking >> while holding

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

2024-01-05 Thread Alan Bateman
On Fri, 5 Jan 2024 16:51:40 GMT, Jaikiran Pai wrote: >> In preparation for when virtual threads can unmount while holding a monitor >> or unmount when blocking on monitorenter, the implementation of >> VirtualThread's interrupt method is refactored to avoid parking/blocking >> while holding

Re: RFR: 8323002: test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java times out on macosx-x64

2024-01-04 Thread Alan Bateman
On Thu, 4 Jan 2024 14:53:46 GMT, Patricio Chilano Mateo wrote: >> This test was recently added by JDK-8322818. On some test systems, the test >> passes a bit after the timeout so the test is marked as failed. The changes >> here dial down the iterations from 100k to 25k to reduce the

Integrated: 8323002: test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java times out on macosx-x64

2024-01-04 Thread Alan Bateman
On Thu, 4 Jan 2024 11:51:47 GMT, Alan Bateman wrote: > This test was recently added by JDK-8322818. On some test systems, the test > passes a bit after the timeout so the test is marked as failed. The changes > here dial down the iterations from 100k to 25k to reduce the execu

Re: RFR: 8322846: Running with -Djdk.tracePinnedThreads set can hang [v2]

2024-01-04 Thread Alan Bateman
t adding complexity for a debugging option that we want to go away. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains

RFR: 8323002: test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java times out on macosx-x64

2024-01-04 Thread Alan Bateman
This test was recently added by JDK-8322818. On some test systems, the test passes a bit after the timeout so the test is marked as failed. The changes here dial down the iterations from 100k to 25k to reduce the execution time for release builds. No change for debug builds as this already uses

Integrated: 8322818: Thread::getStackTrace can fail with InternalError if virtual thread is timed-parked when pinned

2024-01-03 Thread Alan Bateman
On Tue, 2 Jan 2024 08:55:37 GMT, Alan Bateman wrote: > Missed by JDK-8312498, VirtualThread::tryGetStackTrace doesn't handle the > TIMED_PINNED state so it's possible for Thread::getStackTrace to throw > InternalError when invoked on a virtual thread that quickly transitions from &g

Re: RFR: 8322877: java/io/BufferedInputStream/TransferTo.java failed with IndexOutOfBoundsException

2024-01-03 Thread Alan Bateman
On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter wrote: > The final position instead of the number of bytes to write was being passed > to `ByteArrayOuputStream.write(byte[],int,int)`. Marked as reviewed by alanb (Reviewer). - PR Review:

Integrated: 8320707: Virtual thread test updates

2024-01-03 Thread Alan Bateman
On Sat, 16 Dec 2023 17:25:20 GMT, Alan Bateman wrote: > A lot of test changes have accumulated in the loom repo, this includes both > new tests and updates to existing tests. Some of these updates can be brought > to the main line. This update brings over: > > - The existing te

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v8]

2024-01-03 Thread Alan Bateman
On Wed, 3 Jan 2024 13:55:24 GMT, Thomas Wuerthinger wrote: > Are these new compiler intrinsics required or an optional performance > optimization? Performance. If the intrinsic isn't there then some methods executed on virtual threads, or on a virtual thread as the target for some op, will

Re: RFR: JDK-8322782: Clean up usages of unnecessary fully qualified class name "java.util.Arrays"

2024-01-03 Thread Alan Bateman
On Wed, 3 Jan 2024 11:41:20 GMT, Matthias Baesken wrote: > In [JDK-8322772](https://bugs.openjdk.org/browse/JDK-8322772) one similar > cleanup has been proposed before (and was done in the change). But there are > a number of other places in the codebase where the import is done and still >

Re: RFR: 8320707: Virtual thread test updates [v2]

2024-01-03 Thread Alan Bateman
On Wed, 3 Jan 2024 11:53:24 GMT, Jaikiran Pai wrote: > Just one question - doesn't the use of a new native code in the test library > (the `libVThreadPinner.c`) require any build changes (I'm not too familiar > with that part)? Magnus did some work in the make files some time ago to build

Re: RFR: 8320707: Virtual thread test updates [v2]

2024-01-03 Thread Alan Bateman
On Wed, 3 Jan 2024 11:39:01 GMT, Jaikiran Pai wrote: > Are these heap sizing changes to reduce the resource usage of this test or is > it to try and trigger any potential issue that this test verifies? The heap usage for this one can vary quite a bit, some of the lower optimization modes lead

Re: RFR: 8310994: Add JFR event for selection operations [v3]

2024-01-03 Thread Alan Bateman
On Wed, 13 Dec 2023 22:20:55 GMT, Tim Prinzing wrote: >> Added mirror event with static methods: jdk.internal.event.SelectionEvent >> that provides the duration of select calls and the count of how many keys >> are available. >> >> Emit the event from SelectorImpl::lockAndDoSelect >> >> Test

Re: RFR: 8322846: Running with -Djdk.tracePinnedThreads set can hang

2024-01-02 Thread Alan Bateman
On Tue, 2 Jan 2024 15:56:06 GMT, Jaikiran Pai wrote: > I guess that then means that the some pinned threads might not even appear in > this generated thread dumps. Just to be clear. The changes here have no impact on thread dumps, the thread dump generated by jcmd Thread.dump_to_file has all

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v19]

2024-01-02 Thread Alan Bateman
On Sat, 30 Dec 2023 16:47:11 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

RFR: 8322818: Thread::getStackTrace can fail with InternalError if virtual thread is timed-parked when pinned

2024-01-02 Thread Alan Bateman
Missed by JDK-8312498, VirtualThread::tryGetStackTrace doesn't handle the TIMED_PINNED state so it's possible for Thread::getStackTrace to throw InternalError when invoked on a virtual thread that quickly transitions from unmounted to timed-park-while-pinned. This one is needs a stress test to

RFR: 8322846: Running with -Djdk.tracePinnedThreads set can hang

2024-01-02 Thread Alan Bateman
-Djdk.tracePinnedThreads is a debugging option that dates from early development in the loom repo to identify pinned threads. It has several issues and this tracing option will eventually be removed (use JFR events instead). Several hangs have been reported when running with the system property

RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

2024-01-02 Thread Alan Bateman
In preparation for when virtual threads can unmount while holding a monitor or unmount when blocking on monitorenter, the implementation of VirtualThread's interrupt method is refactored to avoid parking/blocking while holding the Thread's interrupt lock. The implementations of

Re: RFR: 8320707: Virtual thread test updates [v2]

2024-01-02 Thread Alan Bateman
> > - The use of CountDownLatch in a number of tests that poll thread state has > been dropped to keep the tests as simple as possible. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in

Re: RFR: 8322802: Add testing for ZipFile.getEntry respecting the 'Language encoding' flag [v4]

2024-01-02 Thread Alan Bateman
On Tue, 2 Jan 2024 09:31:16 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which adds test coverage for >> `ZipFile.getEntry` under certain charset conditions. >> >> When `ZipFile.getEntry` is called for an entry which has the `Language >> encoding flag` general purpose bit

Re: RFR: 7009069: ZipFile.getEntry(String name) does NOT respect the "language encoding flag" [v2]

2024-01-01 Thread Alan Bateman
On Sun, 31 Dec 2023 23:25:51 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which adds test coverage for >> `ZipFile.getEntry` under certain charset conditions. >> >> When `ZipFile.getEntry` is called for an entry which has the `Language >> encoding flag` general purpose bit

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v18]

2023-12-30 Thread Alan Bateman
On Thu, 28 Dec 2023 15:09:09 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

Re: RFR: 8322322: Support archived full module graph when -Xbootclasspath/a is used [v2]

2023-12-23 Thread Alan Bateman
On Fri, 22 Dec 2023 18:34:30 GMT, Calvin Cheung wrote: > A full bcp would contain the path to the module image as the first path. This > "append" property only contains the path specified in -Xbootclasspath/a. > That's why I had bootAppendUcp as the variable name. I've changed it to >

Re: RFR: 8322322: Support archived full module graph when -Xbootclasspath/a is used [v2]

2023-12-23 Thread Alan Bateman
On Fri, 22 Dec 2023 18:33:59 GMT, Calvin Cheung wrote: >> Please review this change for enabling full module graph even when >> -Xbootclasspath/a is specified. The validation of -Xbootclasspath/a is >> already being done in `FileMapInfo::validate_boot_class_paths()`. The full >> module graph

Re: RFR: 8322322: Support archived full module graph when -Xbootclasspath/a is used

2023-12-22 Thread Alan Bateman
On Thu, 21 Dec 2023 19:10:59 GMT, Calvin Cheung wrote: > Please review this change for enabling full module graph even when > -Xbootclasspath/a is specified. The validation of -Xbootclasspath/a is > already being done in `FileMapInfo::validate_boot_class_paths()`. The full > module graph will

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v8]

2023-12-20 Thread Alan Bateman
On Mon, 18 Dec 2023 17:09:59 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: 8322417: Console read line with zero out should zero out when throwing exception

2023-12-20 Thread Alan Bateman
On Tue, 19 Dec 2023 12:47:53 GMT, Goetz Lindenmaier wrote: > …g exception > > After leaving the method by throwing an exception the data can not be cleaned > any more. src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 122: > 120:

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v8]

2023-12-20 Thread Alan Bateman
On Wed, 20 Dec 2023 04:44:35 GMT, David Holmes wrote: > You can't do this! The Java code knows nothing about JVM TI being > enabled/disabled and will call this function unconditionally. Indeed. I wonder if anyone is testing minimal builds to catch issues like this. - PR Review

Re: RFR: 8320707: Virtual thread test updates

2023-12-19 Thread Alan Bateman
On Mon, 18 Dec 2023 20:37:29 GMT, Chris Plummer wrote: > I'm working on a test where I just added a CountDownLatch(1) and am wondering > if I should do the same, but I'm not sure if there is something about these > tests that is motivating the change. CountDownLatch is great for many tests.

Re: RFR: JDK-8319626: Override toString() for ZipFile [v8]

2023-12-17 Thread Alan Bateman
On Mon, 11 Dec 2023 05:47:33 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) >> which overrides and provides an implementation of `toString()` in >> _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). > > Justin Lu has

Re: RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator [v2]

2023-12-17 Thread Alan Bateman
On Thu, 14 Dec 2023 20:36:50 GMT, Valeh Hajiyev wrote: >> This commit addresses the current limitation in the `PriorityQueue` >> implementation, which lacks a constructor to efficiently create a priority >> queue with a custom comparator and an existing collection. In order to >> create such

Re: RFR: 8318971 : Better Error Handling for Jar Tool Processing of @File

2023-12-17 Thread Alan Bateman
On Wed, 13 Dec 2023 18:16:56 GMT, Weibing Xiao wrote: > Better Error Handling for Jar Tool Processing of "@File" > > This is a new PR for this PR since the original developer left the team. See > all of the review history at https://github.com/openjdk/jdk/pull/16423. > > Thank you. The

Re: RFR: 8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem [v2]

2023-12-17 Thread Alan Bateman
On Tue, 12 Dec 2023 11:59:36 GMT, Eirik Bjorsnos wrote: >> Please review this PR which adds validation of incorrect LOC signatures in >> `ZipFileSystem`. >> >> `ZipFile` already rejects the case where the offset pointed to from the CEN >> header does not start with the expected LOC

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v15]

2023-12-17 Thread Alan Bateman
On Thu, 14 Dec 2023 08:47:03 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

Re: RFR: 8259637: java.io.File.getCanonicalPath() returns different values for same path

2023-12-17 Thread Alan Bateman
On Wed, 13 Dec 2023 19:37:15 GMT, Brian Burkhalter wrote: > Modify the `collapse()` function to remove each instance of ".." when the > path is absolute and there is no preceding name. The change looks okay, the canonical path of a file that does not exist has always been hard to reason

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v15]

2023-12-16 Thread Alan Bateman
On Sat, 16 Dec 2023 17:50:07 GMT, Markus KARG wrote: > Let's follow Alan's proposal and simply inline this. I didn't suggest inlining this. I just asked not to add a new package com.sun.io with a single method class. Also as the concerns with BAIS and BIS are not the same (they do overlap

RFR: 8320707: Virtual thread test updates

2023-12-16 Thread Alan Bateman
A lot of test changes have accumulated in the loom repo, this includes both new tests and updates to existing tests. Some of these updates can be brought to the main line. This update brings over: - The existing tests for pinning use synchronized blocks. In preparation for changes to allow

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-15 Thread Alan Bateman
On 14/12/2023 10:55, Viktor Klang wrote: I presume that the precondition to have the original collection be pre-ordered according to the supplied Comparator can be verified by checking before adding each element in the collection to the PQ that it compareTo equal-or-greater to the previous

Re: RFR: JDK-8322141: SequenceInputStream.transferTo should not return as soon as Long.MAX_VALUE bytes have been transferred

2023-12-15 Thread Alan Bateman
On Fri, 15 Dec 2023 08:23:58 GMT, Markus KARG wrote: > Fixes JDK-8322141 > > As suggested by @vlsi and documented by @bplb this PR does not return, but > only sets the maximum result value. I think Jai is right, maybe we need to come up with tests that quickly check the handling at this

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v6]

2023-12-15 Thread Alan Bateman
On Thu, 14 Dec 2023 22:57:53 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v6]

2023-12-15 Thread Alan Bateman
On Thu, 14 Dec 2023 22:57:53 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: JDK-8322141: SequenceInputStream.transferTo should not return as soon as Long.MAX_VALUE bytes have been transferred

2023-12-15 Thread Alan Bateman
On Fri, 15 Dec 2023 08:23:58 GMT, Markus KARG wrote: > Fixes JDK-8322141 > > As suggested by @vlsi and documented by @bplb this PR does not return, but > only sets the maximum result value. Marked as reviewed by alanb (Reviewer). - PR Review:

Re: RFR: 8297632: InputStream.transferTo() method should specify what the return value should be when the number of bytes transfered is larger than Long.MAX_VALUE [v7]

2023-12-15 Thread Alan Bateman
On Thu, 14 Dec 2023 23:17:41 GMT, Brian Burkhalter wrote: >> IMHO @vlsi is right. It is incorrect that we stop the transfer in the >> overflow case. We should fix it as he suggested. I can do that if you like. > > Right, the base class. The suggested change was made for `InputStream` in >

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v5]

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 18:26:55 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v3]

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 18:24:16 GMT, Serguei Spitsyn wrote: > Thank you, Alan. Fixed now. I believe, all your suggestions have been > addressed now. Thanks, it looks much better now. - PR Comment: https://git.openjdk.org/jdk/pull/17011#issuecomment-1856485757

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v4]

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 17:30:54 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v3]

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 12:19:43 GMT, Alan Bateman wrote: > Okay. What about the Leonid's suggestion to name it > `notifyJvmtiDisableSuspend()` ? Okay with me. We'll need to move the notifyJvmtiDisableSuspend(true) to before the try in all cases, I've pointed out the cases that we

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v3]

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 16:57:25 GMT, Serguei Spitsyn wrote: > Implemented this renaming suggestion. Let's wait if Alan ia okay with it. Are you planning to drop the changes to mount/unmount too? They shouldn't be needed. notifyJvmtiCriticalLock(boolean) is okay for now but needs to be called

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v3]

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 12:06:41 GMT, Serguei Spitsyn wrote: > Carrier thread also can be suspended when executing the "critical code". Why > do you think it can't be a problem? Do you think the deadlocking scenario > described in the bug report is not possible? It's a different scenario. When

Re: RFR: 8322065: Initial nroff manpage generation for JDK 23

2023-12-14 Thread Alan Bateman
On Thu, 14 Dec 2023 05:46:01 GMT, David Holmes wrote: > Updated the version to 23-ea and year to 2024. > > This initial generation also picks up the unpublished changes from: > > - [JDK-8302233](https://bugs.openjdk.org/browse/JDK-8302233) (keytool & > jarsigner) > -

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v13]

2023-12-13 Thread Alan Bateman
On Wed, 13 Dec 2023 16:20:58 GMT, Markus KARG wrote: > > It doesn't make sense here to add a new package com.sun.io for a single > > method class. This PR does not need to introduce any new classes at this > > point. I think this PR needs to focus solely on BIS. > > So you actually prefer

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v13]

2023-12-13 Thread Alan Bateman
On Wed, 13 Dec 2023 10:01:30 GMT, Alan Bateman wrote: >> So what is the target package for this utility class? > >> So what is the target package for this utility class? > > If you really want a utility class then a non-public class in java.io is > okay. However, I

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v13]

2023-12-13 Thread Alan Bateman
On Wed, 13 Dec 2023 09:47:50 GMT, Sergey Tsypanov wrote: > So what is the target package for this utility class? If you really want a utility class then a non-public class in java.io is okay. However, I think the starting point for this change is not the utility class, it's about deciding

Re: ZipEntry

2023-12-13 Thread Alan Bateman
On 12/12/2023 20:17, Alan Snyder wrote: ZipEntry is a public class and I am aware that it is used outside the JDK. Presumably that is not a problem. I’m wondering why the class stores the external file attributes field but does not provide public accessors for it. I would find it useful to

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v13]

2023-12-13 Thread Alan Bateman
On Wed, 13 Dec 2023 08:15:21 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

Re: [jdk22] RFR: 8321641: ClassFile ModuleAttribute.ModuleAttributeBuilder::moduleVersion spec contains a copy-paste error

2023-12-13 Thread Alan Bateman
On Mon, 11 Dec 2023 10:19:52 GMT, Adam Sotona wrote: > 8321641: ClassFile ModuleAttribute.ModuleAttributeBuilder::moduleVersion spec > contains a copy-paste error Marked as reviewed by alanb (Reviewer). - PR Review:

Re: RFR: JDK-8321889: JavaDoc method references with wrong (nested) type [v2]

2023-12-12 Thread Alan Bateman
On Tue, 12 Dec 2023 10:42:32 GMT, Hannes Wallnöfer wrote: >> Please review a doc-only change for JavaDoc references using a nested class >> instead of the enclosing class containing the target method. Until now this >> is accepted by JavaDoc, but with >>

Re: RFR: 8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem

2023-12-12 Thread Alan Bateman
On Mon, 11 Dec 2023 15:38:28 GMT, Eirik Bjorsnos wrote: > Please review this PR which adds validation of incorrect LOC signatures in > `ZipFileSystem`. > > `ZipFile` already rejects the case where the offset pointed to from the CEN > header does not start with the expected LOC signature. It

Re: RFR: 8321641: ClassFile ModuleAttribute.ModuleAttributeBuilder::moduleVersion spec contains a copy-paste error

2023-12-11 Thread Alan Bateman
On Mon, 11 Dec 2023 10:00:45 GMT, Adam Sotona wrote: > This is a fix of ClassFile > ModuleAttribute.ModuleAttributeBuilder::moduleVersion javadoc copy-paste > error. > > Please review. > > Thanks, > Adam Marked as reviewed by alanb (Reviewer). - PR Review:

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v5]

2023-12-08 Thread Alan Bateman
On Fri, 8 Dec 2023 17:54:21 GMT, Vladimir Sitnikov wrote: >> src/java.base/share/classes/java/io/OutputStream.java line 212: >> >>> 210: * @return true if the argument of {@link #write(byte[])}} and >>> {@link #write(byte[], int, int)}} needn't be copied >>> 211: */ >>> 212:

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v12]

2023-12-08 Thread Alan Bateman
On Tue, 5 Dec 2023 19:15:53 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v3]

2023-12-08 Thread Alan Bateman
On Fri, 8 Dec 2023 11:54:40 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: 8316141: Improve CEN header validation checking

2023-12-08 Thread Alan Bateman
On Wed, 8 Nov 2023 19:59:34 GMT, Lance Andersen wrote: > Please review this PR which enhances the existing CEN header validation > checking to ensure that the > size of the CEN Header + name length + comment length + extra length do not > exceed 65,535 bytes per the PKWare APP.NOTE 4.4.10,

Integrated: 8320786: Remove ThreadGroup.stop

2023-12-08 Thread Alan Bateman
On Mon, 27 Nov 2023 16:58:29 GMT, Alan Bateman wrote: > ThreadGroup.stop was deprecated since JDK 1.2, deprecated for removal in Java > 18, and re-specified/degraded to throw UnsupportedOperationException > unconditionally in Java 20. Early in Java 23 seems a fine time to finally

Re: RFR: 8320786: Remove ThreadGroup.stop [v2]

2023-12-07 Thread Alan Bateman
o come back to this in some future > release. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge - Initial commit - Changes: https://git.openjdk.org/jdk/pull/16828/files Webrev: https:/

Integrated: 8320532: Remove Thread/ThreadGroup suspend/resume

2023-12-07 Thread Alan Bateman
On Thu, 23 Nov 2023 09:18:44 GMT, Alan Bateman wrote: > The deadlock prone Thread/ThreadGroup suspend/resume were deprecated since > JDK 1.2, deprecated for removal in Java 14, and re-specified/degraded to > throw UnsupportedOperationException unconditionally in Java 19/20. Early i

Re: RFR: 8320532: Remove Thread/ThreadGroup suspend/resume [v2]

2023-12-07 Thread Alan Bateman
I prefer) is to remove the text. > > The method description of java.lang.management.ThreadInfo.isSuspended is > tweaked to link to JVMTI SuspendThread instead of Thread.suspend Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes t

Re: RFR: 8310994: Add JFR event for selection operations

2023-12-07 Thread Alan Bateman
On Wed, 22 Nov 2023 12:08:08 GMT, Daniel Fuchs wrote: > It could also be interesting to provide the `timeout` that was given to the > selection operation. I've tried to work through issues, esp. around selector spinning, and being able to distinguish select from selectNow is important for all

Integrated: 8321223: Implementation of Scoped Values (Second Preview)

2023-12-07 Thread Alan Bateman
On Sun, 3 Dec 2023 08:46:07 GMT, Alan Bateman wrote: > This API is sitting out JDK 22, meaning no API/implementation changes in this > PR. Some small API changes are likely for JDK 23. > > For now, we just need to bump JEP number/title that shows up in the preview > section

Integrated: 8321270: Virtual Thread.yield consumes parking permit

2023-12-07 Thread Alan Bateman
On Mon, 4 Dec 2023 16:08:32 GMT, Alan Bateman wrote: > When a virtual thread continues after Thread.yield it currently consumes > thread's parking permit. This is an oversight, the parking permit should only > be consumed when continuing after park. > > The changes are s

Re: RFR: JDK-8320538: Obsolete CSS styles in collection framework doc-file

2023-12-06 Thread Alan Bateman
On Wed, 6 Dec 2023 16:22:24 GMT, Hannes Wallnöfer wrote: > Please review a simple change to remove a stray inline CSS element from the > Collection Framework index doc file. The only thing the `a {font-weight: > bold;}` rule did was to make all links in the header and footer bold as [can > be

Re: RFR: 8321409: Console read line with zero out should zero out underlying buffer in JLine (redux)

2023-12-06 Thread Alan Bateman
On Wed, 6 Dec 2023 21:12:40 GMT, Naoto Sato wrote: > This is an additional fix to JDK-8321131, where more clearing is required in > JLine. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/17004#pullrequestreview-1769310866

Re: RFR: JDK-8319662 ForkJoinPool trims worker threads too slowly [v8]

2023-12-06 Thread Alan Bateman
On Mon, 4 Dec 2023 13:56:55 GMT, Doug Lea wrote: >> This update cascades timeouts to trim subsequent workers after the first >> keepAlive inactive period. > > Doug Lea has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the

Re: RFR: 8321206: Make Locale related system properties static properties

2023-12-06 Thread Alan Bateman
On Tue, 5 Dec 2023 23:04:55 GMT, Naoto Sato wrote: > Currently, Locale-related system properties, such as `user.language` or > `user.country`, are initialized when the `Locale` class is loaded. Making > them static properties is safer than relying on the class initialization > timing, which

Re: RFR: 8321270: Virtual Thread.yield consumes parking permit [v2]

2023-12-05 Thread Alan Bateman
On Wed, 6 Dec 2023 02:58:19 GMT, David Holmes wrote: > The key point of this change is to split RUNNABLE into two states to > indicated "runnable after yielding" and "runnable after being unparked". That's right. This comes up with upcoming changes for monitors too - in that case it is

Re: RFR: 8321053: Use ByteArrayInputStream.buf directly when parameter of transferTo() is trusted [v5]

2023-12-05 Thread Alan Bateman
On Tue, 5 Dec 2023 16:40:59 GMT, Brian Burkhalter wrote: >> Pass `ByteArrayInputStream.buf ` directly to the `OutputStream` parameter of >> `BAIS.transferTo` only if the target stream is in the `java.io` package. > > Brian Burkhalter has updated the pull request incrementally with one >

Re: RFR: 8321124: java/util/stream/GatherersTest.java times out [v5]

2023-12-05 Thread Alan Bateman
On Tue, 5 Dec 2023 14:55:02 GMT, Viktor Klang wrote: >> Splits GatherersTest out to distinct files per built-in gatherer >> >> Fixes a test ordering issue for mapConcurrent which placed GatherersTest on >> the ProblemList. >> >> Adding increased maxOutputSize for Gatherer-related tests to

Re: RFR: 8321124: java/util/stream/GatherersTest.java times out [v4]

2023-12-05 Thread Alan Bateman
On Tue, 5 Dec 2023 14:19:34 GMT, Viktor Klang wrote: > Do you want me to make this change as a part of this PR or does it make more > sense to get this one integrated first? I think it's okay to leave it to another time, I assume these tests be updated a few times before the feature becomes

Re: RFR: 8321124: java/util/stream/GatherersTest.java times out [v4]

2023-12-05 Thread Alan Bateman
On Mon, 4 Dec 2023 14:25:05 GMT, Viktor Klang wrote: >> Splits GatherersTest out to distinct files per built-in gatherer >> >> Fixes a test ordering issue for mapConcurrent which placed GatherersTest on >> the ProblemList. >> >> Adding increased maxOutputSize for Gatherer-related tests to

Re: RFR: 8321270: Virtual Thread.yield consumes parking permit [v2]

2023-12-05 Thread Alan Bateman
ger > changes in the loom repo, future PRs will propose to bring in other changes > to get main line up to date. > > For testing the existing ThreadAPI has new test cases. > > Testing: test1-5. This includes the JVMTI tests as it maps the thread states > to JVMTI thread

Re: RFR: 8321270: Virtual Thread.yield consumes parking permit

2023-12-05 Thread Alan Bateman
On Mon, 4 Dec 2023 20:25:56 GMT, ExE Boss wrote: >> When a virtual thread continues after Thread.yield it currently consumes >> thread's parking permit. This is an oversight, the parking permit should >> only be consumed when continuing after park. >> >> The changes are straight-forward. The

Re: RFR: 8321270: Virtual Thread.yield consumes parking permit

2023-12-05 Thread Alan Bateman
On Mon, 4 Dec 2023 21:33:52 GMT, Serguei Spitsyn wrote: > Just want to make sure this change is intentional. Before the comment was: > `// runnable-mounted`. Well spotted, the wrong comment was moved. - PR Review Comment:

Re: RFR: 8321053: Use ByteArrayInputStream.buf directly when parameter of transferTo() is trusted [v4]

2023-12-05 Thread Alan Bateman
On Tue, 5 Dec 2023 07:37:39 GMT, Markus KARG wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8321053: instanceof -> == > > src/java.base/share/classes/java/io/ByteArrayInputStream.java line 213: > >> 211:

Re: RFR: 8318809: java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java shows intermittent failures on linux ppc64le and aarch64

2023-12-04 Thread Alan Bateman
On Wed, 22 Nov 2023 20:48:05 GMT, Viktor Klang wrote: > We've seen some rare failures of the CLQ Whitebox test on "less-strong" > architectures, and the only thing which -- given my research -- could be the > culprit is spuriously failing weakCAS (which is correct in terms of the >

RFR: 8321270: Virtual Thread.yield consumes parking permit

2023-12-04 Thread Alan Bateman
When a virtual thread continues after Thread.yield it currently consumes thread's parking permit. This is an oversight, the parking permit should only be consumed when continuing after park. The changes are straight-forward. The internal "RUNNABLE" state is replaced with UNPARKED and YIELDED

Re: RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem [v3]

2023-12-04 Thread Alan Bateman
On Mon, 4 Dec 2023 15:00:56 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add fail statement > > src/java.base/share/classes/java/lang/foreign/SymbolLookup.java line 288: > >> 286: *

<    1   2   3   4   5   6   7   8   9   10   >