Re: RFR: JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH [v2]

2023-03-17 Thread Matthias Baesken
On Thu, 16 Mar 2023 09:08:08 GMT, Matthias Baesken wrote: >> The test fails on Alpine Linux 3.17, when checking the environment variable >> LD_LIBRARY_PATH; looks like the actual env variable is much longer than the >> test expects. It turned out that at least on Linux (probably also on other

Integrated: JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH

2023-03-17 Thread Matthias Baesken
On Wed, 15 Mar 2023 11:46:22 GMT, Matthias Baesken wrote: > The test fails on Alpine Linux 3.17, when checking the environment variable > LD_LIBRARY_PATH; looks like the actual env variable is much longer than the > test expects. It turned out that at least on Linux (probably also on other OS

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v5]

2023-03-17 Thread Andrey Turbanov
On Thu, 16 Mar 2023 15:34:58 GMT, Chen Liang wrote: >> Summaries: >> 1. A few recommendations about updating the constant API is made at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html >> and I may update this patch shall the API changes be integrated before >> 2.

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v4]

2023-03-17 Thread Viktor Klang
> Addresses the situation where exceptional completion of `orTimeout`:ed > CompletableFutures wouldn't cancel the timeout task which could lead to > memory leaks if done frequently enough with long enough timeout durations. > > Fix discussed with @DougLea Viktor Klang has updated the pull reque

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v4]

2023-03-17 Thread Viktor Klang
On Fri, 17 Mar 2023 08:55:39 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix dis

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v4]

2023-03-17 Thread Andrey Turbanov
On Fri, 17 Mar 2023 08:59:37 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix dis

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v3]

2023-03-17 Thread Viktor Klang
On Fri, 17 Mar 2023 06:34:03 GMT, Jaikiran Pai wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Making the test for orTimeout+completeExceptionally only based on >> iterations and not duration. > > Hello Viktor, th

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v4]

2023-03-17 Thread Jaikiran Pai
On Fri, 17 Mar 2023 08:59:37 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix dis

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v5]

2023-03-17 Thread Viktor Klang
> Addresses the situation where exceptional completion of `orTimeout`:ed > CompletableFutures wouldn't cancel the timeout task which could lead to > memory leaks if done frequently enough with long enough timeout durations. > > Fix discussed with @DougLea Viktor Klang has updated the pull reque

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v5]

2023-03-17 Thread Alan Bateman
On Fri, 17 Mar 2023 09:18:07 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix dis

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v6]

2023-03-17 Thread Viktor Klang
> Addresses the situation where exceptional completion of `orTimeout`:ed > CompletableFutures wouldn't cancel the timeout task which could lead to > memory leaks if done frequently enough with long enough timeout durations. > > Fix discussed with @DougLea Viktor Klang has updated the pull reque

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v5]

2023-03-17 Thread Viktor Klang
On Fri, 17 Mar 2023 09:21:48 GMT, Alan Bateman wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> while-statement formatting update > > test/jdk/java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExcepti

Re: RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics [v4]

