johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Potential deadlock while classloading in JsonValue
Date Tue, 26 Feb 2019 10:32:00 GMT
Well issue is that in some env it can be there but the init is not needed
so I'd like we ensure it is the actual issue first cause our code does not
have much init which are triggered at the location you shared (at least
using master line numbers) so this is a bit fishy for now.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mar. 26 févr. 2019 à 11:06, Mark Struberg <struberg@yahoo.de.invalid> a
écrit :

>  Yes, or we init it in our CDI Extension. Then it should def run
> singlethreaded.
> LieGrue,strub
>
>     On Tuesday, 26 February 2019, 09:39:47 CET, Romain Manni-Bucau <
> rmannibucau@gmail.com> wrote:
>
>  hmm, thiking out loud: can you add a @Startup (or equivalent) which
> triggers the <cinit>?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le mar. 26 févr. 2019 à 09:25, Mark Struberg <struberg@yahoo.de.invalid> a
> écrit :
>
> >  The point is that <init> does NOT show up in the stack trace. So it must
> > be cinit.
> > Also a pointer is that the thread is in state RUNNABLE but blocked by
> > Object.wait().Which is often a classic classloader block issue.
> > But yeah, hard to reproduce :/
> >
> > LieGrue,strub
> >
> >    On Tuesday, 26 February 2019, 08:13:57 CET, Romain Manni-Bucau <
> > rmannibucau@gmail.com> wrote:
> >
> >  Hi Mark
> >
> > If you can reproduce it a lazy init in the g spec would be eady to test
> >
> > That said if it is in init it is after cinit so in the constructor.
> >
> > Can it be the buffer strategy config you run with?
> >
> > Romain
> >
> > Le mar. 26 févr. 2019 à 07:57, Mark Struberg <struberg@yahoo.de.invalid>
> a
> > écrit :
> >
> > > Hi folks!
> > > We've seen a mysterious deadlock in Johnzon on startup under heavy
> load.
> > >
> > >
> > >    java.lang.Thread.State: RUNNABLE
> > >        at
> > >
> >
> org.apache.johnzon.core.JsonArrayBuilderImpl.build(JsonArrayBuilderImpl.java:319)
> > > --
> > >    java.lang.Thread.State: RUNNABLE
> > >        at
> > >
> >
> org.apache.johnzon.core.JsonReaderImpl.parseObject(JsonReaderImpl.java:189)
> > > --
> > >    java.lang.Thread.State: RUNNABLE
> > >        at
> > >
> >
> org.apache.johnzon.core.JsonReaderImpl.parseObject(JsonReaderImpl.java:206)
> > > --
> > >
> > > Those are the locations which are stuck.
> > >
> > > All of them seem to hang on a new() for the following: JsonArrayImpl,
> > > JsonLongImpl, JsonStringImpl.But the stack trace does NOT contain the
> > > actual call code inside the <init>.So my conclusio for now is that it
> > fails
> > > to load the Class.
> > > I suspect that the classloading of JsonValue is to blame.
> > >
> > > JsonValue contains a few static fields. And those fields do load the
> > WHOLE
> > > JsonProvider!So while doing the init of JsonValue it might well be that
> > > another thread tries to load some other class subsequently needed by
> > > JsonValue.<init>.
> > > Of course if this is really the case, then it's a problem in the spec
> API
> > > and probably not in Johnzon itself.
> > >
> > > Wdyt?
> > > LieGrue,strub
> > >
> > >

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message