Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-09-10 Thread Thomas Stuefe
On Fri, 6 Sep 2024 16:20:52 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >> h

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v5]

2024-09-06 Thread Thomas Stuefe
On Thu, 29 Aug 2024 12:08:37 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >>

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-09-03 Thread Thomas Stuefe
On Tue, 27 Aug 2024 15:38:24 GMT, Thomas Stuefe wrote: >>> I don't think the costs for two address comparisons matter, not with the >>> comparatively few deallocations that happen (few hundreds or few thousand). >>> If deallocate is hot, we are using metaspace

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Thomas Stuefe
On Thu, 29 Aug 2024 11:37:19 GMT, Coleen Phillimore wrote: >> src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp >> line 79: >> >>> 77: >>> 78: static bool can_compress_element(const Klass* klass) { >>> 79: return Metaspace::is_in_class_space(klass) && >> >> Su

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-28 Thread Thomas Stuefe
On Wed, 28 Aug 2024 15:42:57 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >>

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-27 Thread Thomas Stuefe
On Mon, 26 Aug 2024 13:57:16 GMT, Coleen Phillimore wrote: > > I don't think the costs for two address comparisons matter, not with the > > comparatively few deallocations that happen (few hundreds or few thousand). > > If deallocate is hot, we are using metaspace wrong. > > MethodData does a

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v2]

2024-08-24 Thread Thomas Stuefe
On Fri, 23 Aug 2024 20:46:39 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >>

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-24 Thread Thomas Stuefe
On Fri, 23 Aug 2024 19:26:46 GMT, Coleen Phillimore wrote: > Yes, is_in_klass_space was just to direct where to deallocate the metaspace > pointer. In your patch isn't the contains metaspace call still very slow? Or > I suppose for class space, it's not because it's a fixed space. But it's not

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-23 Thread Thomas Stuefe
On Thu, 9 May 2024 13:51:09 GMT, Coleen Phillimore wrote: > This change stores InstanceKlass for interface and abstract classes in the > non-class metaspace, since class metaspace will have limits on number of > classes that can be represented when Lilliput changes go in. Classes that > have

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-22 Thread Thomas Stuefe
On Thu, 9 May 2024 13:51:09 GMT, Coleen Phillimore wrote: > This change stores InstanceKlass for interface and abstract classes in the > non-class metaspace, since class metaspace will have limits on number of > classes that can be represented when Lilliput changes go in. Classes that > have

Re: RFR: 8334492: DiagnosticCommands (jcmd) should accept %p in output filenames and substitute PID [v2]

2024-07-17 Thread Thomas Stuefe
On Wed, 17 Jul 2024 14:02:01 GMT, Thomas Stuefe wrote: >> Sonia Zaldana Calles has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Updating copyright headers > > src/hotspot/share/code/codeCache.cpp line 1800

Re: RFR: 8334492: DiagnosticCommands (jcmd) should accept %p in output filenames and substitute PID [v2]

