Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v3]

2022-08-17 Thread Aleksey Shipilev
> We have a few reports that existing Weak* VarHandle tests are still flaky, > for example on large AArch64 machines or small RISC-V machines. > > The flakiness is intrinsic to the nature of Weak* operations under tests, > that can spuriously fail. The last attempt to fix these was > [JDK-81557

RFR: JDK-8292576: Improve wording of AccessFlag-related specs

2022-08-17 Thread Joe Darcy
Spec refinement, including acting on some feedback received for JDK-8266670: https://github.com/openjdk/jdk/pull/7445#discussion_r906846794 - Commit messages: - JDK-8292576: Improve wording of AccessFlag-related specs Changes: https://git.openjdk.org/jdk/pull/9912/files Webrev: ht

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v2]

2022-08-17 Thread Yadong Wang
On Tue, 16 Aug 2022 15:48:15 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operations under tests, >> that can

Re: RFR: 8292016: Rework JLI_ReportErrorMessageSys [v10]

2022-08-17 Thread David Holmes
On Tue, 16 Aug 2022 10:23:31 GMT, Julian Waters wrote: >> Second attempt at resolving >> [JDK-8292016](https://bugs.openjdk.org/browse/JDK-8292016) with a less >> intrusive approach this time >> >> Side note: While it might be preferred to remove this entirely, other areas >> of the JDK also

Re: RFR: 8291760: PipelineLeaksFD.java still fails: More or fewer pipes than expected

2022-08-17 Thread Jaikiran Pai
On Wed, 17 Aug 2022 15:31:14 GMT, Roger Riggs wrote: > Revised test to check and close all of the streams used in the pipeline. > > The test now checks the content length and closes each stdout and stderr > stream. > > The previous technique to redirect stderr to stdout was ineffective because

Re: RFR: 8291760: PipelineLeaksFD.java still fails: More or fewer pipes than expected

2022-08-17 Thread Jaikiran Pai
On Wed, 17 Aug 2022 15:31:14 GMT, Roger Riggs wrote: > Revised test to check and close all of the streams used in the pipeline. > > The test now checks the content length and closes each stdout and stderr > stream. > > The previous technique to redirect stderr to stdout was ineffective because

Re: RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]" [v2]

2022-08-17 Thread Jaikiran Pai
On Wed, 17 Aug 2022 23:11:23 GMT, Joe Darcy wrote: >> The use of lambda's in the initialization of AccessFlag runs afoul of CDS in >> some cases due to occurring early in the platform's initialization. Instead >> of lambdas, using anonymous classes gets around the issue. >> >> Clean tier1 and

Re: RFR: 8291118: [vectorapi] Optimize the implementation of lanewise FIRST_NONZERO

2022-08-17 Thread Xiaohong Gong
On Wed, 17 Aug 2022 15:16:24 GMT, Paul Sandoz wrote: > > > Much better to flip the operation and the receiver + first arg to the > > > blend. > > > > > > I'm not quite understand what the flip operation here mean. The current > > code is simple enough to me. Could you please show more details

Re: RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]" [v2]

2022-08-17 Thread Mandy Chung
On Wed, 17 Aug 2022 23:11:23 GMT, Joe Darcy wrote: >> The use of lambda's in the initialization of AccessFlag runs afoul of CDS in >> some cases due to occurring early in the platform's initialization. Instead >> of lambdas, using anonymous classes gets around the issue. >> >> Clean tier1 and

Re: RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]" [v2]

2022-08-17 Thread Joe Darcy
On Wed, 17 Aug 2022 22:53:55 GMT, Paul Sandoz wrote: > Its a shame. Code changes look good. I recommend adding an internal comment > within the top of the class declaration indicating why anon inner classes are > used, esp. since this there is more action at a distance than the usual case > wh

Re: RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]" [v2]

