Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-30 Thread Jaikiran Pai
On Wed, 31 Jan 2024 06:27:33 GMT, David Holmes wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Chris' review suggestion - replace LOG_MISC with ERROR_MESSAGE > > src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v11]

2024-01-30 Thread Suchismith Roy
On Mon, 29 Jan 2024 09:48:40 GMT, Joachim Kern wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update comment > > src/hotspot/os/aix/os_aix.cpp line 1166: > >> 1164: Search order: >> 1165: libfilename-> load

Re: RFR: 8313710: jcmd: typo in the documentation of JFR.start and JFR.dump [v3]

2024-01-30 Thread Taizo Kurashige
On Mon, 30 Oct 2023 22:39:41 GMT, David Holmes wrote: >> Taizo Kurashige has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8313710: jcmd: typo in the documentation of JFR.start and JFR.dump > > Changes requested by dholmes (Reviewer).

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-30 Thread David Holmes
On Wed, 31 Jan 2024 01:46:57 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option),

Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs

2024-01-30 Thread Martin Doerr
On Tue, 30 Jan 2024 14:02:41 GMT, Matthias Baesken wrote: >>> Yes there is a nice define in the AIX header >> >> *sigh* On linux, they go to some lengths to avoid this, using a __REDEFINE >> mechanism. Oh well. >> >> Anyway, I think this particular can be resolved by not including the >>

Re: RFR: 8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow [v3]

2024-01-30 Thread Chris Plummer
On Wed, 31 Jan 2024 03:50:29 GMT, Alex Menkov wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix spacing > > test/hotspot/jtreg/serviceability/sa/ClhsdbJstackWithConcurrentLock.java line > 65: > >> 63:

Re: RFR: 8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow [v3]

2024-01-30 Thread Alex Menkov
On Sun, 28 Jan 2024 01:20:53 GMT, Chris Plummer wrote: >> I noticed that "clhsdb jstack" seemed to hang when I attached to process >> with a somewhat large heap. It had taken over 10 minutes when I finally >> decided to have a look at the SA process (using bin/jstack), which came up >> with

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-30 Thread Jaikiran Pai
On Wed, 31 Jan 2024 01:46:57 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option),

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-30 Thread Chris Plummer
On Wed, 31 Jan 2024 01:46:57 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option),

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v5]

2024-01-30 Thread Jaikiran Pai
On Tue, 30 Jan 2024 19:41:48 GMT, Chris Plummer wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> assert that we don't pass values higher than INT_MAX to close() > > src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-30 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8324668? > > This change proposes to fix the issue in jdwp where when launching a child > process (for the `launch=` option), it iterates over an extremely large > number of file

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs [v3]

2024-01-30 Thread Weijun Wang
On Tue, 30 Jan 2024 16:41:28 GMT, Weijun Wang wrote: >> src/java.management/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java >> line 307: >> >>> 305: AccessController.doPrivileged(new PrivilegedAction<>() { >>> 306: public Subject

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs [v3]

2024-01-30 Thread Weijun Wang
> This code change adds an alternative implementation of user-based > authorization `Subject` APIs that doesn't depend on Security Manager APIs. > Depending on if the Security Manager is allowed, the methods store the > current subject differently. See the spec change in the `Subject.java` file

Integrated: 8324582: Replace -Djava.util.concurrent.ForkJoinPool.common.parallelism to -Djdk.virtualThreadScheduler.maxPoolSize in jvmti vthread tests

2024-01-30 Thread Leonid Mesnik
On Wed, 24 Jan 2024 02:42:29 GMT, Leonid Mesnik wrote: > Some jvmti tests use > -Djava.util.concurrent.ForkJoinPool.common.parallelism > to control the pool of virtual threads. However, it is controlled by > jdk.virtualThreadScheduler.parallelism property. > > The non-continuations

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs [v2]

2024-01-30 Thread Weijun Wang
On Tue, 30 Jan 2024 16:45:34 GMT, Weijun Wang wrote: >> OK - things seem to be a bit convoluted here and some pieces might be >> missing. I suspect that what needs to be done is more complicated: >> >> `RMIConnectionImpl` sets up an ACC and calls doPrivileged with that ACC, on >> the

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs [v2]

2024-01-30 Thread Weijun Wang
> This code change adds an alternative implementation of user-based > authorization `Subject` APIs that doesn't depend on Security Manager APIs. > Depending on if the Security Manager is allowed, the methods store the > current subject differently. See the spec change in the `Subject.java` file

Re: RFR: 8323680: SA PointerFinder code can do a better job of leveraging existing code to determine if an address is in the TLAB [v2]

2024-01-30 Thread Chris Plummer
On Fri, 26 Jan 2024 21:20:04 GMT, Chris Plummer wrote: >> In PointerFinder.java we have some code to determine if a pointer is in a >> TLAB, but it only executes for the SerialGC. It should work for all GCs, so >> I moved the code out of the SerialGC block. >> >> I also cleaned up the

Re: RFR: 8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow [v3]

2024-01-30 Thread Chris Plummer
On Sun, 28 Jan 2024 01:20:53 GMT, Chris Plummer wrote: >> I noticed that "clhsdb jstack" seemed to hang when I attached to process >> with a somewhat large heap. It had taken over 10 minutes when I finally >> decided to have a look at the SA process (using bin/jstack), which came up >> with

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v5]

2024-01-30 Thread Chris Plummer
On Tue, 30 Jan 2024 16:17:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option),

Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-30 Thread Jiangli Zhou
On Wed, 17 Jan 2024 00:14:58 GMT, Jiangli Zhou wrote: > Please review this PR with a simple solution for resolving duplicate `Thread` > symbol issue. In https://github.com/openjdk/jdk/pull/14808 comments, there > was an alternative suggestion to redefine the symbol at build time, such as >

