Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint [v3]

2025-06-30 Thread David Holmes
On Tue, 1 Jul 2025 03:17:41 GMT, Leonid Mesnik wrote: >> The segv/eav happens in the case if JvmtiBreakpoint::_method's class >> redefined old between getting the Method* from jmethodid in the >> JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and >> and actual setting breakpo

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint [v3]

2025-06-30 Thread Leonid Mesnik
> The segv/eav happens in the case if JvmtiBreakpoint::_method's class > redefined old between getting the Method* from jmethodid in the > JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and > and actual setting breakpoint in the VM operation VM_ChangeBreakpoints. > > Here are

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v3]

2025-06-30 Thread David Holmes
On Mon, 30 Jun 2025 13:03:23 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> ```IterateOverHeapObjectClosure::do_object()``` located in the file >> ```src/hotspot/share/prims/jvmtiTagMap.cpp``` with static code analysis. >> This defect can potentially

Re: RFR: 8359870: JVM crashes in AccessInternal::PostRuntimeDispatch [v7]

2025-06-30 Thread David Holmes
On Mon, 30 Jun 2025 11:24:28 GMT, Kevin Walls wrote: >> ThreadDumper/ThreadSnapshot need to handle a failure to resolve the native >> VM JavaThread from a java.lang.Thread. This is hard to reproduce but a >> thread that has since terminated can provoke a crash. Recognise this and >> return a

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v12]

2025-06-30 Thread David Holmes
On Tue, 1 Jul 2025 01:55:48 GMT, Coleen Phillimore wrote: >> I copied this code for another test in the Valhalla repo and thought it >> would be a good utility function. It might be better written using the >> Classfile API. >> Tested with test. > > Coleen Phillimore has updated the pull reque

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint [v2]

2025-06-30 Thread David Holmes
On Mon, 30 Jun 2025 21:20:55 GMT, Leonid Mesnik wrote: >> The segv/eav happens in the case if JvmtiBreakpoint::_method's class >> redefined old between getting the Method* from jmethodid in the >> JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and >> and actual setting breakp

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v11]

2025-06-30 Thread Coleen Phillimore
On Mon, 30 Jun 2025 23:26:17 GMT, Leonid Mesnik wrote: >> Coleen Phillimore has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Update test/lib/RedefineClassHelper.java >> >>Co-authored-by: David Holmes >> <62092539+dholmes-...@

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v12]

2025-06-30 Thread Coleen Phillimore
> I copied this code for another test in the Valhalla repo and thought it would > be a good utility function. It might be better written using the Classfile > API. > Tested with test. Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revisio

Re: RFR: 8359958: Cleanup "local" debuggee references after JDK-8333117 removed support for non-local debuggees [v2]

2025-06-30 Thread Alex Menkov
On Thu, 19 Jun 2025 00:33:42 GMT, Chris Plummer wrote: >> [JDK-8333117](https://bugs.openjdk.org/browse/JDK-8333117) removed support >> for non-local debuggees, so now only local debuggees are supported. However, >> there are now a lot of references to the "local" debuggee mode which are not >

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v3]

2025-06-30 Thread Chris Plummer
On Mon, 30 Jun 2025 13:03:23 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> ```IterateOverHeapObjectClosure::do_object()``` located in the file >> ```src/hotspot/share/prims/jvmtiTagMap.cpp``` with static code analysis. >> This defect can potentially

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v3]

2025-06-30 Thread Alex Menkov
On Mon, 30 Jun 2025 13:03:23 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> ```IterateOverHeapObjectClosure::do_object()``` located in the file >> ```src/hotspot/share/prims/jvmtiTagMap.cpp``` with static code analysis. >> This defect can potentially

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v11]

2025-06-30 Thread Leonid Mesnik
On Mon, 30 Jun 2025 16:49:02 GMT, Coleen Phillimore wrote: >> I copied this code for another test in the Valhalla repo and thought it >> would be a good utility function. It might be better written using the >> Classfile API. >> Tested with test. > > Coleen Phillimore has updated the pull requ

Re: RFR: 8359958: Cleanup "local" debuggee references after JDK-8333117 removed support for non-local debuggees [v2]

