Re: RFR: 8318839: Update test thread factory to catch all exceptions [v2]

2023-11-03 Thread Leonid Mesnik
On Fri, 3 Nov 2023 03:44:31 GMT, Leonid Mesnik wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318839: Update test thread factory to catch all exceptions [v2]

2023-11-03 Thread Alan Bateman
On Fri, 3 Nov 2023 05:43:38 GMT, David Holmes wrote: > I don't understand what this is trying to do. If any virtual thread has an > uncaught exception then other virtual threads will throw it wrapped in a > RuntimeException. But the first virtual thread that completes (normally or by >

Re: RFR: 8318839: Update test thread factory to catch all exceptions [v2]

2023-11-02 Thread David Holmes
On Fri, 3 Nov 2023 03:44:31 GMT, Leonid Mesnik wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318839: Update test thread factory to catch all exceptions [v2]

2023-11-02 Thread Leonid Mesnik
On Fri, 3 Nov 2023 03:44:31 GMT, Leonid Mesnik wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318839: Update test thread factory to catch all exceptions [v2]

2023-11-02 Thread Leonid Mesnik
> The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this > https://bugs.openjdk.org/browse/CODETOOLS-7903526. > Catching such issues for virtual threads is

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-31 Thread Jaikiran Pai
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-30 Thread David Holmes
On Mon, 30 Oct 2023 18:29:30 GMT, Leonid Mesnik wrote: >> Hello Leonid, in order to understand what exactly we are trying to solve >> here, I ran a few tests to see how things work without the changes being >> proposed in this PR. Here's my findings. >> >> A bit of background first. When

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-30 Thread Leonid Mesnik
On Sun, 29 Oct 2023 14:10:32 GMT, Jaikiran Pai wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-30 Thread David Holmes
On Sun, 29 Oct 2023 14:10:32 GMT, Jaikiran Pai wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-29 Thread Jaikiran Pai
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-27 Thread Leonid Mesnik
On Fri, 27 Oct 2023 05:55:43 GMT, David Holmes wrote: >> It is still used in tests and we should ignore it like jtreg doing. > > Shouldn't this code first retrieve the current default exception handler, and > then check whether t is a virtual thread, and if so handle the exception as >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread David Holmes
On Thu, 26 Oct 2023 22:34:24 GMT, Leonid Mesnik wrote: >> test/jtreg_test_thread_factory/src/share/classes/Virtual.java line 37: >> >>> 35: // The virtual threads don't belong to any group and need >>> global handler. >>> 36:

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread David Holmes
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Leonid Mesnik
On Thu, 26 Oct 2023 08:34:39 GMT, Alan Bateman wrote: > Having a UHE invoke System.exit is surprising. Are you saying that this is > only for cases where a test launches a child VM with the thread factory set? It is for cases when the test is started in a virtual thread. I don't see a better

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Leonid Mesnik
On Thu, 26 Oct 2023 08:34:39 GMT, Alan Bateman wrote: > Stepping back a bit. ThreadGroup is legacy and we eventually want it to go > away. We've been deprecating and degrading it very slowly over many releases. > So I think jtreg will eventually need to change. Right now, it creates >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Leonid Mesnik
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Leonid Mesnik
On Thu, 26 Oct 2023 06:09:34 GMT, Jaikiran Pai wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Alan Bateman
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this >

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Jaikiran Pai
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this >

RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-25 Thread Leonid Mesnik
The jtreg starts the main thread in a separate ThreadGroup and checks unhandled exceptions for this group. However, it doesn't catch all unhandled exceptions. There is a jtreg issue for this https://bugs.openjdk.org/browse/CODETOOLS-7903526. Catching such issues for virtual threads is important