Integrated: 8324880: Rename get_stack_trace.h

2024-01-30 Thread Kim Barrett
On Tue, 30 Jan 2024 03:43:15 GMT, Kim Barrett wrote: > Please review this trivial change that renames the file > test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h > to get_stack_trace.hpp, and renames uses of NULL in that file. > > The updates to #include lines in

Re: RFR: 8324880: Rename get_stack_trace.h

2024-01-30 Thread Kim Barrett
On Tue, 30 Jan 2024 07:40:05 GMT, David Holmes wrote: >> Please review this trivial change that renames the file >> test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h >> to get_stack_trace.hpp, and renames uses of NULL in that file. >> >> The updates to #include

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v5]

2024-01-30 Thread Gerard Ziemski
On Tue, 30 Jan 2024 16:17:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option),

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v4]

2024-01-30 Thread Gerard Ziemski
On Tue, 30 Jan 2024 16:15:17 GMT, Jaikiran Pai wrote: >>> If we are going to check close for errors then we will have to know for >>> certain we are only trying to close open fd's, and we will have to deal >>> with EINTR. I would think this is a "best effort" to close open FD's and >>> not

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-30 Thread Weijun Wang
On Tue, 30 Jan 2024 13:56:53 GMT, Daniel Fuchs wrote: >> This code change adds an alternative implementation of user-based >> authorization `Subject` APIs that doesn't depend on Security Manager APIs. >> Depending on if the Security Manager is allowed, the methods store the >> current subject

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-30 Thread Weijun Wang
On Tue, 30 Jan 2024 14:19:02 GMT, Daniel Fuchs wrote: >> src/java.management/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java >> line 349: >> >>> 347: @SuppressWarnings("removal") >>> 348: private Subject getSubject() { >>> 349: return Subject.current(); >>

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v5]

2024-01-30 Thread Gerard Ziemski
On Tue, 30 Jan 2024 16:17:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option),

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-30 Thread Bernd Eckenfels
Is that actually safe to allow low priveledged user context to attach and control to a higher prived? It can at least overwrite files, but probably also inject code? On the native level a ptrace(2) would probably not be allowed. Gruß Bernd — https://bernd.eckenfels.net

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v4]

