RFR: 7903526: jtreg should handle all exceptions [v2]

Jaikiran Pai jpai at openjdk.org
Wed Nov 1 00:26:28 UTC 2023


On Tue, 31 Oct 2023 20:03:57 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> No, the plan is to catch all unhandled exceptions. The virtual threads are only a particular case but might be the most common. However, I think we shouldn't silently ignore any of the unhandled exceptions. Some exceptions are already handled using ThreadGroup, and the fix doesn't break this, just add more handling.
>
>> Finally, the major issue with setting a JVM level uncaught exception handler is that, tests will no longer be able to expect the Thread.getDefaultUncaughtExceptionHandler() to ever be null, even if they launch in /othervm mode. I think that's a problem. I can't recollect if jtreg testing framework has other similar cases where it interferes with the tests even with the usage of /othervm.
> 
> I don't think it is a major issue.  It might be useful to document this, so tests don't expect global UHE to be null.  They could re-write UHE if they need and don't need to preserve/restore the original one.

> However, I think we shouldn't silently ignore any of the unhandled exceptions. Some exceptions are already handled using ThreadGroup

Do you mean there are uncaught exceptions that aren't currently being handled/reported by jtreg when using platform thread?

-------------

PR Review Comment: https://git.openjdk.org/jtreg/pull/172#discussion_r1378278865


More information about the jtreg-dev mailing list