2025-06-30 Thread Leonid Mesnik
On Mon, 23 Jun 2025 17:15:29 GMT, Chris Plummer wrote: >> test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java line 50: >> >>> 48: * @see nsk.share.jdwp.Debugee >>> 49: */ >>> 50: public class DebugeeProcess { >> >> Are there any reason to make it non-abstract.. Even DebugeeProces

Re: RFR: 8359958: Cleanup "local" debuggee references after JDK-8333117 removed support for non-local debuggees [v2]

2025-06-30 Thread Leonid Mesnik
On Thu, 19 Jun 2025 00:33:42 GMT, Chris Plummer wrote: >> [JDK-8333117](https://bugs.openjdk.org/browse/JDK-8333117) removed support >> for non-local debuggees, so now only local debuggees are supported. However, >> there are now a lot of references to the "local" debuggee mode which are not >

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint

2025-06-30 Thread Leonid Mesnik
On Sat, 28 Jun 2025 05:02:56 GMT, Leonid Mesnik wrote: > The segv/eav happens in the case if JvmtiBreakpoint::_method's class > redefined old between getting the Method* from jmethodid in the > JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and > and actual setting breakpoint

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint [v2]

2025-06-30 Thread Leonid Mesnik
> The segv/eav happens in the case if JvmtiBreakpoint::_method's class > redefined old between getting the Method* from jmethodid in the > JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and > and actual setting breakpoint in the VM operation VM_ChangeBreakpoints. > > Here are

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint

2025-06-30 Thread Leonid Mesnik
On Mon, 30 Jun 2025 20:47:35 GMT, Serguei Spitsyn wrote: > The issue itself is kind of artificial. The debugger should not set > breakpoints concurrently with class redefinitions. But suppose this can > really happen. Then I have a little preference to fix this by setting a > breakpoint after

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint

2025-06-30 Thread Serguei Spitsyn
On Sat, 28 Jun 2025 05:02:56 GMT, Leonid Mesnik wrote: > The segv/eav happens in the case if JvmtiBreakpoint::_method's class > redefined old between getting the Method* from jmethodid in the > JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and > and actual setting breakpoint

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint

2025-06-30 Thread Serguei Spitsyn
On Mon, 30 Jun 2025 05:53:59 GMT, Leonid Mesnik wrote: > I recently updated RunThese test to have more testing in this areas. As I understand you've added some specific stressing to reliably catch issues like this one. - PR Comment: https://git.openjdk.org/jdk/pull/26031#issuecomm

Re: RFR: 8359870: JVM crashes in AccessInternal::PostRuntimeDispatch [v7]

2025-06-30 Thread Alex Menkov
On Mon, 30 Jun 2025 11:24:28 GMT, Kevin Walls wrote: >> ThreadDumper/ThreadSnapshot need to handle a failure to resolve the native >> VM JavaThread from a java.lang.Thread. This is hard to reproduce but a >> thread that has since terminated can provoke a crash. Recognise this and >> return a

Re: RFR: 8359809: AttributeList, RoleList and UnresolvedRoleList should never accept other types of Object [v4]

2025-06-30 Thread Kevin Walls
> The classes javax.management.AttributeList, and > javax.management.relation.RoleList and UnresolvedRoleList, have a historical > feature where they accept objects of the wrong type, and only check for wrong > objects when the "asList()" method is called. > > This feature should be removed, an

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v10]

2025-06-30 Thread Coleen Phillimore
On Mon, 30 Jun 2025 11:38:23 GMT, Coleen Phillimore wrote: >> I copied this code for another test in the Valhalla repo and thought it >> would be a good utility function. It might be better written using the >> Classfile API. >> Tested with test. > > Coleen Phillimore has updated the pull requ

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v11]

2025-06-30 Thread Coleen Phillimore
> I copied this code for another test in the Valhalla repo and thought it would > be a good utility function. It might be better written using the Classfile > API. > Tested with test. Coleen Phillimore has updated the pull request incrementally with three additional commits since the last revi

Re: Interest in Java based attach provider implementation?

2025-06-30 Thread Laurence Cable
note that for *nix systems that use SIGQUIT as an initiator for attach, there exists a potential fatal "bug" where (especially a programmatic) attach attempt may send SIGQUIT before the target/attachee JVM has initialized such that its signal handlers are installed. If the target JVM has not i

Re: RFR: 8359809: AttributeList, RoleList and UnresolvedRoleList should never accept other types of Object [v3]