2024-01-30 Thread Jaikiran Pai
On Tue, 30 Jan 2024 06:52:49 GMT, David Holmes wrote: >> src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 129: >> >>> 127: /* Find max allowed file descriptors for a process >>> 128: * and assume all were opened for the parent process and >>> 129: * copied over to

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v2]

2024-01-30 Thread Jaikiran Pai
On Mon, 29 Jan 2024 17:45:34 GMT, Gerard Ziemski wrote: >> Hello Gerard, my understanding is that the limit value configured may exceed >> the int range. I wanted to avoid the overflow by casting it to int in such >> cases. I had noticed close() takes an int, but I couldn't think of any other

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v4]

2024-01-30 Thread Jaikiran Pai
On Tue, 30 Jan 2024 07:14:45 GMT, Alan Bateman wrote: >> If we are going to check close for errors then we will have to know for >> certain we are only trying to close open fd's, and we will have to deal with >> EINTR. I would think this is a "best effort" to close open FD's and not >>

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v5]

2024-01-30 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8324668? > > This change proposes to fix the issue in jdwp where when launching a child > process (for the `launch=` option), it iterates over an extremely large > number of file

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-30 Thread Daniel Fuchs
On Tue, 30 Jan 2024 13:53:37 GMT, Daniel Fuchs wrote: >> This code change adds an alternative implementation of user-based >> authorization `Subject` APIs that doesn't depend on Security Manager APIs. >> Depending on if the Security Manager is allowed, the methods store the >> current subject

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-30 Thread Daniel Fuchs
On Wed, 17 Jan 2024 23:41:53 GMT, Weijun Wang wrote: > This code change adds an alternative implementation of user-based > authorization `Subject` APIs that doesn't depend on Security Manager APIs. > Depending on if the Security Manager is allowed, the methods store the > current subject

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-30 Thread Severin Gehwolf
On Tue, 30 Jan 2024 10:47:22 GMT, Sebastian Lövdahl wrote: > 8307977: jcmd and jstack broken for target processes running with elevated > capabilities `test/hotspot/jtreg/serviceability` tests would also be worth running. - PR Comment:

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-30 Thread Daniel Fuchs
On Wed, 17 Jan 2024 23:41:53 GMT, Weijun Wang wrote: > This code change adds an alternative implementation of user-based > authorization `Subject` APIs that doesn't depend on Security Manager APIs. > Depending on if the Security Manager is allowed, the methods store the > current subject

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-30 Thread Severin Gehwolf
On Tue, 30 Jan 2024 10:57:09 GMT, Sebastian Lövdahl wrote: > I have poked around in the JDK sources but not found any tests related to > this. Is there some prior art to look at? Please run container tests, which do some jcmd testing across containers (host system runs `jcmd` and containers

Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-30 Thread Ioi Lam
On Tue, 30 Jan 2024 12:13:00 GMT, Andrew Haley wrote: > > The only "perfect" solution is putting the HotSpot code in a namespace. > > This is going to be a huge undertaking. I don't think we have enough > > interest in the OpenJDK community to make such a change now. > > I don't think that

Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-30 Thread Andrew Haley
On Tue, 30 Jan 2024 12:01:56 GMT, Ioi Lam wrote: > The only "perfect" solution is putting the HotSpot code in a namespace. This > is going to be a huge undertaking. I don't think we have enough interest in > the OpenJDK community to make such a change now. I don't think that putting all of

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-30 Thread Per Lundberg
On Tue, 30 Jan 2024 10:47:22 GMT, Sebastian Lövdahl wrote: > 8307977: jcmd and jstack broken for target processes running with elevated > capabilities src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java line 217: > 215: // Instead, attach relative to the target root

Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-30 Thread Ioi Lam
On Tue, 30 Jan 2024 10:27:08 GMT, Andrew Haley wrote: > > > > Maybe we could live with symbol redefinition using #define > > > > (conditionally for static linking in OpenJDK, as Coleen suggested > > > > earlier) for now, until the tooling can support symbol localizing > > > > better. Then

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-30 Thread Thomas Stuefe
On Tue, 30 Jan 2024 10:47:22 GMT, Sebastian Lövdahl wrote: > 8307977: jcmd and jstack broken for target processes running with elevated > capabilities ping @jerboaa - PR Comment: https://git.openjdk.org/jdk/pull/17628#issuecomment-1916676356

Re: RFR: 8307977: Fix dynamic attach to processes with elevated capabilities on Linux

2024-01-30 Thread Sebastian Lövdahl
On Tue, 30 Jan 2024 10:47:22 GMT, Sebastian Lövdahl wrote: > 8307977: Fix dynamic attach to processes with elevated capabilities on Linux I have poked around in the JDK sources but not found any tests related to this. Is there some prior art to look at? Anyway, this is how I reproduced it

RFR: 8307977: Fix dynamic attach to processes with elevated capabilities on Linux

2024-01-30 Thread Sebastian Lövdahl
8307977: Fix dynamic attach to processes with elevated capabilities on Linux - Commit messages: - 8307977: Fix dynamic attach to processes with elevated capabilities on Linux Changes: https://git.openjdk.org/jdk/pull/17628/files Webrev:

Re: RFR: 8324880: Rename get_stack_trace.h

2024-01-30 Thread Serguei Spitsyn
On Tue, 30 Jan 2024 03:43:15 GMT, Kim Barrett wrote: > Please review this trivial change that renames the file > test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h > to get_stack_trace.hpp, and renames uses of NULL in that file. > > The updates to #include lines in

Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-30 Thread Andrew Haley
On Tue, 30 Jan 2024 04:20:21 GMT, Jiangli Zhou wrote: > > > Maybe we could live with symbol redefinition using #define (conditionally > > > for static linking in OpenJDK, as Coleen suggested earlier) for now, > > > until the tooling can support symbol localizing better. Then localizing > > >

Re: RFR: 8324880: Rename get_stack_trace.h

2024-01-30 Thread Julian Waters
On Tue, 30 Jan 2024 03:43:15 GMT, Kim Barrett wrote: > Please review this trivial change that renames the file > test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h > to get_stack_trace.hpp, and renames uses of NULL in that file. > > The updates to #include lines in