Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] java.lang.reflect.InaccessibleObjectException error in webapp



On Thu, 22 Aug 2024 at 21:43, Cantor, Scott via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
> In this specific case, there could be more, but it's a Spring
> issue, not Jetty's.

What is odd about It is it's not just because of that access. If it were it would happen consistently. But it's likely a race condition of some kind that I think happens much more when Jetty is started under load (which is not a good idea for any application), but that's my personal observation, not proof of anything.

With previous non-deterministic failures in classloading like this, it has often walked,quacked and looked like a race... but in the end has often turned out to be an ordering issue.  If an unordered collection is being used somewhere, then when it is initialized can often affect the iteration order. Even listing items from the file system can have strange ordering behaviours.

 I suppose some aspect of Jetty class loading could be implicated, but that's a serious stretch. Race conditions are just hard.

Where we have found such issues before, if the collection/iteration is in the control of Jetty, we have imposed an order, even if one should not strictly be necessary, just so that we are deterministic and either always fail or always pass.

I've not looked at this one in detail, so this could be totally off the mark... but if anybody investigating does suspect an ordering issue, then we'd be happy to update jetty to use a determinic order.  Alternatively, perhaps suggest to spring that they order any iteration involved?

cheers

--

Back to the top