2024-07-17 Thread Thomas Stuefe
On Wed, 17 Jul 2024 14:02:31 GMT, Sonia Zaldana Calles wrote: >> Hi all, >> >> This PR addresses [8334492](https://bugs.openjdk.org/browse/JDK-8334492) >> enabling jcmd diagnostic commands that issue an output file to accept the >> `%p` pattern in the file name and substitute it for the PID.

Re: RFR: 8335882: platform/cgroup/TestSystemSettings.java fails on Alpine Linux

2024-07-08 Thread Thomas Stuefe
On Mon, 8 Jul 2024 14:19:21 GMT, Severin Gehwolf wrote: > Please review this simple test fix to exclude the test from being run on an > Alpine Linux system. Apparently default Alpine Linux systems don't have > cgroups set up by default the way other distros do. More info on the bug. I > propos

Re: RFR: 8333308: javap --system handling doesn't work on internal class names

2024-06-26 Thread Thomas Stuefe
On Tue, 25 Jun 2024 13:59:35 GMT, Sonia Zaldana Calles wrote: > Hi all, > > This PR addresses [JDK-808](https://bugs.openjdk.org/browse/JDK-808) > enabling `javap -system` to handle internal class names. > > Thanks, > Sonia +1 - Marked as reviewed by stuefe (Reviewer

Re: RFR: 8333308: javap --system handling doesn't work on internal class names

2024-06-26 Thread Thomas Stuefe
On Wed, 26 Jun 2024 07:54:16 GMT, Alan Bateman wrote: > > Question, what is the noreg-hard label used for? > > It's the label to mean that it's too hard or impossible write a regression > test. It is documented in the [JBS label > dictionary](https://openjdk.org/guide/#jbs-label-dictionary) bu

Re: RFR: 8333308: javap --system handling doesn't work on internal class names

2024-06-25 Thread Thomas Stuefe
On Tue, 25 Jun 2024 19:49:07 GMT, Chen Liang wrote: > Technically javap accepts both notations of `a.b.C` and `a/b/C.class` and > accepts both `.` and `$` as inner class separators. So this is fine. However > it's hard to verify that the jdk in `--system` is really used, so I put a > noreg-har

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v6]

2024-06-20 Thread Thomas Stuefe
On Thu, 20 Jun 2024 12:06:43 GMT, Severin Gehwolf wrote: >> Please review this enhancement to the container detection code which allows >> it to figure out whether the JVM is actually running inside a container >> (`podman`, `docker`, `crio`), or with some other means that enforces >> memory/c

Re: RFR: 8211847: [aix] java/lang/ProcessHandle/InfoTest.java fails: "reported cputime less than expected"

2024-06-13 Thread Thomas Stuefe
On Thu, 13 Jun 2024 09:47:25 GMT, Christoph Langer wrote: > It seems the error is gone meanwhile. So we can reenable the test. Okay. Any idea what fixed the test? - Marked as reviewed by stuefe (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19691#pullrequestreview-2115358

Re: RFR: 8332400: isspace argument should be a valid unsigned char [v2]

2024-06-12 Thread Thomas Stuefe
On Tue, 11 Jun 2024 18:07:10 GMT, Robert Toyonaga wrote: >> ### Summary >> This change ensures we don't get undefined behavior when >> calling[`isspace`](https://pubs.opengroup.org/onlinepubs/007904975/functions/isspace.html). >> `isspace` accepts an `int` argument that "the application shall

Re: RFR: 8332400: isspace argument should be a valid unsigned char

2024-06-10 Thread Thomas Stuefe
On Mon, 10 Jun 2024 08:20:38 GMT, David Holmes wrote: > > "To use these functions safely with plain chars (or signed chars), the > > argument should first be converted to unsigned char" > > @tstuefe wow! Okay. That is a surprise to me. A cast to unsigned char doesn't > actually do anything. Ev

Re: RFR: 8332400: isspace argument should be a valid unsigned char

2024-06-06 Thread Thomas Stuefe
On Thu, 6 Jun 2024 21:21:23 GMT, David Holmes wrote: >> ### Summary >> This change ensures we don't get undefined behavior when >> calling[`isspace`](https://pubs.opengroup.org/onlinepubs/007904975/functions/isspace.html). >> `isspace` accepts an `int` argument that "the application shall ensu

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v10]

2024-06-04 Thread Thomas Stuefe
On Fri, 31 May 2024 14:34:16 GMT, Sonia Zaldana Calles wrote: >> Sonia Zaldana Calles has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Decreasing diff size addressing unnecessary changes > > Hi all, > > I think there's some consensus

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v11]

2024-06-04 Thread Thomas Stuefe
On Tue, 4 Jun 2024 13:34:30 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the is

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v10]

2024-05-14 Thread Thomas Stuefe
On Mon, 13 May 2024 18:01:25 GMT, Sonia Zaldana Calles wrote: > > This mostly looks good. I'm just puzzled CHECK_EXCEPTION_NULL_FAIL. The JNI > > functions GetStaticMethodID, GetMethodID and NewObject return NULL with a > > pending exception when they fail. So I would expect > > CHECK_EXCEPTI

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v10]

2024-05-10 Thread Thomas Stuefe
On Thu, 9 May 2024 19:52:12 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the is

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v9]

2024-05-10 Thread Thomas Stuefe
On Thu, 9 May 2024 19:48:53 GMT, Sonia Zaldana Calles wrote: > > This may be food for another RFE, to keep this patch minimal. But a good > > solution, to me, would be like this: > > > > * have the same logic for return codes (1 = error, 0 = success) to ease > > understanding > > * have clear

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v9]

