johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de.INVALID>
Subject Potential deadlock while classloading in JsonValue
Date Tue, 26 Feb 2019 06:57:40 GMT
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