2023-03-17 Thread Serguei Spitsyn
> This is needed for performance improvements in support of virtual threads. > The update includes the following: > > 1. Refactored the `VirtualThread` native methods: > `notifyJvmtiMountBegin` and `notifyJvmtiMountEnd` => > `notifyJvmtiMount` > `notifyJvmtiUnmountBegin` and `not

Re: Current state = CODING_END, new state = FLUSHED?

2023-03-17 Thread Jaikiran Pai
Hello Peter, Looking at the linked issue and the stacktrace presented there, this appears to be related to java.util.zip code.  I've moved this thread to core-libs-dev which is where discussions related to java.util.zip happen. The stacktrace is as follows: Caused by: java.lang.IllegalStateE

Re: Current state = CODING_END, new state = FLUSHED?

2023-03-17 Thread Eirik Bjørsnøs
On Fri, Mar 17, 2023 at 12:00 PM Jaikiran Pai wrote: > Additional details in that issue state that the JDK being used is Java 15. > There have been code changes in this piece of code in java.util.zip.ZipFile > since then. > Looks to me like an instance of JDK-8260010 [1], which was a thread-safe

Re: Current state = CODING_END, new state = FLUSHED?

2023-03-17 Thread Eirik Bjørsnøs
> > The fix was backported to 15, not sure which build it was included in. > Sorry, seems the fix was backported to 16, not 15. The recommendation would still be the same: Upgrade to a more recent JDK release. 17 is the current LTS release. Eirik.

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v11]

2023-03-17 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with three additional commits since the last revision: - SystemModulesPlugin::genClassBytes rename

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v10]

2023-03-17 Thread Adam Sotona
On Thu, 16 Mar 2023 21:49:28 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remaining cleanup in SystemModulesPlugin > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPl

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-17 Thread Adam Sotona
On Thu, 16 Mar 2023 20:45:24 GMT, Naoto Sato wrote: >> I further clarified with Naoto and I now understand the problem.The >> plugin intends to transform `.class` that implements `LocaleDataMetaInfo` in >> `jdk.localedata` module. It's a bug in the plugin `--include-locales=*` >> which w

Re: RFR: 8304164: jdk/classfile/CorpusTest.java still fails after JDK-8303910

2023-03-17 Thread Adam Sotona
On Fri, 17 Mar 2023 05:49:45 GMT, Jaikiran Pai wrote: >> Massive parallel execution of parametrised CorpusTest junit tests revealed >> race condition in >> `ClassHierarchyImpl.CachedClassHierarchyResolver::getClassInfo`. >> >> The race condition may skip calculation of the ClassHierarchyInfo.

Integrated: 8304164: jdk/classfile/CorpusTest.java still fails after JDK-8303910

2023-03-17 Thread Adam Sotona
On Wed, 15 Mar 2023 08:44:34 GMT, Adam Sotona wrote: > Massive parallel execution of parametrised CorpusTest junit tests revealed > race condition in > `ClassHierarchyImpl.CachedClassHierarchyResolver::getClassInfo`. > > The race condition may skip calculation of the ClassHierarchyInfo. In thi

Integrated: 8304314: StackWalkTest.java fails after CODETOOLS-7903373

2023-03-17 Thread Leonid Mesnik
On Thu, 16 Mar 2023 13:26:35 GMT, Leonid Mesnik wrote: > The test depends on the jtreg stack and should be updated. > The fix is backported from loom repo where jtreg with CODETOOLS-7903373 is > used. > Tested with current promoted jtreg (without CODETOOLS-7903373) by running > test. This pull

Integrated: 8303697: ProcessTools doesn't print last line of process output

2023-03-17 Thread Leonid Mesnik
On Wed, 15 Mar 2023 05:41:33 GMT, Leonid Mesnik wrote: > The StreamPumper is fixed to process the last line even it is not finishes > with '\n' or '\r'. The test included. Testing with tier1-3 also to verify > that tests are not broken. This pull request has now been integrated. Changeset: 8d

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v6]

2023-03-17 Thread Chen Liang
> Summaries: > 1. A few recommendations about updating the constant API is made at > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html > and I may update this patch shall the API changes be integrated before > 2. One ASM library-specific test, `LambdaAsm` is removed. Oth

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-17 Thread Andrey Turbanov
On Tue, 14 Mar 2023 16:06:06 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface explicitly specify requested

Re: RFR: 8294137: Review running times of java.math tests [v3]

2023-03-17 Thread Brian Burkhalter
> Break up `BigIntegerTest` and `SymmetricRangeTests` into subsets which are > run quasi-randomly as a function of second within the minute at the time the > test is running. `LargeValueExceptions` does not appear amenable to this > treatment. Brian Burkhalter has updated the pull request incre

Re: RFR: 8294137: Review running times of java.math tests [v2]

2023-03-17 Thread Brian Burkhalter
On Thu, 16 Mar 2023 22:12:43 GMT, Joe Darcy wrote: > [...] an idiom where it would be easy (through a small source change at > least) to run all the subtests? Addressed in 8c666401ba68ed477e3d5f6088dae67fd73270a6. - PR: https://git.openjdk.org/jdk/pull/12819

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-03-17 Thread Doug Simon
> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for accessing > annotations. The main differences from `java.lang.reflect.AnnotatedElement` > are: > * All methods in the `Annotated` interface explicitly specify requested > annotation type(s). That is, there is no equivalent of

Integrated: 8304367: jlink --include-locales=* attempts to parse non .class resource files with classfile reader

2023-03-17 Thread Naoto Sato
On Thu, 16 Mar 2023 20:43:38 GMT, Naoto Sato wrote: > This is a blocker for > [JDK-8294972](https://bugs.openjdk.org/browse/JDK-8294972). The fix is to > weed out non-class files for calling `ClassReader` by checking the file > extension. Regression tests are not provided as it is not possible

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-17 Thread Naoto Sato
On Fri, 17 Mar 2023 11:35:52 GMT, Adam Sotona wrote: >> Submitted: https://github.com/openjdk/jdk/pull/13067 > > I've reverted `IncludeLocalesPlugin` to previous version, plus minor fixes > and together with #13067 the `IncludeLocalesPluginTest` is passing. > Thank you. The fix to `IncludeLocal

