RFR: Use ThreadGroup for passive connection
moritz-bruder
duke at openjdk.org
Thu Mar 28 07:51:38 UTC 2024
On Thu, 22 Feb 2024 12:13:15 GMT, moritz-bruder <duke at openjdk.org> wrote:
>> I do not have anything to add. I am waiting for a review or a discussion.
>
>> @moritz-bruder could you please provide more details of the problem that is being solved by this enhancement, link to any JBS bug IDs etc.
>
> On our side this is an issue that is composed of two other issues.
> * The remote class loader, in particular because it starts threads in the same `ThreadGroup`, causes an exception to be thrown during `loadClass`. This is fixed by this patch without really affecting other VMs (one additional allocation in total).
> * Another issue is that whenever an exception is thrown during class loading, the code for sending and receiving is thrown out of sync. So the next call to `loadClass` will read the class data of the old request. Thus, `AgentClassLoader` is not exception-safe. This issue is not fixed with this patch. It could be solved by doing some kind of rollback but it was too much effort.
> > > @moritz-bruder could you please provide more details of the problem that is being solved by this enhancement, link to any JBS bug IDs etc.
> >
> >
> > On our side this is an issue that is composed of two other issues.
> > ```
> > * The remote class loader, in particular because it starts threads in the same `ThreadGroup`, causes an exception to be thrown during `loadClass`. This is fixed by this patch without really affecting other VMs (one additional allocation in total).
> >
> > * Another issue is that whenever an exception is thrown during class loading, the code for sending and receiving is thrown out of sync. So the next call to `loadClass` will read the class data of the old request. Thus, `AgentClassLoader` is not exception-safe. This issue is not fixed with this patch. It could be solved by doing some kind of rollback but it was too much effort.
> > ```
>
> Thank you, more background info would be appreciated - are the issues happening during OpenJDK jtreg test runs? or some other runs? could you please provide a JBS bug id.
I would be happy to create issues but getting access is difficult and the website to create bugs as unregistered user is missing the corresponding category entry.
I am fairly confident, that even just an OOME could potentially trigger this behavior in OpenJDK. But it was observed in another VM.
-------------
PR Comment: https://git.openjdk.org/jtharness/pull/58#issuecomment-2024600594
More information about the jtharness-dev
mailing list