2024-05-08 Thread Thomas Stuefe
On Mon, 6 May 2024 19:06:10 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the is

Re: RFR: 8329862: GetApplicationHome and GetApplicationHomeFromDll enhance jli tracing [v6]

2024-04-26 Thread Thomas Stuefe
On Thu, 25 Apr 2024 13:22:01 GMT, Matthias Baesken wrote: >> We have already good JLI tracing capabilities. But GetApplicationHome and >> GetApplicationHomeFromDll lack some tracing and should be enhanced. > > Matthias Baesken has updated the pull request incrementally with one > additional com

Re: RFR: 8329862: GetApplicationHome and GetApplicationHomeFromDll enhance jli tracing [v5]

2024-04-25 Thread Thomas Stuefe
On Tue, 23 Apr 2024 14:31:44 GMT, Matthias Baesken wrote: >> We have already good JLI tracing capabilities. But GetApplicationHome and >> GetApplicationHomeFromDll lack some tracing and should be enhanced. > > Matthias Baesken has updated the pull request incrementally with one > additional com

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Thomas Stuefe
On Sat, 13 Apr 2024 18:29:59 GMT, Thomas Stuefe wrote: >> Severin Gehwolf 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 conta

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-04-16 Thread Thomas Stuefe
On Thu, 11 Apr 2024 12:08:02 GMT, Severin Gehwolf wrote: >> Please review this enhancement to the container detection code which allows >> it to figure out whether the JVM is actually running inside a container >> (`podman`, `docker`, `crio`), or with some other means that enforces >> memory/c

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-16 Thread Thomas Stuefe
On Tue, 16 Apr 2024 07:55:26 GMT, Thomas Stuefe wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-16 Thread Thomas Stuefe
On Mon, 15 Apr 2024 18:25:02 GMT, Sonia Zaldana Calles wrote: > Hi folks, > > This PR aims to fix > [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). > > I think the regression got introduced in > [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). > > In the issue link

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-16 Thread Thomas Stuefe
On Mon, 15 Apr 2024 18:25:02 GMT, Sonia Zaldana Calles wrote: > Hi folks, > > This PR aims to fix > [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). > > I think the regression got introduced in > [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). > > In the issue link

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases

2024-04-12 Thread Thomas Stuefe
On Fri, 12 Apr 2024 10:07:48 GMT, Claes Redestad wrote: > I guess Lilliput adds some hard or soft limit on the number of classes loaded? Yes, we are concerned with that, especially for a possible future where Lilliput is the sole default. Atm we can address about 4 million classes. There are t

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases

2024-04-12 Thread Thomas Stuefe
On Tue, 9 Apr 2024 12:01:49 GMT, Claes Redestad wrote: > This patch suggests a workaround to an issue with huge SCF MH expression > trees taking excessive JIT compilation resources by reviving (part of) the > simple bytecode-generating strategy that was originally available as an > all-or-noth

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases

2024-04-11 Thread Thomas Stuefe
On Tue, 9 Apr 2024 12:01:49 GMT, Claes Redestad wrote: > There are a few trade-offs at play here which influence the choice of > threshold. The simple high arity strategy will for example not see any reuse > of LambdaForms but strictly always generate a class per indy callsite, which > means w

Re: RFR: 8327675: jspawnhelper should be built on all unix platforms

2024-03-08 Thread Thomas Stuefe
On Fri, 8 Mar 2024 10:17:08 GMT, Magnus Ihse Bursie wrote: > We should match the building of jspawnhelper in > make/modules/java.base/Launcher.gmk with the usage for all unix platforms in > src/java.base/unix/classes/java/lang/ProcessImpl.java. > > Granted, the list of OSes in the makefile amo

Re: RFR: JDK-8252802: java launcher should set MALLOCOPTIONS and LDR_CNTRL in order to use 64KB pages on AIX

