Re: RFR: 4799358: BufferOutputStream.write() should immediately throw IOExcept on closed stream

2023-08-21 Thread Alan Bateman
On Mon, 21 Aug 2023 14:26:39 GMT, Vyom Tewari wrote: > With the current implementation of BufferedOutputStream if you close the > stream and try to write to the closed stream BufferedOutputStream does not > throw an IOException until the internal buffer is full. To fix this issue i > added a

Re: RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock.

2023-08-21 Thread Alan Bateman
On Mon, 21 Aug 2023 06:48:18 GMT, David Holmes wrote: > How long is the file-lock typically held? How many such tests can run > concurrently? And how long do we retry for? It's typically the sync method when writing back the cached changes. I suspect the Unix implementation could be easily

Integrated: 8313290: Misleading exception message from STS.Subtask::get when task forked after shutdown

2023-08-19 Thread Alan Bateman
On Fri, 28 Jul 2023 20:33:01 GMT, Alan Bateman wrote: > This is a small issue with StructuredTaskScope. If the owner attempts to fork > a subtask and the task scope is shutdown then the implementation doesn't > currently force the owner to join when it's the first fork in a

Re: [jdk21] RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size)

2023-08-18 Thread Alan Bateman
On Fri, 18 Aug 2023 17:25:10 GMT, Ben Taylor wrote: > Backport is clean, all tests in test/jdk/java/util/zip pass. JDK 21 is at RC, only P1 issues with approval. There is already a fix request for jdk21u. The 21.0.1 release is only a few weeks after JDK 21. - PR Comment:

Re: RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock.

2023-08-18 Thread Alan Bateman
On Fri, 18 Aug 2023 12:02:05 GMT, Matthias Baesken wrote: > I checked the usage of sun/nio/fs/UnixConstants.java and seems we would need > to make the class public and an additional export for this like > > ``` > exports sun.nio.fs to > +java.prefs, > jdk.net; > ``` > >

Re: RFR: 8313290: Misleading exception message from STS.Subtask::get when task forked after shutdown [v2]

2023-08-17 Thread Alan Bateman
On Wed, 16 Aug 2023 16:16:12 GMT, Paul Sandoz wrote: > Very minor suggestion, up to you. We could change the exception message > thrown by `SubtaskImpl::get` to: > > > Subtask result is unavailable or did not complete successfully > > (Similar change for `SubtaskImpl::exception`.) That leans

Re: RFR: 8313290: Misleading exception message from STS.Subtask::get when task forked after shutdown [v2]

2023-08-17 Thread Alan Bateman
ling Subtask::get throws ISE with > the wrong exception message. > > The existing test for this API is updated to remove a duplicate test and also > fix two tasks that didn't call join. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The inc

Re: RFR: 8310815: Clarify the name of the main class, services and provider classes in module descriptor

2023-08-17 Thread Alan Bateman
On Wed, 16 Aug 2023 18:42:00 GMT, Mandy Chung wrote: > Clarify the spec of `ModuleDescriptor::mainClass`, `ModuleDescriptor::uses`, > `ModuleDescriptor.Provides::service` and > `ModuleDescriptor.Provides::providers` to return a binary name. > > This PR also fixes JDK-8314449 to update the

Re: RFR: JDK-8314489: Add javadoc index entries for java.lang.Math terms

2023-08-17 Thread Alan Bateman
On Thu, 17 Aug 2023 04:52:59 GMT, Joe Darcy wrote: > Use of javadoc search index feature; I'll re-flow paragraphs before pushing > once the wording is agreed to. This looks okay to me. You might want to move the "For a" on L58 to the next line to avoid L58 stick out too much, up to you.

Integrated: 8314280: StructuredTaskScope.shutdown should document that the state of completing subtasks is not defined

2023-08-17 Thread Alan Bateman
On Tue, 15 Aug 2023 16:21:55 GMT, Alan Bateman wrote: > This is a docs only change. The specification for > StructuredTaskScope.shutdown should make it clear that the state of subtasks > that are completing (with a result or exception) at around the time of > shutdown is

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-16 Thread Alan Bateman
On Wed, 16 Aug 2023 14:45:25 GMT, Sergey Bylokhov wrote: > I disagree for a few reasons, using that property will completely disable the > appropriate patch for a fix in the CPU, and it will be possible to > have/accept some malicious zip files which may trigger some unfortunate > behavior.

Re: RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock.