Re: RFR: 8304320: java.base does not export jdk.internal.org.objectweb.asm to module jdk.jshell

2023-03-17 Thread Varada M
On Thu, 16 Mar 2023 08:43:46 GMT, Alan Bateman wrote: >> jdk/test/jdk/tools/jimage/VerifyJimage.java is failing because the module >> java.base is not exporting jdk.internal.org.objectweb.asm to module >> jdk.jshell. >> >> Reported Issue : [JDK-8304320](https://bugs.openjdk.org/browse/JDK-830

Withdrawn: 8304320: java.base does not export jdk.internal.org.objectweb.asm to module jdk.jshell

2023-03-17 Thread Varada M
On Thu, 16 Mar 2023 08:14:25 GMT, Varada M wrote: > jdk/test/jdk/tools/jimage/VerifyJimage.java is failing because the module > java.base is not exporting jdk.internal.org.objectweb.asm to module > jdk.jshell. > > Reported Issue : [JDK-8304320](https://bugs.openjdk.org/browse/JDK-8304320) Th

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-17 Thread Adam Sotona
On Fri, 17 Mar 2023 16:06:53 GMT, Naoto Sato wrote: >> I've reverted `IncludeLocalesPlugin` to previous version, plus minor fixes >> and together with #13067 the `IncludeLocalesPluginTest` is passing. >> Thank you. > > The fix to `IncludeLocalesPlugin` has been integrated. @asotona would you >

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v12]

2023-03-17 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 220 commits: - Merge branch 'mas

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v8]

2023-03-17 Thread Naoto Sato
On Fri, 17 Mar 2023 16:56:16 GMT, Adam Sotona wrote: >> The fix to `IncludeLocalesPlugin` has been integrated. @asotona would you >> please check that the exception is not thrown with your changes? > > Yes, I can confirm the test now passes. Great! Thanks for checking - PR: https:

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v12]

2023-03-17 Thread Mandy Chung
On Fri, 17 Mar 2023 17:01:43 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request with a new target base due to a > merge or a rebas

Re: RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics [v4]

2023-03-17 Thread Vladimir Ivanov
On Fri, 17 Mar 2023 10:31:46 GMT, Serguei Spitsyn wrote: >> This is needed for performance improvements in support of virtual threads. >> The update includes the following: >> >> 1. Refactored the `VirtualThread` native methods: >> `notifyJvmtiMountBegin` and `notifyJvmtiMountEnd` =

Re: RFR: 8304139: Add and method constants to ConstantDescs [v3]

2023-03-17 Thread Mandy Chung
On Fri, 17 Mar 2023 00:43:04 GMT, Chen Liang wrote: >> Add String constants INIT_NAME, CLASS_INIT_NAME, MTD_void for the names and >> method type of instance and class initializers, as they are frequently used >> in the Classfile API. In addition, they appear frequently in the JDK itself >> as

RFR: 8304425: ClassHierarchyResolver from Reflection

2023-03-17 Thread Chen Liang
Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with proper privileges, with tests. This addition is useful in case classes at runtime are not loaded from the system class loader, such as Proxy. This is also useful to APIs that generate bytecode with a `Lookup` object, suc

