Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-09 Thread Serguei Spitsyn
On Thu, 8 Feb 2024 07:05:38 GMT, David Holmes wrote: > I think the only way to make sense of this is to actually set up scenarios > where we have different threads contending on entry, different threads > waiting and different threads re-entering after being notified, and see what > values

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-09 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; >

Integrated: JDK-8311076: RedefineClasses doesn't check for ConstantPool overflow

2024-02-09 Thread Alex Menkov
On Wed, 7 Feb 2024 20:53:53 GMT, Alex Menkov wrote: > The fix adds check that merged constant pool does not overflow u2 (two-byte > unsigned). > The check is added after merging `the_class` and `scratch_class` constant > pools, but before rewriting constant pool references. > > testing: > -

Re: RFR: JDK-8311076: RedefineClasses doesn't check for ConstantPool overflow [v2]

2024-02-09 Thread Coleen Phillimore
On Fri, 9 Feb 2024 20:42:14 GMT, Alex Menkov wrote: >> The fix adds check that merged constant pool does not overflow u2 (two-byte >> unsigned). >> The check is added after merging `the_class` and `scratch_class` constant >> pools, but before rewriting constant pool references. >> >> testing:

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-09 Thread Serguei Spitsyn
On Thu, 8 Feb 2024 15:29:47 GMT, Daniel D. Daugherty wrote: >> Yes, I've figured this out now. Thank you for pointing to it. >> It feels, the counts can be calculated correctly without touching the >> implementation of `current_pending_monitor()`, `current_waiting_monitor()`, >> `_contensions`

Re: RFR: JDK-8311076: RedefineClasses doesn't check for ConstantPool overflow [v2]

2024-02-09 Thread Alex Menkov
On Fri, 9 Feb 2024 03:27:54 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 1828: >> >>> 1826: // ensure merged constant pool size does not overflow u2 >>> 1827: if (merge_cp_length > 0x) { >>> 1828: return JVMTI_ERROR_INTERNAL; >> >> Doesn't

Re: RFR: JDK-8311076: RedefineClasses doesn't check for ConstantPool overflow [v2]

2024-02-09 Thread Leonid Mesnik
On Fri, 9 Feb 2024 20:42:14 GMT, Alex Menkov wrote: >> The fix adds check that merged constant pool does not overflow u2 (two-byte >> unsigned). >> The check is added after merging `the_class` and `scratch_class` constant >> pools, but before rewriting constant pool references. >> >> testing:

Re: RFR: JDK-8311076: RedefineClasses doesn't check for ConstantPool overflow [v2]

2024-02-09 Thread Alex Menkov
> The fix adds check that merged constant pool does not overflow u2 (two-byte > unsigned). > The check is added after merging `the_class` and `scratch_class` constant > pools, but before rewriting constant pool references. > > testing: > - sanity tier1; > - all

Re: RFR: 8319578: Few java/lang/instrument ignore test.java.opts and accept test.vm.opts only

2024-02-09 Thread Leonid Mesnik
On Thu, 8 Feb 2024 23:26:30 GMT, Leonid Mesnik wrote: > There are several .sh tests which use ${TESTVMOPTS} only. Updated them to > use ${TESTJAVAOPTS} also. > Tested by running them with different options and tier1. @kevinjwalls, @plummercj Thank you for review. I run tests with all

Re: RFR: 8226919: attach in linux hangs due to permission denied accessing /proc/pid/root

2024-02-09 Thread Sebastian Lövdahl
On Fri, 9 Feb 2024 18:22:47 GMT, Kevin Walls wrote: >> Alright, sounds good to me. :) Thanks again for taking a look! >> >>> One other thing - JDK-8226919 looks like the original bug for this, logged >>> a few years back, so if this fixes both, the record should show that it >>> fixes that

Integrated: 8319578: Few java/lang/instrument ignore test.java.opts and accept test.vm.opts only

2024-02-09 Thread Leonid Mesnik
On Thu, 8 Feb 2024 23:26:30 GMT, Leonid Mesnik wrote: > There are several .sh tests which use ${TESTVMOPTS} only. Updated them to > use ${TESTJAVAOPTS} also. > Tested by running them with different options and tier1. This pull request has now been integrated. Changeset: 3ebe6c19 Author:

Integrated: 8316460: 4 javax/management tests ignore VM flags

2024-02-09 Thread Leonid Mesnik
On Thu, 8 Feb 2024 05:38:32 GMT, Leonid Mesnik wrote: > The tests > javax/management/ImplementationVersion/ImplVersionTest.java > javax/management/remote/mandatory/connection/DefaultAgentFilterTest.java > javax/management/remote/mandatory/version/ImplVersionTest.java >

Integrated: 8226919: attach in linux hangs due to permission denied accessing /proc/pid/root

2024-02-09 Thread Sebastian Lövdahl
On Tue, 30 Jan 2024 10:47:22 GMT, Sebastian Lövdahl wrote: > 8226919: attach in linux hangs due to permission denied accessing > /proc/pid/root This pull request has now been integrated. Changeset: ac4607ed Author:Sebastian Lövdahl Committer: Kevin Walls URL:

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