2023-08-16 Thread Alan Bateman
On Wed, 16 Aug 2023 14:44:23 GMT, Matthias Baesken wrote: > Hi Alan, I am not sure what 'interesting file path' you are referring to. I > only added an integer (errno/errcode) and at one place fix strings > shared/nonshared to the exception message. Oh I see, I thought you wanted to include

Re: RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock.

2023-08-16 Thread Alan Bateman
On Wed, 16 Aug 2023 13:36:38 GMT, Matthias Baesken wrote: > We run into some BackingStoreException: Couldn't get file lock. e.g. here : > > [JShell] Exception in thread "main" java.lang.IllegalStateException: > java.util.prefs.BackingStoreException: Couldn't get file lock. > [JShell] at >

Re: RFR: 8314129: Make fields final in java.util.Scanner

2023-08-16 Thread Alan Bateman
On Thu, 13 Jul 2023 08:57:05 GMT, Andrey Turbanov wrote: > Made a few fields `final` in java.util.Scanner. > Also made `digits`, `non0Digit`, `SIMPLE_GROUP_INDEX` as `static.` Marked as reviewed by alanb (Reviewer). - PR Review:

Re: RFR: 8314209: Wrong @since tag for RandomGenerator::equiDoubles

2023-08-16 Thread Alan Bateman
On Wed, 16 Aug 2023 08:07:05 GMT, Raffaello Giulietti wrote: > Please review this trivial typo. > TIA Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/15303#pullrequestreview-1580051924

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-16 Thread Alan Bateman
On Tue, 15 Aug 2023 23:13:00 GMT, Volker Simonis wrote: > That file is accepted by zip, by the latest JDK8u382, by the JDK20 GA, and > rejected by the 20.0.2. That is a regression in the latest update of JDK11+ > which we trying to solve here. Have you tested your ZIP file with

Re: RFR: 8314321: Remove unused field jdk.internal.util.xml.impl.Attrs.mAttrIdx

2023-08-16 Thread Alan Bateman
On Tue, 15 Aug 2023 20:13:18 GMT, Andrey Turbanov wrote: > A field `char mAttrIdx` in the `jdk.internal.util.xml.impl.Attrs` class is > unused and can be removed. Marked as reviewed by alanb (Reviewer). - PR Review:

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v9]

2023-08-16 Thread Alan Bateman
On Tue, 15 Aug 2023 18:43:36 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when

RFR: 8313290: Misleading exception message from STS.Subtask::get when task forked after shutdown

2023-08-16 Thread Alan Bateman
This is a small issue with StructuredTaskScope. If the owner attempts to fork a subtask and the task scope is shutdown then the implementation doesn't currently force the owner to join when it's the first fork in a new round of forking. The result is that broken code calling Subtask::get throws

RFR: 8314280: StructuredTaskScope.shutdown should document that the state of completing subtasks is not defined

2023-08-16 Thread Alan Bateman
This is a docs only change. The specification for StructuredTaskScope.shutdown should make it clear that the state of subtasks that are completing (with a result or exception) at around the time of shutdown is not defined. The state of a completing subtask may transition to a terminal state, it

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v8]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 16:41:35 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 16:36:34 GMT, Lance Andersen wrote: > Reworked similar to above. Thanks. Related is that there aren't tests in this PR that run with -Djdk.util.zip.disableZip64ExtraFieldValidation and -D"jdk.util.zip.disableZip64ExtraFieldValidation=true to check that zip implementations

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 00:07:01 GMT, Sergey Bylokhov wrote: > try this example, zip -T passed, unzip works fine, but openjdk rejects it. Are you arguing to drop all checking of the extra fields? It's not clear to me that this PR should be do that as it has a lot of implications. -

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Mon, 14 Aug 2023 21:21:30 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v2]

2023-08-15 Thread Alan Bateman
On Mon, 14 Aug 2023 21:38:02 GMT, Volker Simonis wrote: >> Hi Volker, >> >> I understand your point and I had done that previously but decided I did >> not like the flow of the code that way which is why I moved the check. I >> prefer to leave it as is. > > I don't think this is a

Re: [jdk21] RFR: 8313312: Add missing classpath exception copyright header

2023-08-15 Thread Alan Bateman
On Tue, 8 Aug 2023 15:55:10 GMT, Roger Riggs wrote: > The same copyright updates are needed in JDK21. JDK 21 is in the RC phase so I assume this should re-targeted to jdk21u. - PR Comment: https://git.openjdk.org/jdk21/pull/166#issuecomment-1678567910

