Re: RFR: 8316658: serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java fails intermittently [v2]

2023-09-26 Thread Jean-Philippe Bempel
On Tue, 26 Sep 2023 14:28:49 GMT, Jean-Philippe Bempel wrote: >> increase Metaspace size and loop count to avoid OOME in nominal case > > Jean-Philippe Bempel has updated the pull request incrementally with one > additional commit since the last revision: > > Adjust metaspace to 17M and iter

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread David Holmes
On Wed, 27 Sep 2023 00:44:30 GMT, Chris Plummer wrote: >> I made a pass over the deadlock detection code involved. Nothing stuck out. >> There's not much in the way of SA-isms in this code. I think anyone with an >> understanding of how hotspot locking works should be able to navigate it >> pr

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread David Holmes
On Wed, 27 Sep 2023 00:44:30 GMT, Chris Plummer wrote: >> I made a pass over the deadlock detection code involved. Nothing stuck out. >> There's not much in the way of SA-isms in this code. I think anyone with an >> understanding of how hotspot locking works should be able to navigate it >> pr

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 22:55:27 GMT, Chris Plummer wrote: >> Yeah, I also haven't seen a good explanation for why this is happening yet. >> I'll also look into SA, but I don't understand the hotspot code it is trying >> to emulate that well so not sure how useful I'll be. > > I made a pass over th

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 22:10:15 GMT, Chris Plummer wrote: >> Switching the order did not fix the problem. >> >> Even if we end up resolving that this is just something that can happen when >> SA inspects things, I'd prefer to understand how this can arise. I guess I >> need to look into how the S

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems.

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 13:49:02 GMT, Varada M wrote: > Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scena

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 20:41:33 GMT, David Holmes wrote: >> I'm not seeing that this code has much impact on the failure rate. I've >> tried changing the order and also have tried adding a nanosleep(). Always >> fails at about the same rate. > > Switching the order did not fix the problem. > > Ev

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems.

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 16:12:01 GMT, Chris Plummer wrote: >> Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) >> where AttachCurrentThread is failing on AIX due t stack size issue. >> Test cases: >> runtime/jni/terminatedThread/TestTerminatedThread.java >> vmTestbase/nsk/j

Re: RFR: 8316658: serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java fails intermittently [v2]

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 14:28:49 GMT, Jean-Philippe Bempel wrote: >> increase Metaspace size and loop count to avoid OOME in nominal case > > Jean-Philippe Bempel has updated the pull request incrementally with one > additional commit since the last revision: > > Adjust metaspace to 17M and iter

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v4]