Re: RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics [v4]

2023-03-17 Thread Serguei Spitsyn
On Fri, 17 Mar 2023 17:33:46 GMT, Vladimir Ivanov wrote: > Overall, compiler changes look good. > Any performance numbers to justify the intrinsification? Thank you for review and your guidance and help with C2 intrinsification! My goal was to move the notifyJvmtiEvents checks from Java to VM si

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR

2023-03-17 Thread Justin Lu
On Tue, 14 Mar 2023 22:16:45 GMT, Justin Lu wrote: > This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` > rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and > `DAY_OF_WEEK` combo. > > For example, Rolling _Monday, 30 December 2019_ by 1 week produced _Mond

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v4]

2023-03-17 Thread Justin Lu
> This PR converts Unicode sequences to UTF-8 native in .properties file. > (Excluding the Unicode space and tab sequence). The conversion was done using > native2ascii. > > In addition, the build logic is adjusted to support reading in the > .properties files as UTF-8 during the conversion fro

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v4]

2023-03-17 Thread Andy Goryachev
On Fri, 17 Mar 2023 20:28:13 GMT, Justin Lu wrote: >> This PR converts Unicode sequences to UTF-8 native in .properties file. >> (Excluding the Unicode space and tab sequence). The conversion was done >> using native2ascii. >> >> In addition, the build logic is adjusted to support reading in t

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v4]

2023-03-17 Thread Naoto Sato
On Fri, 17 Mar 2023 20:31:27 GMT, Andy Goryachev wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adjust CF test to read in with UTF-8 to fix failing test > > make/jdk/src/classes/build/tools/compileproperties/CompileP

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v4]

2023-03-17 Thread Weijun Wang
On Fri, 17 Mar 2023 20:28:13 GMT, Justin Lu wrote: >> This PR converts Unicode sequences to UTF-8 native in .properties file. >> (Excluding the Unicode space and tab sequence). The conversion was done >> using native2ascii. >> >> In addition, the build logic is adjusted to support reading in t

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v4]

2023-03-17 Thread Weijun Wang
On Fri, 17 Mar 2023 21:49:33 GMT, Weijun Wang wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adjust CF test to read in with UTF-8 to fix failing test > > make/jdk/src/classes/build/tools/compileproperties/CompileProp

RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library

2023-03-17 Thread Mandy Chung
`ModuleInfoWriter` is not used by the runtime. Move it to the test library as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the test library instead. `ModuleInfoWriter` depends on `jdk.internal.module` types and the Classfile API. Hence `@modules java.base/jdk.intern

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v5]

2023-03-17 Thread Justin Lu
> This PR converts Unicode sequences to UTF-8 native in .properties file. > (Excluding the Unicode space and tab sequence). The conversion was done using > native2ascii. > > In addition, the build logic is adjusted to support reading in the > .properties files as UTF-8 during the conversion fro

Re: RFR: 8298995: tools/jpackage/share/AddLauncherTest.java#id1 failed "AddLauncherTest.test; checks=53"

2023-03-17 Thread Alexey Semenyuk
On Mon, 13 Mar 2023 16:50:51 GMT, Alexander Matveev wrote: > This is similar to many other issues we had with `hdiutil` failures. Fixed in > similar way by repeating `hdiutil` command. Cannot confirm that it will > resolve this issue, but similar issues got resolved by repeating command. > Al

Integrated: 8298995: tools/jpackage/share/AddLauncherTest.java#id1 failed "AddLauncherTest.test; checks=53"

2023-03-17 Thread Alexander Matveev
On Mon, 13 Mar 2023 16:50:51 GMT, Alexander Matveev wrote: > This is similar to many other issues we had with `hdiutil` failures. Fixed in > similar way by repeating `hdiutil` command. Cannot confirm that it will > resolve this issue, but similar issues got resolved by repeating command. > Al

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library

2023-03-17 Thread Jaikiran Pai
On Fri, 17 Mar 2023 22:01:46 GMT, Mandy Chung wrote: > `ModuleInfoWriter` is not used by the runtime. Move it to the test library > as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the > test library instead. `ModuleInfoWriter` depends on `jdk.internal.module` > type