Re: RFR: 8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base [v2]

2023-08-15 Thread Alan Bateman
On Wed, 12 Jul 2023 15:06:36 GMT, Glavo wrote: >> Clean up misuses of `toLowerCase()`/`toUpperCase()` in java.base. > > Glavo has updated the pull request incrementally with one additional commit > since the last revision: > > Revert StreamTokenizer.java Now that the incompatible change to

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size)

2023-08-14 Thread Alan Bateman
On Mon, 14 Aug 2023 14:52:00 GMT, Lance Andersen wrote: > This PR updates the extra field validation added as part of > [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with > issues seen with 3rd party tools/libraries where a ZipException may be > encountered when opening

Re: RFR: JDK-8313764: Offer JVM HS functionality to shared lib load operations done by the JDK codebase

2023-08-14 Thread Alan Bateman
On Mon, 14 Aug 2023 07:48:00 GMT, Matthias Baesken wrote: > Currently there is a number of functionality that would be interesting to > have for shared lib load operations in the JDK C code. > Some examples : > Events::log_dll_message for hs-err files reporting > JFR event NativeLibraryLoad >

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-13 Thread Alan Bateman
On Fri, 11 Aug 2023 15:32:58 GMT, Aleksey Shipilev wrote: >> When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), >> I realized there are no targeted tests for `FileDescriptor.sync` that can be >> used to qualify the changes in that area. >> >> Additionally, we use

Re: RFR: 8314120: Add tests for FileDescriptor.sync

2023-08-11 Thread Alan Bateman
On Thu, 10 Aug 2023 15:45:12 GMT, Aleksey Shipilev wrote: > When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), > I realized there are no targeted tests for `FileDescriptor.sync` that can be > used to qualify the changes in that area. > > Additionally, we use

Re: RFR: 8313657 : com.sun.jndi.ldap.Connection.cleanup does not close connections on SocketTimeoutErrors

2023-08-04 Thread Alan Bateman
On Thu, 3 Aug 2023 17:32:43 GMT, Weibing Xiao wrote: > com.sun.jndi.ldap.Connection::leanup does not close the underlying socket if > the is an IOException generation when the output stream was flushing the > buffer. > > Please refer to the bug https://bugs.openjdk.org/browse/JDK-8313657.

Re: RFR: 8312976: MatchResult produces StringIndexOutOfBoundsException for groups outside match [v4]

2023-08-02 Thread Alan Bateman
On Mon, 31 Jul 2023 18:38:30 GMT, Raffaello Giulietti wrote: >> Fixes a bug showing up after >> [JDK-8132995](https://bugs.openjdk.org/browse/JDK-8132995) when there are >> capturing groups outside the match. > > Raffaello Giulietti has updated the pull request with a new target base due >

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v4]

2023-08-02 Thread Alan Bateman
On Wed, 2 Aug 2023 18:19:27 GMT, Tim Prinzing wrote: > I believe this has all requested changes or has separate bug reports to > address changes yet needing to be made. > https://bugs.openjdk.org/browse/JDK-8310979 - better exception handling > https://bugs.openjdk.org/browse/JDK-8310978 -

Integrated: 8311989: Test java/lang/Thread/virtual/Reflection.java timed out

2023-08-02 Thread Alan Bateman
On Fri, 28 Jul 2023 15:44:54 GMT, Alan Bateman wrote: > This is a test only change to a test that exercises core reflection from > virtual threads. One of the tests (testNewInstance6) uses a custom scheduler > in setup to check that calling a constructor reflectively, where the >

Re: RFR: 8313274: Failure building java.base-jmod target

2023-08-01 Thread Alan Bateman
On Tue, 1 Aug 2023 09:01:49 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to address the build > failure noted in https://bugs.openjdk.org/browse/JDK-8313274? > > The build failure is consistently reproducible with `--with-jobs=1`. Martin, > in that JBS

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v4]

2023-07-31 Thread Alan Bateman
On Thu, 27 Jul 2023 19:09:00 GMT, Matias Saavedra Silva wrote: >> Currently we exit the VM after static dumping with >> `MetaspaceShared::exit_after_static_dump()`. >> >> >> // We have finished dumping the static archive. At this point, there may be >> pending VM >> // operations. We

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v3]

2023-07-30 Thread Alan Bateman
On Fri, 28 Jul 2023 19:59:15 GMT, Brian Burkhalter wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > Brian Burkhalter has updated the pull request incrementally with

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v3]

