【问题标题】:All of the threads are blocked in RUNABLE state for 10 hours所有线程都被阻塞在 RUNNABLE 状态 10 小时
【发布时间】:2019-11-01 08:29:06
【问题描述】:

作为下面的转储,一些节点偶然发生,线程随着时间的推移而上升,最后所有线程都处于这种状态超过10个小时,系统挂起。 我们使用的是 EclipseLink OXM 2.6.4,EclipseLink OXM 是否存在已知错误?或者有人遇到过类似的问题吗?

#695 daemon prio=5 os_prio=0 tid=0x00007f3c00875000 nid=0x48f in Object.wait() [0x00007f3b4c709000]
   java.lang.Thread.State: RUNNABLE
    at org.glassfish.json.JsonParserImpl.getValue(JsonParserImpl.java:185)
    at org.glassfish.json.JsonParserImpl.getObject(JsonParserImpl.java:339)
    at org.glassfish.json.JsonParserImpl.getObject(JsonParserImpl.java:173)
    at org.glassfish.json.JsonReaderImpl.read(JsonReaderImpl.java:94)
    at org.eclipse.persistence.internal.oxm.record.json.JsonStructureReader.parse(JsonStructureReader.java:139)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:1016)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:452)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:400)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:741)
    at org.eclipse.persistence.internal.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:649)
    at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:349)

【问题讨论】:

  • 也许一个完整的线程转储可能会有所帮助。
  • 你确定他们“卡住”了吗?重复的线程转储可能会显示一些进展,并且可能只是进展非常缓慢,或者由于复杂的对象模型而进入/退出类似的堆栈处理。那个或者你的 JVM 有一个错误,因为 getValue 方法中没有任何东西是锁定的,所以它不应该存在很长一段时间。
  • 嗨,Chris,感谢您的回复,是的,我确定它卡住了,因为在 10 小时后没有任何新请求后,这些可运行的线程仍然存在。是的,我检查了 glassfish 的源代码,我找不到合理的解释.. 可能是输入流卡住了?
  • 另外一个信息,有服务器重启前的问题
  • 然后我会检查 JVM 问题,因为该行上没有任何内容表明存在潜在问题或需要锁定的东西。您将不得不分析来自 JVM、内存等的其他数据,以查看是否有异常导致它。

标签: multithreading glassfish eclipselink block


【解决方案1】:
0x00007f47a017f705  __pthread_cond_wait + 0xc5
0x00007f479f2baaf5  _ZN13ObjectMonitor4waitElbP6Thread + 0xa65
0x00007f479efeec40  _ZN13InstanceKlass15initialize_implE19instanceKlassHandleP6Thread + 0x2f0
0x00007f479efeeec1  _ZN13InstanceKlass10initializeEP6Thread + 0x41
0x00007f479f02edfa  _ZN18InterpreterRuntime4_newEP10JavaThreadP12ConstantPooli + 0x23a
0x00007f4761024d8f  * org.glassfish.json.JsonParserImpl.getValue() bci:96 line:185 (Interpreted frame)
0x00007f4761008020  * org.glassfish.json.JsonParserImpl.getObject(javax.json.JsonObjectBuilder) bci:39 line:339 (Interpreted frame)
0x00007f4761008020  * org.glassfish.json.JsonParserImpl.getObject() bci:37 line:173 (Interpreted frame)
0x00007f4761008020  * org.glassfish.json.JsonReaderImpl.read() bci:67 line:94 (Interpreted frame)
0x00007f47610080f1  * org.eclipse.persistence.internal.oxm.record.json.JsonStructureReader.parse(org.xml.sax.InputSource) bci:127 line:139 (Interpreted frame)
0x00007f4761008294  * org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource, java.lang.Class) bci:335 line:1016 (Interpreted frame)
0x00007f4761008020  * org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(org.xml.sax.InputSource, java.lang.Class) bci:71 line:452 (Interpreted frame)
0x00007f4761008020  * org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(java.io.InputStream, java.lang.Class) bci:48 line:400 (Interpreted frame)
0x00007f4761008020  * org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(javax.xml.transform.Source, java.lang.Class) bci:156 line:741 (Interpreted frame)
0x00007f47610080f1  * org.eclipse.persistence.internal.oxm.XMLUnmarshaller.unmarshal(javax.xml.transform.Source, java.lang.Class) bci:159 line:649 (Interpreted frame)
0x00007f4761008020  * org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(javax.xml.transform.Source, java.lang.Class) bci:25 line:349 (Interpreted frame)

【讨论】:

  • 重启后偶然出现的问题,我认为可能与jar的加载顺序有关。
猜你喜欢
  • 1970-01-01
  • 2013-11-27
  • 2016-07-06
  • 2012-03-10
  • 1970-01-01
  • 2012-01-25
  • 1970-01-01
  • 2018-07-21
  • 1970-01-01
相关资源
最近更新 更多