Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v17]

2023-04-03 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v16]

2023-04-03 Thread Serguei Spitsyn
On Mon, 3 Apr 2023 18:17:13 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case o

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-04-03 Thread Patricio Chilano Mateo
On Wed, 29 Mar 2023 22:15:35 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > Hi Se

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v16]

2023-04-03 Thread Patricio Chilano Mateo
On Mon, 3 Apr 2023 18:17:13 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case o

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-04-03 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 22:15:35 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > Hi Se

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v16]

2023-04-03 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-04-03 Thread Patricio Chilano Mateo
On Fri, 31 Mar 2023 05:13:04 GMT, Serguei Spitsyn wrote: >> So the race I am talking about is between the main thread running >> finishThreads() and the launcher thread running startThreads(). The main >> thread could execute finishThreads() before the launcher executes >> startThreads(). If y

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v15]

2023-03-31 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v14]

2023-03-31 Thread Serguei Spitsyn
On Fri, 31 Mar 2023 06:52:18 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v14]

2023-03-31 Thread Chris Plummer
On Fri, 31 Mar 2023 06:52:18 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v14]

2023-03-30 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 22:31:02 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: tweak in count_transitions_and_correct_jvmti_thread_states > > test/hotspot/jtreg/serviceability/jvmti/vthr

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 23:11:09 GMT, Patricio Chilano Mateo wrote: >> Thank you for the concern. >> The `startThread()` below which is called from `startThreads()` has the call >> to `thread.ensureReady()` which waits until the target tested thread really >> starts and sets the `threadReady` fiel

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 22:21:06 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: tweak in count_transitions_and_correct_jvmti_thread_states > > test/hotspot/jtreg/serviceability/jvmti/vthr

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 22:17:01 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: tweak in count_transitions_and_correct_jvmti_thread_states > > test/hotspot/jtreg/serviceability/jvmti/vthr

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Patricio Chilano Mateo
On Thu, 30 Mar 2023 21:48:22 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java >> line 129: >> >>> 127: } >>> 128: >>> 129: static synchronized private void startThreads() { >> >> So making this method synch

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Chris Plummer
On Thu, 30 Mar 2023 17:10:16 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Chris Plummer
On Thu, 30 Mar 2023 17:10:16 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-30 Thread Chris Plummer
On Thu, 30 Mar 2023 17:11:33 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java >> line 157: >> >>> 155: >>> 156: if (args.length > 0 && args[0].equals("attach")) { // agent >>> loaded into running VM case >>

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 19:00:03 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: tweak in count_transitions_and_correct_jvmti_thread_states > > test/hotspot/jtreg/serviceability/

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Patricio Chilano Mateo
On Thu, 30 Mar 2023 17:10:16 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-30 Thread Patricio Chilano Mateo
On Thu, 30 Mar 2023 16:33:01 GMT, Serguei Spitsyn wrote: >> I've just pushed my update with refactoring of these corrections in >> `VM_SetNotifyJvmtiEventsMode` after discussion of this code with Leonid. I >> hope it resolved at least part of your concerns. >> This kind of problem exists only w

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-30 Thread Patricio Chilano Mateo
On Thu, 30 Mar 2023 00:55:59 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1550: >> >>> 1548: >>> 1549: if (jt->is_in_VTMS_transition()) { >>> 1550: count++; >> >> For those threads that are in a transition when we enable the events, >> shouldn't w

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Leonid Mesnik
On Thu, 30 Mar 2023 17:10:16 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-30 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 18:05:47 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJv

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-03-30 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-30 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 01:32:28 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1554: >> >>> 1552: } >>> 1553: // Correct jt->jvmti_thread_state() and jt->jvmti_vthread() if >>> necessary. >>> 1554: // It was not maintained while notifyJvmti was disab

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v12]

2023-03-30 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v11]

2023-03-29 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-29 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 21:44:56 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > test/

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-29 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 22:15:35 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > Hi Se

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-29 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 21:36:04 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > src/h

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v10]