2024-02-09 Thread Kevin Walls
On Fri, 9 Feb 2024 18:17:58 GMT, Sebastian Lövdahl wrote: > I'll still fix this. So, I should change the PR title to match JDK-8226919, > and issue an `/issue remove` command for JDK-8307977, is that correct? Yes exactly, thanks. - PR Comment:

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

2024-02-09 Thread Sebastian Lövdahl
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 Alright, sounds good to me. :) Thanks again for taking a look! > One other thing - JDK-8226919 looks like the original bug for this, logged a

Re: RFR: 8325558: Add jcheck whitespace checking for properties files

2024-02-09 Thread Naoto Sato
On Fri, 9 Feb 2024 13:35:55 GMT, Magnus Ihse Bursie wrote: > This is an attempt to finally implement the idea brought forward in > JDK-8295729: Properties files is essentially source code. It should have the > same whitespace checks as all other source code, so we don't get spurious >

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

2024-02-09 Thread Kevin Walls
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 Marked as reviewed by kevinw (Reviewer). Hi, looking at it again: Getting a target's current directory, you have to use /proc/PID/cwd, or you

Re: RFR: 8319578: Few java/lang/instrument ignore test.java.opts and accept test.vm.opts only

2024-02-09 Thread Chris Plummer
On Thu, 8 Feb 2024 23:26:30 GMT, Leonid Mesnik wrote: > There are several .sh tests which use ${TESTVMOPTS} only. Updated them to > use ${TESTJAVAOPTS} also. > Tested by running them with different options and tier1. The changes look fine. What testing have you done? Would be good to test

Re: RFR: 8323883: JFR AssertionError: Missing object ID 15101

2024-02-09 Thread Erik Gahlin
On Thu, 8 Feb 2024 13:46:40 GMT, Markus Grönlund wrote: > Greetings, > > The following adjustments fix the intermittent issues with incomplete tag > sets for a chunk. The situations are pretty subtle: > > 1. A situation can occur where an event is emitted during the event > instrumentation

Re: RFR: 8325558: Add jcheck whitespace checking for properties files

2024-02-09 Thread Erik Joelsson
On Fri, 9 Feb 2024 13:42:02 GMT, Magnus Ihse Bursie wrote: >> This is an attempt to finally implement the idea brought forward in >> JDK-8295729: Properties files is essentially source code. It should have >> the same whitespace checks as all other source code, so we don't get >> spurious

Re: RFR: 8325558: Add jcheck whitespace checking for properties files

2024-02-09 Thread Daniel Fuchs
On Fri, 9 Feb 2024 13:35:55 GMT, Magnus Ihse Bursie wrote: > This is an attempt to finally implement the idea brought forward in > JDK-8295729: Properties files is essentially source code. It should have the > same whitespace checks as all other source code, so we don't get spurious >

Re: RFR: 8325558: Add jcheck whitespace checking for properties files

2024-02-09 Thread Magnus Ihse Bursie
On Fri, 9 Feb 2024 13:35:55 GMT, Magnus Ihse Bursie wrote: > This is an attempt to finally implement the idea brought forward in > JDK-8295729: Properties files is essentially source code. It should have the > same whitespace checks as all other source code, so we don't get spurious >

Re: RFR: 8325558: Add jcheck whitespace checking for properties files

2024-02-09 Thread Magnus Ihse Bursie
On Fri, 9 Feb 2024 13:35:55 GMT, Magnus Ihse Bursie wrote: > This is an attempt to finally implement the idea brought forward in > JDK-8295729: Properties files is essentially source code. It should have the > same whitespace checks as all other source code, so we don't get spurious >

RFR: 8325558: Add jcheck whitespace checking for properties files

2024-02-09 Thread Magnus Ihse Bursie
This is an attempt to finally implement the idea brought forward in JDK-8295729: Properties files is essentially source code. It should have the same whitespace checks as all other source code, so we don't get spurious trailing whitespace changes or leading tabs instead of spaces. With Skara

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

2024-02-09 Thread Alan Bateman
On Thu, 8 Feb 2024 07:44:18 GMT, Magnus Ihse Bursie wrote: >> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we >> should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK >> native libraries. > > Magnus Ihse Bursie has updated the pull request

Re: RFR: 8319578: Few java/lang/instrument ignore test.java.opts and accept test.vm.opts only

2024-02-09 Thread Kevin Walls
On Thu, 8 Feb 2024 23:26:30 GMT, Leonid Mesnik wrote: > There are several .sh tests which use ${TESTVMOPTS} only. Updated them to > use ${TESTJAVAOPTS} also. > Tested by running them with different options and tier1. Marked as reviewed by kevinw (Reviewer). - PR Review:

Re: RFR: 8325464: GCCause.java out of sync with gcCause.hpp [v2]

2024-02-09 Thread Thomas Schatzl
On Fri, 9 Feb 2024 05:31:17 GMT, Yifeng Jin wrote: >> These two files (`GCCause.java` and `gcCause.hpp`) should be in sync by >> design, see comments in these two files. However, some recent changes (e.g. >> [JDK-8240239](https://bugs.openjdk.org/browse/JDK-8240239)) to `gcCause.hpp` >> were