2023-07-30 Thread Alan Bateman
On Sun, 30 Jul 2023 04:54:32 GMT, Vyom Tewari wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 6478546: Move buffer clamping up to Java layer; correct read behavior to >> match legacy > >

RFR: 8311989: Test java/lang/Thread/virtual/Reflection.java timed out

2023-07-29 Thread Alan Bateman
This is a test only change to a test that exercises core reflection from virtual threads. One of the its tests (testNewInstance6) uses a custom scheduler in setup to check that calling a constructor reflectively, where the constructor parks, doesn't pin the underlying carrier. The test

Re: CFV: New Core Libraries Group Member: Brian Burkhalter

2023-07-28 Thread Alan Bateman
Vote: yes

Re: CFV: New Core Libraries Group Member: Brent Christian

2023-07-28 Thread Alan Bateman
Vote: yes

Re: [jdk21] RFR: 8313260: JDK21: ProblemList java/lang/ScopedValue/StressStackOverflow.java on linux-x86

2023-07-28 Thread Alan Bateman
On Thu, 27 Jul 2023 18:21:45 GMT, Sergey Bylokhov wrote: > This patch adds the java/lang/ScopedValue/StressStackOverflow.java to the > problem list for linux-x86 where it intermittently fails on a GA, ex: > https://github.com/openjdk/jdk21/pull/148 > > This is only for JDK 21, test passes on

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v2]