2022-08-17 Thread Joe Darcy
> The use of lambda's in the initialization of AccessFlag runs afoul of CDS in > some cases due to occurring early in the platform's initialization. Instead > of lambdas, using anonymous classes gets around the issue. > > Clean tier1 and tier 2 Mach 5 run with these changes. Joe Darcy has updat

Re: RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]"

2022-08-17 Thread Roger Riggs
On Wed, 17 Aug 2022 22:33:03 GMT, Joe Darcy wrote: > The use of lambda's in the initialization of AccessFlag runs afoul of CDS in > some cases due to occurring early in the platform's initialization. Instead > of lambdas, using anonymous classes gets around the issue. > > Clean tier1 and tier

Re: RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]"

2022-08-17 Thread Paul Sandoz
On Wed, 17 Aug 2022 22:33:03 GMT, Joe Darcy wrote: > The use of lambda's in the initialization of AccessFlag runs afoul of CDS in > some cases due to occurring early in the platform's initialization. Instead > of lambdas, using anonymous classes gets around the issue. > > Clean tier1 and tier

RFR: JDK-8292498: java/lang/invoke/lambda/LogGeneratedClassesTest.java failed with "AssertionError: only show error once expected [1] but found [0]"

2022-08-17 Thread Joe Darcy
The use of lambda's in the initialization of AccessFlag runs afoul of CDS in some cases due to occurring early in the platform's initialization. Instead of lambdas, using anonymous classes gets around the issue. Clean tier1 and tier 2 Mach 5 run with these changes. - Commit message

Why does CompletableFuture use ThreadPerTaskExecutor?

2022-08-17 Thread some-java-user-99206970363698485155
Hello, when ForkJoinPool.getCommonPoolParallelism() is < 2, CompletableFuture uses a ThreadPerTaskExecutor. As the name implies, that executor creates a new thread per task. My question is, why is it implemented this way? This approach can cause drastic performance decreases for applications maki

Reduce / avoid ConditionalSpecialCasing.lookUpTable temporary memory allocation

2022-08-17 Thread some-java-user-99206970363698485155
Hello, originally I reported this on the bug tracker, but was asked to first post this topic to this mailing list. I was told that afterwards the bug report will be created. The internal method `java.lang.ConditionalSpecialCasing#lookUpTable` is used for special case conversion rules, and is ca

Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]

2022-08-17 Thread Brian Burkhalter
On Wed, 17 Aug 2022 17:59:34 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull re

Integrated: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-17 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 15:06:50 GMT, Aleksey Shipilev wrote: > I noticed that current VarHandle/Unsafe test cases do not test the > always-failing cases. Strong CASes do test both always-success and > always-failing scenarios, while weak CASes only test spurious-failure tests. > We should be also

Re: RFR: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-17 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 15:06:50 GMT, Aleksey Shipilev wrote: > I noticed that current VarHandle/Unsafe test cases do not test the > always-failing cases. Strong CASes do test both always-success and > always-failing scenarios, while weak CASes only test spurious-failure tests. > We should be also

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats [v2]

2022-08-17 Thread Paul Sandoz
On Wed, 17 Aug 2022 17:35:39 GMT, Smita Kamath wrote: >> 8289552: Make intrinsic conversions between bit representations of half >> precision values and floats > > Smita Kamath has updated the pull request incrementally with one additional > commit since the last revision: > > Added a jmh mi

Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]

2022-08-17 Thread Brian Burkhalter
> On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last rev

Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]

2022-08-17 Thread Brian Burkhalter
On Fri, 12 Aug 2022 15:13:06 GMT, Brian Burkhalter wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8291911: Account for quotas on Windows. > > test/jdk/java/io/File/GetXSpace.java line 244: > >> 242:

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats

2022-08-17 Thread Smita Kamath
On Fri, 5 Aug 2022 16:36:23 GMT, Smita Kamath wrote: > 8289552: Make intrinsic conversions between bit representations of half > precision values and floats JMH results Before patch Benchmark (TESTSIZE) Mode Cnt Score Error Units Fp16Conv

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats [v2]