2023-03-29 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-29 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 01:52:18 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed trailing spaces in two files > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1550: > >> 1548: >

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-29 Thread Patricio Chilano Mateo
On Tue, 28 Mar 2023 18:57:23 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-29 Thread Patricio Chilano Mateo
On Wed, 29 Mar 2023 18:02:38 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-29 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 10:16:39 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1554: >> >>> 1552: // Correct jt->jvmti_thread_state() and jt->jvmti_vthread() if >>> necessary. >>> 1553: // It was not maintained while notifyJvmti was disabled. >>> 1554:

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-03-29 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-29 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 02:40:09 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed trailing spaces in two files > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1554: > >> 1552: // Cor

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-28 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 02:29:16 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed trailing spaces in two files > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/libTog

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-28 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 01:32:41 GMT, Leonid Mesnik wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1547: >> >>> 1545: JvmtiThreadState* ct_state = >>> java_lang_Thread::jvmti_thread_state(jt->threadObj()); >>> 1546: JvmtiThreadState* vt_state = vt_oop != nullptr ? >>> java_lan

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-28 Thread Leonid Mesnik
On Tue, 28 Mar 2023 18:57:23 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-28 Thread Leonid Mesnik
On Wed, 29 Mar 2023 01:16:55 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed trailing spaces in two files > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1547: > >> 1545: JvmtiT

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-28 Thread Serguei Spitsyn
On Tue, 28 Mar 2023 18:57:23 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]

2023-03-28 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v7]

2023-03-28 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v6]