2025-06-30 Thread Kevin Walls
> The classes javax.management.AttributeList, and > javax.management.relation.RoleList and UnresolvedRoleList, have a historical > feature where they accept objects of the wrong type, and only check for wrong > objects when the "asList()" method is called. > > This feature should be removed, an

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v3]

2025-06-30 Thread Artem Semenov
> The defect has been detected and confirmed in the function > ```IterateOverHeapObjectClosure::do_object()``` located in the file > ```src/hotspot/share/prims/jvmtiTagMap.cpp``` with static code analysis. This > defect can potentially lead to a null pointer dereference. > > The pointer ```oop

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v10]

2025-06-30 Thread David Holmes
On Mon, 30 Jun 2025 11:38:23 GMT, Coleen Phillimore wrote: >> I copied this code for another test in the Valhalla repo and thought it >> would be a good utility function. It might be better written using the >> Classfile API. >> Tested with test. > > Coleen Phillimore has updated the pull requ

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint

2025-06-30 Thread Coleen Phillimore
On Mon, 30 Jun 2025 11:53:36 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvmtiImpl.cpp line 188: >> >>> 186: >>> 187: void VM_ChangeBreakpoints::doit() { >>> 188: if (_bp->method() != Method::resolve_jmethod_id(_preservred_method)) { >> >> Suggestion: >> >> if (_bp->method() !=

Re: RFR: 8284016: Normalize handshake closure names [v3]

2025-06-30 Thread Anton Artemov
On Fri, 27 Jun 2025 19:48:14 GMT, Daniel D. Daugherty wrote: >> src/hotspot/share/prims/jvmtiEnvBase.hpp line 511: >> >>> 509: }; >>> 510: >>> 511: class SetForceEarlyReturnHandshakeClosure : public >>> JvmtiUnitedHandshakeClosure { >> >> I do not support this unification over JVMTI files. T

Re: RFR: 8284016: Normalize handshake closure names [v3]

2025-06-30 Thread Anton Artemov
> Hi, please consider the following changes: > > There are many classes inherited from the `HandshakeClosure` class, but they > do not follow the same naming convention. In this PR we address this issue, > all names are normalized in the following way: > > `XXXDummyClassNameClosure -> XXXDummyC

Re: RFR: 8359366: RunThese30M.java EXCEPTION_ACCESS_VIOLATION in JvmtiBreakpoints::clearall_in_class_at_safepoint

2025-06-30 Thread Coleen Phillimore
On Mon, 30 Jun 2025 04:38:41 GMT, David Holmes wrote: >> The segv/eav happens in the case if JvmtiBreakpoint::_method's class >> redefined old between getting the Method* from jmethodid in the >> JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {..} and >> and actual setting breakpo

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v10]

2025-06-30 Thread Coleen Phillimore
> I copied this code for another test in the Valhalla repo and thought it would > be a good utility function. It might be better written using the Classfile > API. > Tested with test. Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revisio

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v8]

2025-06-30 Thread Coleen Phillimore
On Mon, 30 Jun 2025 05:22:11 GMT, David Holmes wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename replaceAllStrings to replaceClassName and add back the byte buffer >> version of the function. > > test/li

Re: RFR: 8359870: JVM crashes in AccessInternal::PostRuntimeDispatch [v5]

2025-06-30 Thread Kevin Walls
On Thu, 26 Jun 2025 08:26:44 GMT, Kevin Walls wrote: >> Great catch Dan! I totally missed the TLH at the start of >> `get_thread_snapshot`. I knew something was off here but couldn't quite put >> my finger on it. > > Yes thanks Dan! Will update. Thanks for all the hints, updated to use the TLH

Re: RFR: 8359870: JVM crashes in AccessInternal::PostRuntimeDispatch [v7]

2025-06-30 Thread Kevin Walls
> ThreadDumper/ThreadSnapshot need to handle a failure to resolve the native VM > JavaThread from a java.lang.Thread. This is hard to reproduce but a thread > that has since terminated can provoke a crash. Recognise this and return a > null ThreadSnapshot. Kevin Walls has updated the pull req

Re: RFR: 8359870: JVM crashes in AccessInternal::PostRuntimeDispatch [v5]