2022-08-17 Thread Smita Kamath
> 8289552: Make intrinsic conversions between bit representations of half > precision values and floats Smita Kamath has updated the pull request incrementally with one additional commit since the last revision: Added a jmh microbenchmark - Changes: - all: https://git.openjdk.

Re: RFR: JDK-8289510 : Improve test coverage for XPath Axes: namespace

2022-08-17 Thread Mahendra Chhipa
On Wed, 17 Aug 2022 15:32:49 GMT, Mahendra Chhipa wrote: > Added tests for namespace Axis. Tests incluse namspace expressions, namespace > node counts and namespace node scope. Hi @JoeWang-Java , Could you please review this PR. - PR: https://git.openjdk.org/jdk/pull/9906

RFR: JDK-8289510 : Improve test coverage for XPath Axes: namespace

2022-08-17 Thread Mahendra Chhipa
Added tests for namespace Axis. Tests incluse namspace expressions, namespace node counts and namespace node scope. - Commit messages: - JDK-8289510 : Improve test coverage for XPath Axes: namespace Changes: https://git.openjdk.org/jdk/pull/9906/files Webrev: https://webrevs.openj

RFR: 8291760: PipelineLeaksFD.java still fails: More or fewer pipes than expected

2022-08-17 Thread Roger Riggs
Revised test to check and close all of the streams used in the pipeline. The test now checks the content length and closes each stdout and stderr stream. The previous technique to redirect stderr to stdout was ineffective because the fd/stream was still created in the parent process. Created [

Re: RFR: 8291118: [vectorapi] Optimize the implementation of lanewise FIRST_NONZERO

2022-08-17 Thread Paul Sandoz
On Wed, 17 Aug 2022 09:48:29 GMT, Xiaohong Gong wrote: > > Much better to flip the operation and the receiver + first arg to the blend. > > I'm not quite understand what the flip operation here mean. The current code > is simple enough to me. Could you please show more details? Thanks a lot! I

Integrated: 8291828: Reduce runtime of java.util.stream microbenchmarks

2022-08-17 Thread Eric Caspole
On Wed, 3 Aug 2022 16:28:31 GMT, Eric Caspole wrote: > These changes reduce the default run time from about 1 day 22 hours to about > 6 hours with good stability we can use in weekly testing. This pull request has now been integrated. Changeset: 0fc92637 Author:Eric Caspole URL: ht

Re: RFR: 8291828: Reduce runtime of java.util.stream microbenchmarks [v2]

2022-08-17 Thread Eric Caspole
On Tue, 16 Aug 2022 14:35:14 GMT, Eric Caspole wrote: >> These changes reduce the default run time from about 1 day 22 hours to about >> 6 hours with good stability we can use in weekly testing. > > Eric Caspole has updated the pull request incrementally with one additional > commit since the l

Integrated: 8292352: 32-bit Windows build failures after JDK-8290059

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 11:16:06 GMT, Aleksey Shipilev wrote: > The affected file was added by > [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059), and the code that > fails the compilation is under `#ifdef _WIN32`, and it only (?) gets compiled > for tests. Looks like we really need the

Integrated: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning

2022-08-17 Thread Aleksey Shipilev
On Mon, 1 Aug 2022 11:46:52 GMT, Aleksey Shipilev wrote: > See bug report for reproducer and error message. The warning looks quite > superficial, and I initially suspected that it complains about `int len = > (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the > similar co

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 13:56:38 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the >> simil

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v2]

2022-08-17 Thread Vladimir Kempik
On Tue, 16 Aug 2022 15:48:15 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operations under tests, >> that can

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Thomas Stuefe
On Wed, 17 Aug 2022 11:05:50 GMT, Aleksey Shipilev wrote: > > I'm confused. How does adding EnsureCapacity in newString646_US fix the > > compiler warning mentioned in JBS? > > I think this is a bona-fide compiler static analyzer bug. GCC 12 compiles > this code fine. So, we have two options:

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Thomas Stuefe
On Mon, 15 Aug 2022 13:56:38 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the >> simil

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Aleksey Shipilev
On Wed, 17 Aug 2022 08:55:58 GMT, Thomas Stuefe wrote: > I'm confused. How does adding EnsureCapacity in newString646_US fix the > compiler warning mentioned in JBS? I think this is a bona-fide compiler static analyzer bug. GCC 12 compiles this code fine. So, we have two options: a) disable th

Re: RFR: 8291118: [vectorapi] Optimize the implementation of lanewise FIRST_NONZERO

2022-08-17 Thread Xiaohong Gong
On Mon, 15 Aug 2022 16:17:35 GMT, Paul Sandoz wrote: > Looks good. Thanks for looking at this patch @PaulSandoz ! > Much better to flip the operation and the receiver + first arg to the blend. I'm not quite understand what the flip operation here mean. The current code is simple enough to me

Integrated: 8292327: java.io.EOFException in InflaterInputStream after JDK-8281962

2022-08-17 Thread Volker Simonis
On Mon, 15 Aug 2022 17:43:27 GMT, Volker Simonis wrote: > The problem is that after > [JDK-8281962](https://bugs.openjdk.org/browse/JDK-8281962) we call `fill()` > unconditionally (and before calling `Inflater::inflate()`) in > `InflaterInputStream::read()` if `Inflater::needsInput()` is true.

Re: RFR: 8292327: java.io.EOFException in InflaterInputStream after JDK-8281962 [v3]

2022-08-17 Thread Volker Simonis
On Tue, 16 Aug 2022 20:01:10 GMT, Lance Andersen wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changed the payload to a more innocent version > > This looks OK Volker. > > It would be nice if possible to add a

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Thomas Stuefe
On Mon, 15 Aug 2022 13:56:38 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the >> simil

Integrated: 8292362: java/lang/Thread/jni/AttachCurrentThread/AttachTest.java#id1 failed on some platforms

2022-08-17 Thread Ao Qi
On Mon, 15 Aug 2022 12:23:41 GMT, Ao Qi wrote: > For example, java/lang/Thread/jni/AttachCurrentThread/AttachTest.java#id1 > failed on LoongArch64 (probably other platforms unsupported in > src/java.base/share/classes/jdk/internal/foreign/CABI.java might have the > same issue): > > > Except

Re: RFR: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-17 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 15:06:50 GMT, Aleksey Shipilev wrote: > I noticed that current VarHandle/Unsafe test cases do not test the > always-failing cases. Strong CASes do test both always-success and > always-failing scenarios, while weak CASes only test spurious-failure tests. > We should be also

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 13:56:38 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the >> simil

Re: RFR: 8292352: 32-bit Windows build failures after JDK-8290059

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 11:16:06 GMT, Aleksey Shipilev wrote: > The affected file was added by > [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059), and the code that > fails the compilation is under `#ifdef _WIN32`, and it only (?) gets compiled > for tests. Looks like we really need the

Integrated: 8292051: jdk/internal/misc/TerminatingThreadLocal/TestTerminatingThreadLocal.java failed "AssertionError: Expected terminated values: [666] but got: []"

2022-08-17 Thread Alan Bateman
On Wed, 10 Aug 2022 09:18:01 GMT, Alan Bateman wrote: > Change the test to use a custom scheduler so there is better control on when > the carrier threads terminates. Also convert test to TestNG so that all test > cases can be run in the context of a virtual thread. This pull request has now b

Re: RFR: 8292051: jdk/internal/misc/TerminatingThreadLocal/TestTerminatingThreadLocal.java failed "AssertionError: Expected terminated values: [666] but got: []" [v3]

2022-08-17 Thread Alan Bateman
> Change the test to use a custom scheduler so there is better control on when > the carrier threads terminates. Also convert test to TestNG so that all test > cases can be run in the context of a virtual thread. Alan Bateman has updated the pull request with a new target base due to a merge or