2024-02-19 Thread Thomas Stuefe
On Mon, 19 Feb 2024 05:52:22 GMT, Varada M wrote: > DeCapo Benchmark Results (3 runs) : > > Before : > = DaCapo 9.12 h2 PASSED in 281402 msec = > = DaCapo 9.12 h2 PASSED in 269818 msec = > = DaCapo 9.12 h2 PASSED in 279279 msec = > > After: > = DaCapo 9.12 h2 PAS

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

2023-12-19 Thread Thomas Stuefe
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. Seems reasonable. - Marked as reviewed by stuefe (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/17156#

Re: RFR: 8320699: Add parameter to skip progress logging of OutputAnalyzer

2023-11-24 Thread Thomas Stuefe
On Fri, 24 Nov 2023 10:34:02 GMT, Stefan Karlsson wrote: > Tests using ProcessTools.executeProcess gets the following output written to > stdout: > [2023-11-24T09:58:16.797540608Z] Gathering output for process 2517117 > [2023-11-24T09:58:23.070781345Z] Waiting for completion for process 2517117

Re: RFR: 8320691: Timeout handler on Windows takes 2 hours to complete [v2]

2023-11-24 Thread Thomas Stuefe
On Fri, 24 Nov 2023 09:51:07 GMT, Daniel Jeliński wrote: >> test/failure_handler/src/share/conf/windows.properties line 60: >> >>> 58: >>> 59: native.core.app=cdb >>> 60: native.core.args=-c ".dump /ma core.%p;qd" -p %p >> >> Just to double check that this is the right option. `/ma` terminates

Re: RFR: 8320691: Timeout handler on Windows takes 2 hours to complete

2023-11-24 Thread Thomas Stuefe
On Fri, 24 Nov 2023 07:58:18 GMT, Daniel Jeliński wrote: > The recent cdb versions do not support `.dump /f`: > > * > * .dump /f is not supported on a user mode process. * > *

Re: RFR: JDK-8320309: AIX: pthreads created by foreign test library don't work as expected

2023-11-22 Thread Thomas Stuefe
On Tue, 21 Nov 2023 10:09:04 GMT, Varada M wrote: > Following test fails due to missing pthread attributes on AIX : > java/foreign/TestUpcallAsync.java > java/foreign/stackwalk/TestAsyncStackWalk.java > java/foreign/loaderLookup/TestLoaderLookupJNI.java > java/foreign/enablenativeaccess/TestEnabl

Re: RFR: 8318058: Notify the jvm when the direct memory is oom

2023-10-12 Thread Thomas Stuefe
On Fri, 13 Oct 2023 03:23:04 GMT, xpbob wrote: > Big data processes often experience situations where the direct memory oom > process is alive but not serving properly. If the direct memory is oom, code > can notify the jvm. Can bring the following benefits: > 1. Analysis of direct memory Java.

Re: RFR: JDK-8315026: ProcessHandle implementation listing processes on AIX should use getprocs64 [v5]

2023-10-12 Thread Thomas Stuefe
On Thu, 12 Oct 2023 09:30:09 GMT, Joachim Kern wrote: >> We see rather often failures in java/lang/ProcessHandle/TreeTest.java on AIX >> in TreeTest.test5. >> The reason is: Previously the implementation based on the /proc file system >> lead to double pids in the child list; at least intermitt

Re: RFR: JDK-8315026: java/lang/ProcessHandle/TreeTest.java fails intermittent on AIX in TreeTest.test5 [v4]

2023-10-12 Thread Thomas Stuefe
On Thu, 12 Oct 2023 09:33:24 GMT, Joachim Kern wrote: >> src/java.base/aix/native/libjava/ProcessHandleImpl_aix.c line 89: >> >>> 87: >>> 88: do { // Block to break out of on Exception >>> 89: pids = (*env)->GetLongArrayElements(env, jarray, NULL); >> >> Nit, I'd move these invocat

Re: RFR: JDK-8315026: java/lang/ProcessHandle/TreeTest.java fails intermittent on AIX in TreeTest.test5 [v4]

2023-10-11 Thread Thomas Stuefe
On Wed, 11 Oct 2023 10:57:24 GMT, Joachim Kern wrote: >> We see rather often failures in java/lang/ProcessHandle/TreeTest.java on AIX >> in TreeTest.test5. >> The reason is: Previously the implementation based on the /proc file system >> lead to double pids in the child list; at least intermitt

Re: RFR: JDK-8315026: java/lang/ProcessHandle/TreeTest.java fails intermittent on AIX in TreeTest.test5 [v4]

2023-10-11 Thread Thomas Stuefe
On Wed, 11 Oct 2023 10:57:24 GMT, Joachim Kern wrote: >> We see rather often failures in java/lang/ProcessHandle/TreeTest.java on AIX >> in TreeTest.test5. >> The reason is: Previously the implementation based on the /proc file system >> lead to double pids in the child list; at least intermitt

Re: RFR: JDK-8315026: java/lang/ProcessHandle/TreeTest.java fails intermittent on AIX in TreeTest.test5 [v2]

2023-10-09 Thread Thomas Stuefe
On Mon, 9 Oct 2023 15:15:52 GMT, Joachim Kern wrote: > Previously the implementation based on the /proc file system lead to double > pids in the child list; at least intermittent. Using the API getprocs64() > instead I was able to eliminate those double pids (and increase the > performance by

Re: RFR: JDK-8315026: java/lang/ProcessHandle/TreeTest.java fails intermittent on AIX in TreeTest.test5 [v2]

2023-10-09 Thread Thomas Stuefe
On Mon, 9 Oct 2023 15:00:18 GMT, Joachim Kern wrote: >> We see rather often failures in java/lang/ProcessHandle/TreeTest.java on AIX >> in TreeTest.test5. >> >> test TreeTest.test5(): failure >> java.lang.AssertionError: expected direct children expected [2] but found [3] >> at org.test

Re: RFR: JDK-8315213: java/lang/ProcessHandle/TreeTest.java test enhance output of children [v2]

2023-08-29 Thread Thomas Stuefe
On Tue, 29 Aug 2023 12:10:34 GMT, Matthias Baesken wrote: >> We have some failures in TreeTest.java where the expected number of child >> processes is differing from what we really get. It would be good to have >> more output to analyze these cases. > > Matthias Baesken has updated the pull req

Re: RFR: JDK-8315213: java/lang/ProcessHandle/TreeTest.java test enhance output of children

2023-08-29 Thread Thomas Stuefe
On Tue, 29 Aug 2023 07:51:59 GMT, Matthias Baesken wrote: > We have some failures in TreeTest.java where the expected number of child > processes is differing from what we really get. It would be good to have more > output to analyze these cases. Looks good. Small nit inline. test/jdk/java/la

Re: RFR: 8314940: Use of NIO in JDKs Metrics implementation causes issues in GraalVM

2023-08-28 Thread Thomas Stuefe
On Thu, 24 Aug 2023 13:16:16 GMT, Severin Gehwolf wrote: > Please review this rather trivial fix to not use `nio` in `CgroupUtil`, part > of the > JDK's Metrics API. The primary motivating factor is that it allows one to use > the > JDK's version of `Metrics` in GraalVM. See the bug for details

Re: [jdk21] RFR: 8310265: (process) jspawnhelper should not use argv[0]

2023-07-07 Thread Thomas Stuefe
On Fri, 7 Jul 2023 13:27:47 GMT, Roger Riggs wrote: >> Hi all, >> >> Clean backport for JDK-83210265. >> >> Thanks! > > Marked as reviewed by rriggs (Reviewer). Thank you @RogerRiggs ! - PR Comment: https://git.openjdk.org/jdk21/pull/103#issuecomment-1625435021

[jdk21] Integrated: 8310265: (process) jspawnhelper should not use argv[0]

2023-07-07 Thread Thomas Stuefe
On Thu, 6 Jul 2023 19:42:08 GMT, Thomas Stuefe wrote: > Hi all, > > Clean backport for JDK-83210265. > > Thanks! This pull request has now been integrated. Changeset: 6ef80168 Author: Thomas Stuefe URL: https://git.openjdk.org/jdk21/commit/6ef801683844e5cc06804d510

[jdk21] RFR: 8310265: (process) jspawnhelper should not use argv[0]

2023-07-07 Thread Thomas Stuefe
Hi all, Clean backport for JDK-83210265. Thanks! - Commit messages: - Backport 47d00a4cbeff5d757dda9c660dfd2385c02a57d7 Changes: https://git.openjdk.org/jdk21/pull/103/files Webrev: https://webrevs.openjdk.org/?repo=jdk21&pr=103&range=00 Issue: https://bugs.openjdk.org/browse/J

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

2023-06-21 Thread Thomas Stuefe
On Wed, 21 Jun 2023 07:55:31 GMT, David Holmes wrote: >> I'm not aware of any other uses either; its not intended to be used outside >> of ProcessImpl especially since the addition of the new protocol to >> communicate parameters and confirm launching of the child. > > This curiosity has been p

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v3]

2023-06-20 Thread Thomas Stuefe
On Tue, 20 Jun 2023 18:36:40 GMT, Volker Simonis wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> feedback Volker and Roger > > Still good :) Thanks @simonis and @RogerRiggs ! --

Integrated: JDK-8310265: (process) jspawnhelper should not use argv[0]

2023-06-20 Thread Thomas Stuefe
On Sat, 17 Jun 2023 18:24:54 GMT, Thomas Stuefe wrote: > Reported by [jarabe...@gmail.com](mailto:jarabe...@gmail.com) [1] > > jspawnhelper uses argv[0] to receive the fd string from the parent. That > breaks with conventions and trips over certain tools like binfmt_misc. >

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v3]

