Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v4]

2024-06-19 Thread Alan Bateman
On Wed, 19 Jun 2024 07:31:41 GMT, David Holmes wrote: > I don't follow. We have checked vt is not null and not the carrier, so we do > have it. My comment was about the case where the thread dump happens during a transition so sees the self-reference. In the loom repo the JavaThread has the th

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v4]

2024-06-19 Thread David Holmes
On Wed, 19 Jun 2024 07:01:49 GMT, Alan Bateman wrote: > the thread dump can happen at times when there isn't a reference to the > virtual Thread I don't follow. We have checked vt is not null and not the carrier, so we do have it. - PR Comment: https://git.openjdk.org/jdk/pull/19

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v4]

2024-06-19 Thread Alan Bateman
On Wed, 19 Jun 2024 06:18:12 GMT, David Holmes wrote: > FWIW I would have kept the vt name just in case it does have one. But as Alan > said that can be added in later if desired. I suggested we drop this for now because the thread dump can happen at times when there isn't a reference to the v

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v4]

2024-06-18 Thread David Holmes
On Tue, 18 Jun 2024 11:51:31 GMT, Inigo Mediavilla Saiz wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the te

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v4]

2024-06-18 Thread Alan Bateman
On Tue, 18 Jun 2024 11:51:31 GMT, Inigo Mediavilla Saiz wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the te

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-18 Thread Inigo Mediavilla Saiz
On Tue, 18 Jun 2024 11:11:12 GMT, Alan Bateman wrote: >> Inigo Mediavilla Saiz has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve assert and document conditional print > > I looked at the changes in the latest revision (9a954efe) an

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v4]

2024-06-18 Thread Inigo Mediavilla Saiz
> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing > issues when the PrintMountedVirtualTest.java was > running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. > > - Fixes issues where the test observes the thread during transitions. > - Fixes a potential issue

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v3]

2024-06-18 Thread Inigo Mediavilla Saiz
On Tue, 18 Jun 2024 11:41:36 GMT, Inigo Mediavilla Saiz wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the te

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v3]

2024-06-18 Thread Inigo Mediavilla Saiz
On Tue, 18 Jun 2024 09:31:41 GMT, David Holmes wrote: >> @AlanBateman explained to me why that is possible in >> https://github.com/openjdk/jdk/pull/19482#issuecomment-2166116062 and >> https://github.com/openjdk/jdk/pull/19482#issuecomment-2167374446. >> >> Alan can correct me if I'm wrong,

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-18 Thread Inigo Mediavilla Saiz
On Tue, 18 Jun 2024 09:29:34 GMT, David Holmes wrote: >> Inigo Mediavilla Saiz has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve assert and document conditional print > > src/hotspot/share/runtime/threads.cpp line 1336: > >> 1334:

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v3]

2024-06-18 Thread Inigo Mediavilla Saiz
> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing > issues when the PrintMountedVirtualTest.java was > running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. > > - Fixes issues where the test observes the thread during transitions. > - Fixes a potential issue

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-18 Thread Alan Bateman
On Mon, 17 Jun 2024 13:24:23 GMT, Inigo Mediavilla Saiz wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the te

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-18 Thread David Holmes
On Mon, 17 Jun 2024 13:25:07 GMT, Inigo Mediavilla Saiz wrote: >> `started.countDown()` is replaced with `started.set(true)` to remove the >> possibility that "Dummy Vthread" unmounts here. > > @AlanBateman explained to me why that is possible in > https://github.com/openjdk/jdk/pull/19482#iss

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-18 Thread Inigo Mediavilla Saiz
On Mon, 17 Jun 2024 13:24:23 GMT, Inigo Mediavilla Saiz wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the te

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-18 Thread David Holmes
On Mon, 17 Jun 2024 13:24:23 GMT, Inigo Mediavilla Saiz wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the te

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-17 Thread Inigo Mediavilla Saiz
On Mon, 17 Jun 2024 13:00:11 GMT, Alan Bateman wrote: >> test/hotspot/jtreg/serviceability/dcmd/thread/PrintMountedVirtualThread.java >> line 43: >> >>> 41: public void run(CommandExecutor executor) throws >>> InterruptedException { >>> 42: var shouldFinish = new AtomicBoolean(fals

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-17 Thread Inigo Mediavilla Saiz
On Mon, 17 Jun 2024 13:15:27 GMT, Inigo Mediavilla Saiz wrote: >>> We need a comment explaining why we have to check for this as without >>> knowing the implementation quirks it seems non-sensical for a thread to >>> have mounted itself! >> >> Just to note that JavaThread._vthread is always t

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-17 Thread Inigo Mediavilla Saiz
On Mon, 17 Jun 2024 13:12:00 GMT, Inigo Mediavilla Saiz wrote: >> src/hotspot/share/runtime/threads.cpp line 1335: >> >>> 1333: const oop vt = p->vthread(); >>> 1334: if (vt != thread_oop) { >>> 1335: assert(vt != nullptr, "vthread should not be null when

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]

2024-06-17 Thread Inigo Mediavilla Saiz
> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing > issues when the PrintMountedVirtualTest.java was > running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. > > - Fixes issues where the test observes the thread during transitions. > - Fixes a potential issue

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

2024-06-17 Thread Inigo Mediavilla Saiz
On Mon, 17 Jun 2024 12:56:03 GMT, Alan Bateman wrote: >> src/hotspot/share/runtime/threads.cpp line 1334: >> >>> 1332: if (p->is_vthread_mounted()) { >>> 1333: const oop vt = p->vthread(); >>> 1334: if (vt != thread_oop) { >> >> We need a comment explaining why

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

2024-06-17 Thread Inigo Mediavilla Saiz
On Mon, 17 Jun 2024 12:34:25 GMT, David Holmes wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the test observe

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

2024-06-17 Thread Alan Bateman
On Mon, 17 Jun 2024 12:37:01 GMT, David Holmes wrote: >> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing >> issues when the PrintMountedVirtualTest.java was >> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. >> >> - Fixes issues where the test observe

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

2024-06-17 Thread Alan Bateman
On Mon, 17 Jun 2024 12:35:15 GMT, David Holmes wrote: > We need a comment explaining why we have to check for this as without knowing > the implementation quirks it seems non-sensical for a thread to have mounted > itself! Just to note that JavaThread._vthread is always the "current thread". I

Re: RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

2024-06-17 Thread David Holmes
On Mon, 17 Jun 2024 09:13:57 GMT, Inigo Mediavilla Saiz wrote: > Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing > issues when the PrintMountedVirtualTest.java was > running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. > > - Fixes issues where the test ob

RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

2024-06-17 Thread Inigo Mediavilla Saiz
Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing issues when the PrintMountedVirtualTest.java was running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo. - Fixes issues where the test observes the thread during transitions. - Fixes a potential issue in the test