2025-06-30 Thread David Holmes
On Fri, 27 Jun 2025 20:22:12 GMT, Alex Menkov wrote: > I believe null here is not result of `_thread_h()`, but is returned by > `java_lang_VirtualThread::continuation(...)` because `_thread_h` is > lava.lang.Thread object and not java.lang.VirtualThread. That could only happen if we are dealin

Re: RFR: 8359707: Add classfile modification code to RedefineClassHelper [v9]

2025-06-30 Thread Coleen Phillimore
> I copied this code for another test in the Valhalla repo and thought it would > be a good utility function. It might be better written using the Classfile > API. > Tested with test. Coleen Phillimore has updated the pull request incrementally with two additional commits since the last revisi

Re: RFR: 8338977: Parallel: Improve heap resizing heuristics [v19]

2025-06-30 Thread Albert Mingkun Yang
> This patch refines Parallel's sizing strategy to improve overall memory > management and performance. > > The young generation layout has been reconfigured from the previous > `eden-from/to` arrangement to a new `from/to-eden` order. This new layout > facilitates young generation resizing, si

Re: RFR: 8338977: Parallel: Improve heap resizing heuristics [v17]

2025-06-30 Thread Albert Mingkun Yang
On Mon, 30 Jun 2025 09:29:28 GMT, Ivan Walulya wrote: >> Albert Mingkun Yang has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 25 commits: >> >> - Merge branch 'master' into pgc-size-policy >> - review >> - cast >> - remove-youn

Re: RFR: 8338977: Parallel: Improve heap resizing heuristics [v3]

2025-06-30 Thread Albert Mingkun Yang
On Mon, 30 Jun 2025 09:08:28 GMT, Ivan Walulya wrote: >>> so that we can do the check after all the GCs >> >> Well, not really. In the old impl, >> `GCOverheadChecker::check_gc_overhead_limit` calls >> `set_gc_overhead_limit_exceeded` only for full-gc. >> >> > But now you only use check_gc_o

Re: RFR: 8338977: Parallel: Improve heap resizing heuristics [v18]

2025-06-30 Thread Albert Mingkun Yang
> This patch refines Parallel's sizing strategy to improve overall memory > management and performance. > > The young generation layout has been reconfigured from the previous > `eden-from/to` arrangement to a new `from/to-eden` order. This new layout > facilitates young generation resizing, si

Re: RFR: 8338977: Parallel: Improve heap resizing heuristics [v17]

2025-06-30 Thread Ivan Walulya
On Thu, 26 Jun 2025 19:17:11 GMT, Albert Mingkun Yang wrote: >> This patch refines Parallel's sizing strategy to improve overall memory >> management and performance. >> >> The young generation layout has been reconfigured from the previous >> `eden-from/to` arrangement to a new `from/to-eden`

Re: RFR: 8338977: Parallel: Improve heap resizing heuristics [v3]

2025-06-30 Thread Ivan Walulya
On Mon, 19 May 2025 06:00:09 GMT, Albert Mingkun Yang wrote: >> src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 363: >> >>> 361: } >>> 362: >>> 363: bool ParallelScavengeHeap::check_gc_overhead_limit() { >> >> In main-line code, the method `check_gc_overhead_limit` is invoked by >

Re: RFR: 8284016: Normalize handshake closure names [v2]

2025-06-30 Thread Anton Artemov
On Fri, 27 Jun 2025 19:02:46 GMT, Serguei Spitsyn wrote: >> Anton Artemov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8284016: Realigned parameters > > src/hotspot/share/prims/jvmtiEnvBase.hpp line 511: > >> 509: }; >> 510: >> 511:

Re: RFR: 8284016: Normalize handshake closure names [v2]

2025-06-30 Thread Anton Artemov
> Hi, please consider the following changes: > > There are many classes inherited from the `HandshakeClosure` class, but they > do not follow the same naming convention. In this PR we address this issue, > all names are normalized in the following way: > > `XXXDummyClassNameClosure -> XXXDummyC

Re: RFR: 8284016: Normalize handshake closure names [v2]

2025-06-30 Thread Anton Artemov
On Fri, 27 Jun 2025 16:45:44 GMT, Coleen Phillimore wrote: > I found a couple of places to realign the parameters, but otherwise this > looks good. I like the new naming conventions. We have a lot of handshakes > now! Were you able to build shenandoah (not built by default, need to add > --ena