2023-06-20 Thread Thomas Stuefe
n. > > [1] https://mail.openjdk.org/pipermail/core-libs-dev/2023-June/107738.html Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: feedback Volker and Roger - Changes: - all: https://git.openjdk.org/jdk/pull/14531/files - new:

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

2023-06-20 Thread Thomas Stuefe
On Tue, 20 Jun 2023 15:00:29 GMT, Roger Riggs wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> correct comment > > src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 13

Re: RFR: 8310187: Improve Generational ZGC jtreg testing [v3]

2023-06-19 Thread Thomas Stuefe
On Mon, 19 Jun 2023 06:55:52 GMT, Axel Boldt-Christmas wrote: >> The current implementation for testing generational ZGC with jtreg is >> implemented with a filter on the mode flag `ZGenerational`. Because of this >> only environments which set this flag explicitly will run most of the tests.

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

2023-06-19 Thread Thomas Stuefe
On Mon, 19 Jun 2023 06:07:26 GMT, Thomas Stuefe wrote: >> Reported by [jarabe...@gmail.com](mailto:jarabe...@gmail.com) [1] >> >> jspawnhelper uses argv[0] to receive the fd string from the parent. That >> breaks with conventions and trips over certain tools like

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

2023-06-19 Thread Thomas Stuefe
On Mon, 19 Jun 2023 06:07:26 GMT, Thomas Stuefe wrote: >> Reported by [jarabe...@gmail.com](mailto:jarabe...@gmail.com) [1] >> >> jspawnhelper uses argv[0] to receive the fd string from the parent. That >> breaks with conventions and trips over certain tools like

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