2023-09-26 Thread Coleen Phillimore
On Tue, 26 Sep 2023 08:35:10 GMT, Afshin Zafari wrote: >> 1. `ArrayAllocatorMallocLimit` is removed. The test cases that tested it >> also are removed. >> 2. `AllocArrayAllocator` instances are replaced with `MallocArrayAllocator`. >> 3. The signature of `CHeapBitMap::free(ptr, size)` is kept as

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method [v5]

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 09:02:48 GMT, Afshin Zafari wrote: >> The `find` method now is >> ```C++ >> template >> int find(T* token, bool f(T*, E)) const { >> ... >> >> Any other functions which use this are also changed. >> Local linux-x64-debug hotspot:tier1 passed. Mach5 tier1 build on linux and

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v4]

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 08:35:10 GMT, Afshin Zafari wrote: >> 1. `ArrayAllocatorMallocLimit` is removed. The test cases that tested it >> also are removed. >> 2. `AllocArrayAllocator` instances are replaced with `MallocArrayAllocator`. >> 3. The signature of `CHeapBitMap::free(ptr, size)` is kept as

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 20:20:29 GMT, Chris Plummer wrote: >> I managed to get it to fail 4/100 times in our CI so armed with that I will >> try swapping the order. Though I have to admit I tend to agree with Chris >> that the code in question seems unlikely to be executed such that this >> failur

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 12:02:52 GMT, David Holmes wrote: >> Ok! >> So we would have to swap the popping and state-update at least. Unless we >> insert members between them, the updates would still be observable in any >> order, I suppose, but inserting membars just to make SA happy seems a bit >>

Re: RFR: 8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < numberOfJavaProcessesAtInitialization

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 16:50:12 GMT, Leonid Mesnik wrote: >> Thanks Leonid, I didn't see much value in that - we can see in the same file >> the return value of currentQueryIndexForProcess() is going to be -1 or an >> index from the for loop iteration from 0 to INT_MAX. >> We can do that if you re

Integrated: 8304839: Move TestScaffold.main() to the separate class DebugeeWrapper

2023-09-26 Thread Leonid Mesnik
On Thu, 21 Sep 2023 21:58:15 GMT, Leonid Mesnik wrote: > The code related to virtual threads support is moved into a separate class > DebugeeWrapper. > > The code of method main() remains the same. I don't mix code change with > moving code between files. > > Tesed by running > make run-test

Re: RFR: 8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < numberOfJavaProcessesAtInitialization

2023-09-26 Thread Leonid Mesnik
On Tue, 26 Sep 2023 08:59:21 GMT, Kevin Walls wrote: >> src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c >> line 780: >> >>> 778: int currentQueryIndex = currentQueryIndexForProcess(); >>> 779: >>> 780: assert(currentQueryIndex < numberOfJavaProcessesAtInitiali

Re: RFR: 8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < numberOfJavaProcessesAtInitialization

2023-09-26 Thread Leonid Mesnik
On Thu, 14 Sep 2023 17:24:39 GMT, Kevin Walls wrote: > This assert happens rarely, but is seen in testing a few times. > > getCurrentQueryIndexForProcess comments that it can return -1, but it asserts > that the value is >=0 > > If we let it return -1 for failure as its comment documents, the

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems.

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 13:49:02 GMT, Varada M wrote: > Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scena

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems.

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 13:49:02 GMT, Varada M wrote: > Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scena

Re: RFR: JDK-8219652: [aix] Tests failing with JNI attach problems.

2023-09-26 Thread Chris Plummer
On Tue, 26 Sep 2023 13:49:02 GMT, Varada M wrote: > Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scena

Re: RFR: 8316658: serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java fails intermittently [v2]

2023-09-26 Thread Jean-Philippe Bempel
> increase Metaspace size and loop count to avoid OOME in nominal case Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: Adjust metaspace to 17M and iterations to 700 - Changes: - all: https://git.openjdk.org/jdk

Re: RFR: 8315966: Relativize initial_sp in interpreter frames [v2]

2023-09-26 Thread Martin Doerr
On Tue, 26 Sep 2023 11:41:52 GMT, Fredrik Bredberg wrote: >> Relativize initial_sp in interpreter frames. >> >> By changing the "initial_sp" (AKA "monitor_block_top" or "monitors" on >> PowerPC) member in interpreter frames from being an absolute address into an >> offset that is relative to

Re: RFR: 8315966: Relativize initial_sp in interpreter frames [v2]

2023-09-26 Thread Fei Yang
On Tue, 26 Sep 2023 12:01:34 GMT, Fredrik Bredberg wrote: > The "Updated after review" version contains the following changes. > > 1. The extra space in `interp_masm_riscv.cpp` was removed. I see `shadd` added in other files are not covered? They have similar issues. Looks good otherwise. Tha

RFR: JDK-8219652: [aix] Tests failing with JNI attach problems.

2023-09-26 Thread Varada M
Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) where AttachCurrentThread is failing on AIX due t stack size issue. Test cases: runtime/jni/terminatedThread/TestTerminatedThread.java vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.java vmT

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-26 Thread Coleen Phillimore
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-26 Thread Roman Kennke
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v24]

2023-09-26 Thread Volker Simonis
On Tue, 19 Sep 2023 22:48:16 GMT, Jonathan Joo wrote: >> 8315149: Add hsperf counters for CPU time of internal GC threads > > Jonathan Joo has updated the pull request incrementally with one additional > commit since the last revision: > > Fix build issues Thanks for your continued work on t

Re: RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v24]

2023-09-26 Thread Aleksey Shipilev
On Fri, 22 Sep 2023 03:28:18 GMT, David Holmes wrote: >> Using `long` is to avoid build failure on 32-bit ARM and x86. `jlong` is >> `long long` on 32-bit, and Atomic template does not support `long long` on >> 32-bit. Example failure: >> https://github.com/jjoo172/jdk/actions/runs/6229455243/

RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-26 Thread Coleen Phillimore
This change makes WeakHandle and OopHandle release null out the obj pointer, at the cost of making the release function non-const and some changes that propagated from that. This enables ObjectMonitor code to test for null to see if the obj was already released, and seems like the right thing t

Re: RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"

2023-09-26 Thread David Holmes
On Tue, 26 Sep 2023 05:04:57 GMT, Roman Kennke wrote: >> Atomicity means guaranteeing that a 2 or more operations are executed as if >> they are single operation from the viewpoint of other threads. There's no >> such concept with SA. The state is frozen, so SA can look at anything >> without

Re: RFR: 8315966: Relativize initial_sp in interpreter frames [v2]

2023-09-26 Thread Fredrik Bredberg
On Thu, 21 Sep 2023 12:45:07 GMT, Fei Yang wrote: >> Hi, I have arranged tier1-3 test on linux-riscv64 platform. Thanks for >> adding handling for riscv. > >> Hi, I have arranged tier1-3 test on linux-riscv64 platform. Thanks for >> adding handling for riscv. > > Tier1-3 test is clean. The ris

Re: RFR: 8316658: serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java fails intermittently

2023-09-26 Thread David Holmes
On Fri, 22 Sep 2023 08:36:10 GMT, Jean-Philippe Bempel wrote: > increase Metaspace size and loop count to avoid OOME in nominal case Okay 17M/700 seems to work okay in our CI, and fails without the fix. - PR Comment: https://git.openjdk.org/jdk/pull/15882#issuecomment-1735404131

Re: RFR: 8315966: Relativize initial_sp in interpreter frames [v2]

2023-09-26 Thread Fredrik Bredberg
On Wed, 20 Sep 2023 08:46:39 GMT, Fei Yang wrote: >> Fredrik Bredberg has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Updated after review. > > src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 704: > >> 702: // register for unlock_o

Re: RFR: 8315966: Relativize initial_sp in interpreter frames [v2]

2023-09-26 Thread Fredrik Bredberg
> Relativize initial_sp in interpreter frames. > > By changing the "initial_sp" (AKA "monitor_block_top" or "monitors" on > PowerPC) member in interpreter frames from being an absolute address into an > offset that is relative to the frame pointer, we don't need to change the > value as we free

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method [v5]

2023-09-26 Thread Afshin Zafari
On Tue, 26 Sep 2023 09:02:48 GMT, Afshin Zafari wrote: >> The `find` method now is >> ```C++ >> template >> int find(T* token, bool f(T*, E)) const { >> ... >> >> Any other functions which use this are also changed. >> Local linux-x64-debug hotspot:tier1 passed. Mach5 tier1 build on linux and

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method [v5]

2023-09-26 Thread Afshin Zafari
> The `find` method now is > ```C++ > template > int find(T* token, bool f(T*, E)) const { > ... > > Any other functions which use this are also changed. > Local linux-x64-debug hotspot:tier1 passed. Mach5 tier1 build on linux and > Windows passed. Afshin Zafari has updated the pull request wit

Re: RFR: 8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < numberOfJavaProcessesAtInitialization

2023-09-26 Thread Kevin Walls
On Wed, 20 Sep 2023 22:08:27 GMT, Leonid Mesnik wrote: >> This assert happens rarely, but is seen in testing a few times. >> >> getCurrentQueryIndexForProcess comments that it can return -1, but it >> asserts that the value is >=0 >> >> If we let it return -1 for failure as its comment documen

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v2]

2023-09-26 Thread Afshin Zafari
On Tue, 26 Sep 2023 02:07:41 GMT, David Holmes wrote: >> Afshin Zafari has updated the pull request incrementally with one additional >> commit since the last revision: >> >> other size_t flags than the ArrayAllocatorMallocLimit are used in tests. > > test/lib-test/jdk/test/whitebox/vm_flags/

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v4]

2023-09-26 Thread Afshin Zafari
> 1. `ArrayAllocatorMallocLimit` is removed. The test cases that tested it also > are removed. > 2. `AllocArrayAllocator` instances are replaced with `MallocArrayAllocator`. > 3. The signature of `CHeapBitMap::free(ptr, size)` is kept as it is, since it > is called in this way from `GrowableBitMa

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v2]

2023-09-26 Thread Afshin Zafari
On Tue, 26 Sep 2023 02:04:14 GMT, David Holmes wrote: >> Afshin Zafari has updated the pull request incrementally with one additional >> commit since the last revision: >> >> other size_t flags than the ArrayAllocatorMallocLimit are used in tests. > > test/hotspot/jtreg/serviceability/attach/

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v3]

2023-09-26 Thread Afshin Zafari
> 1. `ArrayAllocatorMallocLimit` is removed. The test cases that tested it also > are removed. > 2. `AllocArrayAllocator` instances are replaced with `MallocArrayAllocator`. > 3. The signature of `CHeapBitMap::free(ptr, size)` is kept as it is, since it > is called in this way from `GrowableBitMa