Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-10 Thread Serguei Spitsyn
On Wed, 9 Apr 2025 08:14:04 GMT, Serguei Spitsyn wrote: > As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v4]

2025-04-10 Thread Serguei Spitsyn
On Thu, 10 Apr 2025 17:59:15 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v4]

2025-04-10 Thread David Holmes
On Thu, 10 Apr 2025 17:59:15 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v4]

2025-04-10 Thread Chris Plummer
On Thu, 10 Apr 2025 17:59:15 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v4]

2025-04-10 Thread Leonid Mesnik
On Thu, 10 Apr 2025 17:59:15 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v4]

2025-04-10 Thread Serguei Spitsyn
> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems (deadlocks) for the debugger or debug agent. The > [JDK

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v3]

2025-04-10 Thread Serguei Spitsyn
On Thu, 10 Apr 2025 05:50:23 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-10 Thread Serguei Spitsyn
On Wed, 9 Apr 2025 20:38:08 GMT, Chris Plummer wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause proble

RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-10 Thread Serguei Spitsyn
As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI `GetThreadGroupChildren` does an upcall to java. This results in a`ClassPrepare` event the first time it does this, and these events can cause problems (deadlocks) for the debugger or debug agent. The [JDK-8352088](

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v3]

2025-04-10 Thread Leonid Mesnik
On Thu, 10 Apr 2025 05:50:23 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v3]

2025-04-10 Thread Serguei Spitsyn
On Thu, 10 Apr 2025 05:50:23 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v3]

2025-04-10 Thread David Holmes
On Thu, 10 Apr 2025 05:50:23 GMT, Serguei Spitsyn wrote: >> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), >> JVMTI `GetThreadGroupChildren` does an upcall to java. This results in >> a`ClassPrepare` event the first time it does this, and these events can >> cause pro

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v3]

2025-04-09 Thread Serguei Spitsyn
> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems (deadlocks) for the debugger or debug agent. The > [JDK

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v3]

2025-04-09 Thread Serguei Spitsyn
On Wed, 9 Apr 2025 23:27:00 GMT, Chris Plummer wrote: >> Okay, thanks! Updated now. > >> Catch if this invariant is not broken > I think you mean "Catch if this invariant is broken" Okay, thanks! Fixed this comment now in both places. - PR Review Comment: https://git.openjdk.org/jd

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v2]

2025-04-09 Thread Chris Plummer
On Wed, 9 Apr 2025 22:34:47 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiExport.cpp line 1419: >> >>> 1417: // ClassPrepare events are important for JDWP agent but not >>> expected during such upcalls. >>> 1418: // Catch if this invariant is not broken. >>> 1419: asse

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v2]

2025-04-09 Thread Serguei Spitsyn
> As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems (deadlocks) for the debugger or debug agent. The > [JDK

Re: RFR: 8352773: JVMTI should disable events during java upcalls [v2]

2025-04-09 Thread Serguei Spitsyn
On Wed, 9 Apr 2025 19:21:21 GMT, Coleen Phillimore wrote: > So this is another case where you have to ignore JVMTI event like in VTMS > transitions? It looks like a good way to fix this in general. Yes. This is a long standing issue which is good to fix now. - PR Comment: https://

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-09 Thread Chris Plummer
On Wed, 9 Apr 2025 08:14:04 GMT, Serguei Spitsyn wrote: > As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-09 Thread Chris Plummer
On Wed, 9 Apr 2025 08:14:04 GMT, Serguei Spitsyn wrote: > As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-09 Thread Leonid Mesnik
On Wed, 9 Apr 2025 08:14:04 GMT, Serguei Spitsyn wrote: > As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-09 Thread Coleen Phillimore
On Wed, 9 Apr 2025 08:14:04 GMT, Serguei Spitsyn wrote: > As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-09 Thread Serguei Spitsyn
On Wed, 9 Apr 2025 08:39:14 GMT, Alan Bateman wrote: > If this goes ahead then it allows for a discussion about changing JVMTI > InterruptThread to invoke Thread.interrupt when the target is a platform > thread. As you know, there is a long standing issue here where threads > blocked on interr

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-09 Thread Alan Bateman
On Wed, 9 Apr 2025 08:14:04 GMT, Serguei Spitsyn wrote: > As noted in [JDK-8352088](https://bugs.openjdk.org/browse/JDK-8352088), JVMTI > `GetThreadGroupChildren` does an upcall to java. This results in > a`ClassPrepare` event the first time it does this, and these events can cause > problems

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-03-25 Thread Chris Plummer
On Tue, 25 Mar 2025 20:36:28 GMT, Chris Plummer wrote: > Calling ThreadGroupReference.groups() from an event handler can cause a > deadlock. Details in first comment. Tested with :jdk_lang on all supported > platforms and tier1, tier2, tier3, and tier5 svc testing. The reason is because this J

RFR: 8352773: JVMTI should disable events during java upcalls

2025-03-25 Thread Chris Plummer
Calling ThreadGroupReference.groups() from an event handler can cause a deadlock. Details in first comment. Tested with :jdk_lang on all supported platforms and tier1, tier2, tier3, and tier5 svc testing. - Commit messages: - get rid of unused breakpoint event code - fix more jche