2023-06-18 Thread Thomas Stuefe
n. > > [1] https://mail.openjdk.org/pipermail/core-libs-dev/2023-June/107738.html Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: correct comment - Changes: - all: https://git.openjdk.org/jdk/pull/14531/files - new: https://

RFR: JDK-8310265: (process) jspawnhelper should not use argv[0]

2023-06-17 Thread Thomas Stuefe
Reported by [jarabe...@gmail.com](mailto:jarabe...@gmail.com) [1] jspawnhelper uses argv[0] to receive the fd string from the parent. That breaks with conventions and trips over certain tools like binfmt_misc. For details, see linked ML discussion. [1] https://mail.openjdk.org/pipermail/core

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v8]

2023-06-01 Thread Thomas Stuefe
On Tue, 30 May 2023 13:19:37 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly sta

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-27 Thread Thomas Stuefe
On Sat, 27 May 2023 11:25:41 GMT, Thomas Stuefe wrote: >> This one is not just to get rid of a warning. We get real test errors >> because malloc gets replaced by vec_malloc in log tags. > >> This one is not just to get rid of a warning. We get real test errors >> b

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-27 Thread Thomas Stuefe
On Fri, 26 May 2023 20:27:12 GMT, Martin Doerr wrote: > This one is not just to get rid of a warning. We get real test errors because > malloc gets replaced by vec_malloc in log tags. That does not invalidate my argument, nor does it answer my question. Those test errors could be also fixed by

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v7]