2023-03-28 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-27 Thread Serguei Spitsyn
On Fri, 24 Mar 2023 02:00:57 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1581: >> >>> 1579: return false; >>> 1580: } >>> 1581: if (JvmtiVTMSTransitionDisabler::VTMS_notify_jvmti_events()) { >> >> shouldn't be >> if (!JvmtiVTMSTransitionDisabler::VTMS_n

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-27 Thread Serguei Spitsyn
On Fri, 24 Mar 2023 19:13:39 GMT, Chris Plummer wrote: >> It is needed to balance enabling/disabling notifyJvmti mode with the >> ThreadStart/VirtualThreadStart events. >> Otherwise, many mode switches can be observed without any events which is >> not interesting. >> We need to allow virtual t

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-27 Thread Serguei Spitsyn
On Fri, 24 Mar 2023 19:09:57 GMT, Chris Plummer wrote: >> It is for yielding. Do you think we need this with a bigger frequency? > > I guess the question then is why the need to yield. It just seems a bit odd > that I thought the main point of this loop was to keep busy calling > `breakpointChe

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-24 Thread Chris Plummer
On Fri, 24 Mar 2023 00:23:19 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java >> line 68: >> >>> 66: if (n <= 0) { >>> 67: n = 1000; >>> 68: ToggleNotifyJvmtiTest.sleep(1);

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 22:18:51 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > src/hotspot/share/prims/whitebox.cpp line 2537: > >> 2535:

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 22:24:45 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJv

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 22:11:58 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1581: > >> 1579

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 22:27:07 GMT, Leonid Mesnik wrote: > There are few comments in the code. > Also, I think it would be nice to have a high-level comment about sync of > VTMTDisable and lately attached agent. > What is set and why VMOp is needed. > BTW why VMOp and not handshake is used? Good

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 17:59:52 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJv

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 18:08:47 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJv

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 18:07:23 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJv

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 18:02:29 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJv

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 17:49:31 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comment: remove unneeded function > > src/hotspot/share/prims/jvmtiThreadState.hpp line 101: > >> 9

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Leonid Mesnik
On Thu, 23 Mar 2023 05:54:29 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-23 Thread Chris Plummer
On Thu, 23 Mar 2023 05:54:29 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-23 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 06:09:42 GMT, Chris Plummer wrote: >> Yes, this is from the PR description: >>> New function JvmtiEnvBase::disable_virtual_threads_notify_jvmti() which is >>> needed for testing. >>> It is used by the WhiteBox API. >> >> Do you think a comment is needed? > > I was wondering

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-23 Thread Chris Plummer
On Thu, 23 Mar 2023 05:43:35 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.hpp line 87: >> >>> 85: >>> 86: static bool enable_virtual_threads_notify_jvmti(); >>> 87: static bool disable_virtual_threads_notify_jvmti(); >> >> "disable" only seems to be used by the WB AP

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

2023-03-22 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 02:02:01 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> minor cleanup in enable_virtual_threads_notify_jvmti() > > src/hotspot/share/prims/jvmtiThreadState.hpp line 102: >

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 02:00:56 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> minor cleanup in enable_virtual_threads_notify_jvmti() > > src/hotspot/share/prims/jvmtiEnvBase.hpp line 87: > >>

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Chris Plummer
On Wed, 22 Mar 2023 19:06:34 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Serguei Spitsyn
On Wed, 22 Mar 2023 21:36:57 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> minor cleanup in enable_virtual_threads_notify_jvmti() > > src/hotspot/share/prims/jvmtiExport.cpp line 389: > >>

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Serguei Spitsyn
On Wed, 22 Mar 2023 21:11:45 GMT, Chris Plummer wrote: > > The fix is to enable support for late binding JVMTI agents. > Just to be clear, the late binding support was already there, but wasn't > working properly with virtual threads. Correct? Nice catch. Right, it is virtual threads support. Fi

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Chris Plummer
On Wed, 22 Mar 2023 19:06:34 GMT, Serguei Spitsyn wrote: >> The fix is to enable support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case of agent loaded

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Chris Plummer
On Wed, 22 Mar 2023 19:06:34 GMT, Serguei Spitsyn wrote: >> The fix is to enable support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case of agent loaded

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

2023-03-22 Thread Serguei Spitsyn
> The fix is to enable support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM operation count

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v3]

2023-03-21 Thread Serguei Spitsyn
> The fix is to enable support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM operation count

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2023-03-21 Thread Serguei Spitsyn
> The fix is to enable support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM operation count

RFR: 8297286: runtime/vthread tests crashing after JDK-8296324

2023-03-21 Thread Serguei Spitsyn
The fix is to enable support for late binding JVMTI agents. The fix includes: - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which does enabling JVMTI VTMS transition notifications in case of agent loaded into running VM. This function executes a VM operation counting VTMS t

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2023-03-02 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2023-01-09 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-12-22 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-24 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-24 Thread Alan Bateman
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-23 Thread Leonid Mesnik
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-23 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:31:00 GMT, Alan Bateman wrote: >> Fixed the `yieldContinuation()` method. >> There is also `switchToCarrierThread()` method that returns the >> `notifyJvmtiEvents` value. >> It seems to be an optimization. I'm not sure yet, if we need to fix these >> places as well. > >>

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-23 Thread Alan Bateman
On Wed, 23 Nov 2022 10:16:44 GMT, Serguei Spitsyn wrote: > There is also `switchToCarrierThread()` method that returns the > `notifyJvmtiEvents` value. > It seems to be an optimization. I'm not sure yet, if we need to fix these > places as well. It was to ensure that hide(true) and hide(false)

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-23 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:01:07 GMT, Serguei Spitsyn wrote: >> src/java.base/share/classes/java/lang/VirtualThread.java line 273: >> >>> 271: private void run(Runnable task) { >>> 272: assert state == RUNNING; >>> 273: boolean notifyJvmti = notifyJvmtiEvents; >> >> Don't we hav

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v2]

2022-11-23 Thread Serguei Spitsyn
> This problem has two sides. > One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` > value. > It caused the native method `notifyJvmtiUnmountBegin()` not called after the > field `notifyJvmtiEvents` > value has been set to `true` when an agent library is loaded into runni

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324

2022-11-23 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 02:17:43 GMT, Leonid Mesnik wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value ha

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324

2022-11-22 Thread Leonid Mesnik
On Wed, 23 Nov 2022 00:24:28 GMT, Serguei Spitsyn wrote: > This problem has two sides. > One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` > value. > It caused the native method `notifyJvmtiUnmountBegin()` not called after the > field `notifyJvmtiEvents` > value has be

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324

2022-11-22 Thread Leonid Mesnik
On Wed, 23 Nov 2022 00:24:28 GMT, Serguei Spitsyn wrote: > This problem has two sides. > One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` > value. > It caused the native method `notifyJvmtiUnmountBegin()` not called after the > field `notifyJvmtiEvents` > value has be

RFR: 8297286: runtime/vthread tests crashing after JDK-8296324

2022-11-22 Thread Serguei Spitsyn
This problem has two sides. One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` value. It caused the native method `notifyJvmtiUnmountBegin()` not called after the field `notifyJvmtiEvents` value has been set to `true` when an agent library is loaded into running VM. The f