2023-07-27 Thread Alan Bateman
On Thu, 27 Jul 2023 06:07:42 GMT, David Holmes wrote: >> Yes, if you change it CHECK_EXCEPTION_LEAVE(1)then any pending exception >> will be printed and it will exit with 1; if there is no pending exception >> then it exit with the value of `ret` as the exit status, which will be 0 >> here. >

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-27 Thread Alan Bateman
On Thu, 27 Jul 2023 01:30:01 GMT, Serguei Spitsyn wrote: > Nit: normal indent for native code is 2. The .c files I sampled in test/hotspot/jtreg/serviceability/jvmti/** used 4, either is okay as this is just two tiny JNI functions. - PR Review Comment:

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v2]

2023-07-26 Thread Alan Bateman
On Wed, 26 Jul 2023 21:52:04 GMT, Matias Saavedra Silva wrote: >> src/java.base/share/native/libjli/java.c line 464: >> >>> 462: if (dumpSharedSpaces) { >>> 463: CHECK_EXCEPTION_LEAVE(0); >>> 464: LEAVE(); >> >> What is exit status ($?) when -Xshare:dump fails. It looks like

Re: [jdk21] Integrated: 8313208: ProblemList java/util/concurrent/tck/JSR166TestCase.java on select platforms

2023-07-26 Thread Alan Bateman
On Wed, 26 Jul 2023 19:22:08 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/tck/JSR166TestCase.java on > select platforms. JSR166TestCase.java runs >4000 tests so excluding this discussion is not good. Maybe JDK-8312980 needs to be bumped to a P1/P2 or a

Re: [jdk21] RFR: 8313193: ProblemList java/util/concurrent/SynchronousQueue/Fairness.java on X64

2023-07-26 Thread Alan Bateman
On Wed, 26 Jul 2023 15:47:48 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > java/util/concurrent/SynchronousQueue/Fairness.java on X64. Are all the sightings -XX:+UseZGC -Xcomp? Only asking in case you meant to add it to ProblemList-zgc.txt. - PR Comment:

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v2]

2023-07-26 Thread Alan Bateman
On Tue, 25 Jul 2023 18:48:58 GMT, Matias Saavedra Silva wrote: >> Currently we exit the VM after static dumping with >> `MetaspaceShared::exit_after_static_dump()`. >> >> >> // We have finished dumping the static archive. At this point, there may be >> pending VM >> // operations. We

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-26 Thread Alan Bateman
On Wed, 26 Jul 2023 12:20:49 GMT, David Holmes wrote: >> test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadState/GetThreadStateTest.java >> line 133: >> >>> 131: } finally { >>> 132: thread.join(); >>> 133: Reference.reachabilityFence(lock); >> >> It

Re: [jdk21] RFR: 8309032: jpackage does not work for module projects unless --module-path is specified

2023-07-26 Thread Alan Bateman
On Tue, 25 Jul 2023 07:09:55 GMT, airsquared wrote: > I see. I'll create a PR there. Thanks. Thanks, I assume this PR can be closed. - PR Comment: https://git.openjdk.org/jdk21/pull/140#issuecomment-1651454738

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-26 Thread Alan Bateman
On Tue, 25 Jul 2023 23:50:07 GMT, Brian Burkhalter wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > Brian Burkhalter has updated the pull request incrementally with

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-26 Thread Alan Bateman
On Wed, 26 Jul 2023 00:00:33 GMT, Brian Burkhalter wrote: > There was no dropping of the file system cache. I would think this would have > more of an effect on measuring the throughput of writing than reading. In that case, I assume the benchmarks are just reading from the file system cache

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-26 Thread Alan Bateman
On Wed, 26 Jul 2023 06:17:13 GMT, Vyom Tewari wrote: > If i am reading code correctly then with the new implementation, until client > issue the next "FIS.read" he may or may not know if there was exception > pending in previous 'read' call ?. > I am not sure in case of partial read we have

Re: [jdk21] RFR: 8309032: jpackage does not work for module projects unless --module-path is specified

2023-07-25 Thread Alan Bateman
On Tue, 25 Jul 2023 06:56:26 GMT, airsquared wrote: > How likely is it that this can get approved in RDP 2? This is only a tiny > change that fixes a minor bug in jpackage. Unlikely as this is a P4 and not a regression in JDK 21. I think you should be aiming for jdk21u with this backport.

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Alan Bateman
On Tue, 25 Jul 2023 02:09:29 GMT, Brian Burkhalter wrote: > It's based on micro-benchmarks. Having the loops in Java reduces throughput > but allocating memory using `malloc(len)` also reduces throughput as `len` > gets larger and this threshold appears to balance the two. Are these micro

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-24 Thread Alan Bateman
On Tue, 25 Jul 2023 05:21:45 GMT, David Holmes wrote: > Why handle TIMED this way instead of just making TIMED_PARKED/PARKING states? Been there but it is 3 additional states and a lot simpler to just use the additional state bits, like we do with SUSPENDED. We might use another one for

RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-24 Thread Alan Bateman
Thread::getState is an API for monitoring and management purposes to report the thread state. If a virtual thread is parked with LockSupport.parkNanos, its state is reported as WAITING when it should be TIMED_WAITING. JVM TI GetThreadState has the same issue in that it returns

Re: RFR: 8311653: Modify -XshowSettings launcher behavior

2023-07-24 Thread Alan Bateman
On Mon, 24 Jul 2023 16:00:52 GMT, Sean Coffey wrote: > Modify the -XshowSettings launcher option to print non-verbose settings > details of all components by default. Verbose settings details will be > printed via the -XshowSettings:all option. Modify the -XshowSettings option > to reject bad

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Alan Bateman
On Mon, 24 Jul 2023 09:16:23 GMT, Vyom Tewari wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > src/java.base/share/native/libjava/io_util.c line 99: > >> 97:

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Alan Bateman
On Fri, 21 Jul 2023 22:40:00 GMT, Brian Burkhalter wrote: > Limit native memory allocation and move write loop from the native layer into > Java. This change should make the OOME reported in the issue much less likely. src/java.base/share/classes/java/io/FileOutputStream.java line 366: > 364:

Re: [jdk21] RFR: 8309032: jpackage does not work for module projects unless --module-path is specified

2023-07-23 Thread Alan Bateman
On Thu, 20 Jul 2023 02:34:05 GMT, airsquared wrote: > 8309032: jpackage does not work for module projects unless --module-path is > specified JDK 21 is in rampdown phase two so only P1/P2 bugs (with approval) at this time, maybe this is one for JDK 21u instead. - PR Comment:

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v10]

2023-07-20 Thread Alan Bateman
On Thu, 20 Jul 2023 10:29:25 GMT, Chen Liang wrote: > The Unsafe-based writing will be used by `Integer.toString` and > `Long.toString` as well; in those cases, will creating a ByteBuffer wrapper > be overkill? Integer/Long are very core classes so I assume they can use Unsafe if needed,

Re: RFR: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final

2023-07-20 Thread Alan Bateman
On Tue, 18 Jul 2023 20:06:56 GMT, Andrey Turbanov wrote: > Found opportunity to make static `ServiceLoader.LANG_ACCESS` field `final`. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14926#pullrequestreview-1538485598

Re: RFR: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final

2023-07-19 Thread Alan Bateman
On Tue, 18 Jul 2023 20:06:56 GMT, Andrey Turbanov wrote: > Found opportunity to make static `ServiceLoader.LANG_ACCESS` field `final`. src/java.base/share/classes/java/util/ServiceLoader.java line 426: > 424: > 425: private static final JavaLangAccess LANG_ACCESS = > 426:

Re: RFR: 8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6 [v4]

2023-07-19 Thread Alan Bateman
On Wed, 19 Jul 2023 07:05:45 GMT, Jaikiran Pai wrote: > I had initially considered that but had noticed that there's a small > difference between the generic warning message "Warning: %s option is > deprecated and may be removed in a future release." printed by the launcher > and the one

Re: RFR: 8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6 [v5]

2023-07-19 Thread Alan Bateman
On Wed, 19 Jul 2023 07:05:51 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to deprecate for >> removal the `-Xdebug` option and `-debug` option of the `java` command? >> This addresses https://bugs.openjdk.org/browse/JDK-8227229. >> >> As noted in the

Re: RFR: 8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6 [v5]

2023-07-19 Thread Alan Bateman
On Wed, 19 Jul 2023 07:07:40 GMT, Jaikiran Pai wrote: > I would like inputs on the > test/hotspot/jtreg/runtime/6294277/SourceDebugExtension.java test. That test > launches java passing it the -Xdebug option and was introduced as part of > https://bugs.openjdk.org/browse/JDK-6294277. -Xdebug

Re: RFR: 8308591: JLine as the default Console provider [v5]

2023-07-18 Thread Alan Bateman
On Mon, 17 Jul 2023 20:46:32 GMT, Naoto Sato wrote: >> This is to bring the JLine-based Console implementation as the default, >> which was the initial intention in >> [JDK-8295803](https://bugs.openjdk.org/browse/JDK-8295803). A corresponding >> CSR has also been drafted. > > Naoto Sato has

Re: RFR: 8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6 [v3]

2023-07-18 Thread Alan Bateman
On Tue, 18 Jul 2023 07:58:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to deprecate for >> removal the `-Xdebug` option and `-debug` option of the `java` command? >> This addresses https://bugs.openjdk.org/browse/JDK-8227229. >> >> As noted in the

Re: RFR: 8312151: Deprecate for removal the -Xdebug option

2023-07-18 Thread Alan Bateman
On Tue, 18 Jul 2023 06:59:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to deprecate for > removal the `-Xdebug` option of the `java` command? This addresses > https://bugs.openjdk.org/browse/JDK-8312151? > > As noted in the JBS issue this option is

Integrated: 8312127: FileDescriptor.sync should temporarily increase parallelism

2023-07-17 Thread Alan Bateman
On Sat, 15 Jul 2023 13:54:46 GMT, Alan Bateman wrote: > If FileDescriptor::sync is invoked by a virtual thread then it doesn't > release its carrier to do other work while modifications are written to the > file system. For cases like this, parallelism should be temporarily

RFR: 8312127: FileDescriptor.sync should temporarily increase parallelism

2023-07-17 Thread Alan Bateman
If FileDescriptor::sync is invoked by a virtual thread then it doesn't release its carrier to do other work while modifications are written to the file system. For cases like this, parallelism should be temporarily increased for the duration of the operation. This one is somewhat legacy as it's

Re: RFR: 8308591: JLine as the default Console provider

2023-07-17 Thread Alan Bateman
On Thu, 1 Jun 2023 18:53:21 GMT, Naoto Sato wrote: > This is to bring the JLine-based Console implementation as the default, which > was the initial intention in > [JDK-8295803](https://bugs.openjdk.org/browse/JDK-8295803). A corresponding > CSR has also been drafted. This looks quite good.

Re: Questions about using `assert` in Java

2023-07-17 Thread Alan Bateman
On 15/07/2023 17:53, Daohan Qu wrote: : Although the |assert|​ keyword has been around for a long time and is handy for invariant checks, it does not seem to be widely used. For example, in the famous |j.u.c|​ packages, nearly all |assert|​ statements are commented out [1]. My questions are,

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v23]

2023-07-16 Thread Alan Bateman
On Sun, 16 Jul 2023 06:24:59 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v21]

2023-07-15 Thread Alan Bateman
On Sat, 15 Jul 2023 00:47:35 GMT, Jaikiran Pai wrote: >> Hello Alan, >> >>> Files.isSameFile checks the file contents, this doesn't look right here. >> >> I was always under the impression that `Files.isSameFile()` only checks file >> paths and attributes for testing whether they are same.

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v21]

2023-07-14 Thread Alan Bateman
On Thu, 13 Jul 2023 11:46:39 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Re: RFR: 8312089: Simplify and modernize equals, hashCode, and compareTo in java.nio and implementation code [v2]

2023-07-14 Thread Alan Bateman
On Fri, 14 Jul 2023 13:16:27 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals, hashCode, and compareTo for in java.nio and implementation code. >> >> Please note, test results are pending. >> >> Additional notes: >> >> * This PR

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v21]

2023-07-14 Thread Alan Bateman
On Thu, 13 Jul 2023 11:46:39 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Integrated: 8311992: Test java/lang/Thread/virtual/JfrEvents::testVirtualThreadPinned failed

2023-07-14 Thread Alan Bateman
On Fri, 14 Jul 2023 09:42:05 GMT, Alan Bateman wrote: > This is a test only update to a test for the JFR event > jdk.VirtualThreadPinned event. The test we added in JDK 19 does 3 sleeps, one > with a small duration, twice with a long duration. The test enables the > event with

Re: RFR: 8312089: Simplify and modernize equals, hashCode, and compareTo in java.nio and implementation code [v2]

2023-07-14 Thread Alan Bateman
On Fri, 14 Jul 2023 14:42:47 GMT, Pavel Rappo wrote: > > * java.nio.charset.Charset#compareTo seems **inconsistent** with equals. If > > so, I cannot see where that inconsistency is specified. > > @AlanBateman, what do you think of that? For convenience, let me paste here > relevant source

Re: RFR: 8312089: Simplify and modernize equals, hashCode, and compareTo in java.nio and implementation code

2023-07-14 Thread Alan Bateman
On Fri, 14 Jul 2023 12:06:29 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals, hashCode, and compareTo for in java.nio and implementation code. > > Please note, test results are pending. > > Additional notes: > > * This PR saves a

Re: RFR: 8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base [v2]

2023-07-14 Thread Alan Bateman
On Wed, 12 Jul 2023 16:17:49 GMT, Glavo wrote: >> Maybe a small suggestion to make it clear whats wanted here. In other >> projects I am involved in (Apache Lucene/Solr, Apache TIKA, PostgresSQL >> JDBC, Checkstyle itsself, Elasticserach/Opensearch), which use the >> [forbiddenapis

RFR: 8311992: Test java/lang/Thread/virtual/JfrEvents::testVirtualThreadPinned failed

2023-07-14 Thread Alan Bateman
This is a test only update to a test for the JFR event jdk.VirtualThreadPinned event. The test we added in JDK 19 does 3 sleeps, one with a small duration, twice with a long duration. The test enables the event with a threshold of 500ms and expects there will be two events recorded; no event

Re: RFR: JDK-8308398 Move SunEC crypto provider into java.base [v4]

2023-07-14 Thread Alan Bateman
On Fri, 14 Jul 2023 03:45:47 GMT, Anthony Scarpino wrote: >> Hi, >> >> I need a code review for moving the contents of the jdk.crypto.ec module >> into java.base. This moves the SunEC JCE Provider (Elliptic Curve) into >> java.base. EC has always been separate from the base module/pkg

[jdk21] Integrated: 8311867: StructuredTaskScope.shutdown does not interrupt newly started threads

2023-07-13 Thread Alan Bateman
On Thu, 13 Jul 2023 15:58:24 GMT, Alan Bateman wrote: > Clean backport of https://git.openjdk.org/jdk/pull/14833 This pull request has now been integrated. Changeset: 281aee96 Author: Alan Bateman URL: https://git.openjdk.org/jdk21/commit/281aee968aae70005f64dd97fa288c7ba0490

[jdk21] RFR: 8311867: StructuredTaskScope.shutdown does not interrupt newly started threads

2023-07-13 Thread Alan Bateman
Clean backport of https://git.openjdk.org/jdk/pull/14833 - Commit messages: - Backport 92a04e201e68aa4d682053cef4b36180ec5620f5 Changes: https://git.openjdk.org/jdk21/pull/123/files Webrev: https://webrevs.openjdk.org/?repo=jdk21=123=00 Issue:

Re: [jdk21] RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-13 Thread Alan Bateman
On Thu, 13 Jul 2023 08:31:37 GMT, Aleksey Shipilev wrote: > Clean backport. Fixes the regression introduced in JDK 21. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk21/pull/120#pullrequestreview-1527931960

Integrated: 8311867: StructuredTaskScope.shutdown does not interrupt newly started threads

2023-07-13 Thread Alan Bateman
On Tue, 11 Jul 2023 17:03:26 GMT, Alan Bateman wrote: > StructuredTaskScope.shutdown can sometimes not interrupt the thread for a > newly forked subtask, leading to join blocking until subtask completes. The > "hang" can be duplicated with a stress test that shuts d

Integrated: 8311926: java/lang/ScopedValue/StressStackOverflow.java takes 9mins in tier1

2023-07-12 Thread Alan Bateman
On Wed, 12 Jul 2023 09:00:33 GMT, Alan Bateman wrote: > The test runs 3 times, each run is for 3 minutes so 9 mins in total and too > long for tier1. Here's the times for test/jdk:tier1_part1 that I see locally: > > > ==

Re: RFR: 8311943: Cleanup usages of toLowerCase() and toUpperCase() in java.base

2023-07-12 Thread Alan Bateman
On Mon, 3 Jul 2023 20:53:34 GMT, Glavo wrote: > Clean up misuses of `toLowerCase()`/`toUpperCase()` in java.base. src/java.base/share/classes/java/io/StreamTokenizer.java line 632: > 630: sval = String.copyValueOf(buf, 0, i); > 631: if (forceLower) > 632:

Re: RFR: 8311867: StructuredTaskScope.shutdown does not interrupt newly started threads

2023-07-12 Thread Alan Bateman
On Wed, 12 Jul 2023 11:47:45 GMT, Jaikiran Pai wrote: > As for the 15 "afterShutdown" forks() that follow, they would already notice > that the scope is shutdown and won't start the new threads. > Did I misunderstand this test? The test arranges for a subtask to do shutdown, it's not done by

RFR: 8311926: java/lang/ScopedValue/StressStackOverflow.java takes 9mins in tier1

2023-07-12 Thread Alan Bateman
The test runs 3 times, each run is for 3 minutes so 9 mins in total and too long for tier1. Here's the times for test/jdk:tier1_part1 that I see locally: == Test summary == TEST TOTAL PASS

RFR: 8311867: StructuredTaskScope.shutdown does not interrupt newly started threads

2023-07-12 Thread Alan Bateman
StructuredTaskScope.shutdown can sometimes not interrupt the thread for a newly forked subtask, leading to join blocking until subtask completes. The "hang" can be duplicated with a stress test that shuts down the scope while a long running subtask is being forked. The bug is in the underlying

[jdk21] Integrated: 8310892: ScopedValue throwing StructureViolationException should be clearer

2023-07-12 Thread Alan Bateman
On Tue, 11 Jul 2023 17:21:13 GMT, Alan Bateman wrote: > Clean backport of https://git.openjdk.org/jdk/pull/14679 This pull request has now been integrated. Changeset: 3bb37508 Author: Alan Bateman URL: https://git.openjdk.org/jdk21/commit/3bb375080f0ff205a5a200d0355dbd517d29c

[jdk21] RFR: 8310892: ScopedValue throwing StructureViolationException should be clearer

2023-07-11 Thread Alan Bateman
Clean backport of https://git.openjdk.org/jdk/pull/14679 - Commit messages: - Backport 623cfcd04b0c4662e614cb6a3bf52536abc02d5a Changes: https://git.openjdk.org/jdk21/pull/113/files Webrev: https://webrevs.openjdk.org/?repo=jdk21=113=00 Issue:

Re: RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1 [v4]

2023-07-11 Thread Alan Bateman
On Tue, 11 Jul 2023 17:31:24 GMT, Brian Burkhalter wrote: >> Add a disclaimer to `java.io.DataOutputStream` to the effect that it makes >> no guarantee as to how the underlying output stream actually writes the >> bytes provided to it. > > Brian Burkhalter has updated the pull request

Re: RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1 [v3]

2023-07-11 Thread Alan Bateman
On Tue, 11 Jul 2023 16:48:24 GMT, Brian Burkhalter wrote: >> Add a disclaimer to `java.io.DataOutputStream` to the effect that it makes >> no guarantee as to how the underlying output stream actually writes the >> bytes provided to it. > > Brian Burkhalter has updated the pull request

Re: RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1 [v2]

2023-07-11 Thread Alan Bateman
On Fri, 7 Jul 2023 15:44:06 GMT, Brian Burkhalter wrote: >> Add a disclaimer to `java.io.DataOutputStream` to the effect that it makes >> no guarantee as to how the underlying output stream actually writes the >> bytes provided to it. > > Brian Burkhalter has updated the pull request

<    3   4   5   6   7   8   9   10   11   12   >