2023-05-26 Thread Thomas Stuefe
On Thu, 25 May 2023 15:25:40 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly sta

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Thomas Stuefe
On Thu, 25 May 2023 18:18:43 GMT, Martin Doerr wrote: >> src/hotspot/share/utilities/globalDefinitions_xlc.hpp line 47: >> >>> 45: #undef malloc >>> 46: extern void *malloc(size_t) asm("vec_malloc"); >>> 47: #endif >> >> Wow! And I don't mean that in a good way. I'm not questioning whethe

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-24 Thread Thomas Stuefe
On Wed, 24 May 2023 14:30:10 GMT, Volker Simonis wrote: >>> > Sorry, but I don't understand this argument. If we do a short read we >>> > will work with corrupted ChildStuff and SpawnInfo >>> > structures. This can in the extreme case execute arbitrary code (e.g. if >>> > ChildStuff.argv is not

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v4]

2023-05-23 Thread Thomas Stuefe
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly sta

Integrated: JDK-8308350: Increase buffer size for jspawnhelper arguments

2023-05-18 Thread Thomas Stuefe
On Thu, 18 May 2023 07:08:57 GMT, Thomas Stuefe wrote: > Trivial fix for a small problem. > > jspawnhelper gets handed several file descriptors as arguments. The buffer > size for this string is too small (7 chars per fd) to print out every > conceivable int. This will overun t

Re: RFR: JDK-8308350: Increase buffer size for jspawnhelper arguments [v2]

2023-05-18 Thread Thomas Stuefe
On Thu, 18 May 2023 13:46:54 GMT, Roger Riggs wrote: >> Thomas Stuefe 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 two addi

Re: RFR: JDK-8308350: Increase buffer size for jspawnhelper arguments [v2]

2023-05-18 Thread Thomas Stuefe
still > printable within the limits of this buffer. It is possible to get more fds > per process, but only via kernel patch. But we still should not rely on that. > And there is also still MacOS using the same mechanism. Thomas Stuefe has updated the pull request with a new targe

Re: RFR: JDK-8308350: Increase buffer size for jspawnhelper arguments

2023-05-18 Thread Thomas Stuefe
On Thu, 18 May 2023 07:08:57 GMT, Thomas Stuefe wrote: > Trivial fix for a small problem. > > jspawnhelper gets handed several file descriptors as arguments. The buffer > size for this string is too small (7 chars per fd) to print out every > conceivable int. This will overun t

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-18 Thread Thomas Stuefe
On Wed, 17 May 2023 16:12:15 GMT, Volker Simonis wrote: >> src/java.base/unix/native/libjava/ProcessImpl_md.c line 490: >> >>> 488: pid_t resultPid; >>> 489: int i, offset, rval, bufsize, magic; >>> 490: char *buf, buf1[24]; >> >> Since you are here could you please increase buffer

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v3]

2023-05-18 Thread Thomas Stuefe
On Wed, 17 May 2023 16:00:23 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly sta

RFR: JDK-8308350: Increase buffer size for jspawnhelper arguments

2023-05-18 Thread Thomas Stuefe
Trivial fix for a small problem. jspawnhelper gets handed several file descriptors as arguments. The buffer size for this string is too small (7 chars per fd) to print out every conceivable int. This will overun the buffer if we happen to have fds larger than (printed size) 7 characters. This c

Re: RFR: 8308347: [s390x] build broken after JDK-8304913

2023-05-17 Thread Thomas Stuefe
On Thu, 18 May 2023 06:12:19 GMT, Amit Kumar wrote: > s390x needs to be recognised as `S390`. After > [JDK-8304913](https://bugs.openjdk.org/browse/JDK-8304913) during build I was > getting this PluginException: > > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum >

Re: RFR: 8308270: ARM32 build broken after JDK-8304913

2023-05-17 Thread Thomas Stuefe
On Wed, 17 May 2023 08:45:23 GMT, Boris Ulasevich wrote: > Build issue happens after https://git.openjdk.org/jdk/pull/13585: > > $ make bundles > ... > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.ARM > at > jdk.jli

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Thomas Stuefe
On Wed, 17 May 2023 16:05:58 GMT, Volker Simonis wrote: >> src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 140: >> >>> 138: struct stat buf; >>> 139: /* argv[0] contains the fd number to read all the child info */ >>> 140: int r, fdinr, fdinw, fdout; >> >> Since you are h

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Thomas Stuefe
On Wed, 17 May 2023 12:33:48 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly sta

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-16 Thread Thomas Stuefe
On Tue, 16 May 2023 12:07:10 GMT, David Holmes wrote: > > > I wonder if @Martin-Buchholz is able to look at this one? > > > My concern with changes like this is that they fix an issue but then have > > > unexpected side-effects themselves. > > > > > > Are there any specific concerns you have?

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-16 Thread Thomas Stuefe
On Mon, 15 May 2023 16:11:46 GMT, Volker Simonis wrote: > > 2. I think you don't actually have to hand in the in-pipe-read-end fd > > number via command line arg, just to have the child to close it. You could > > just, in the parent, set the fd to FD_CLOEXEC. Since posix_spawn() exec's > > the

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-16 Thread Thomas Stuefe
On Tue, 16 May 2023 07:24:31 GMT, David Holmes wrote: > I wonder if @Martin-Buchholz is able to look at this one? > > My concern with changes like this is that they fix an issue but then have > unexpected side-effects themselves. Are there any specific concerns you have? - PR Com

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-16 Thread Thomas Stuefe
On Mon, 15 May 2023 18:45:24 GMT, Roger Riggs wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly start

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-15 Thread Thomas Stuefe
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote: > Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start a

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-15 Thread Thomas Stuefe
On Mon, 15 May 2023 12:31:49 GMT, Volker Simonis wrote: > > Looks ok. > > Is it practical to write a test for this situation? Can I assume you've > > validated the improvement as a remedy for the observed hangs? > > I thought about a test but couldn't come up with a practical way to write it.

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-15 Thread Thomas Stuefe
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote: > Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start a

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-14 Thread Thomas Stuefe
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote: > Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start a

Re: RFR: 8307163: JLONG_FORMAT_SPECIFIER should be updated on Windows [v2]

2023-05-14 Thread Thomas Stuefe
On Tue, 2 May 2023 12:23:23 GMT, Julian Waters wrote: >> Windows no longer uses I64d anywhere in their newer compilers, instead using >> the conforming lld specifiers. Minor cleanup here in JLI code to reflect that > > Julian Waters has updated the pull request incrementally with one additional

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-08 Thread Thomas Stuefe
On Fri, 7 Apr 2023 21:15:11 GMT, Roger Riggs wrote: > Refactored the way that build time architecture values are mapped to the > Architecture enum. Thank you for this, Roger. - PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1161075537

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-07 Thread Thomas Stuefe
On Fri, 7 Apr 2023 10:52:47 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/jdk/internal/util/Architecture.java line 41: >> >>> 39: AARCH64(), >>> 40: RISCV64(), >>> 41: S390(), >> >> Why getting rid of the X in s390x? There has not been an s390 linux kernel >> in almost te

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-07 Thread Thomas Stuefe
On Thu, 6 Apr 2023 19:25:19 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-07 Thread Thomas Stuefe
On Fri, 7 Apr 2023 07:42:51 GMT, Alan Bateman wrote: > > What I meant was: You define PPCLE. PPCLE specifies ppc, little endian. We > > also have PPC big-endian, it is used by AIX (and you can also run Linux > > with PPC big-endian). Why omit that? > > os.arch for AIX is "ppc64". > > So I thin

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Thomas Stuefe
On Thu, 6 Apr 2023 20:39:41 GMT, Roger Riggs wrote: > > What about PPC (big endian)? Used on AIX? > > I'm not aware of any code (in OpenJDK) related to big/little endian that is > derived from `os.arch`. > > > On Arm, it may be useful to know whether we built for thumb mode (We > > recently h

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-06 Thread Thomas Stuefe
On Thu, 6 Apr 2023 21:17:25 GMT, Glavo wrote: >> The point of Architecture is reflect the architecture as supported by the >> build and the runtime mutually and to reflect dependencies on the target >> hardware. >> >> What did you use as the example that would not compile on the other >> arc

  1   2   >