Skip to main content

Glassfish 3.1.2 deadlock involving org.glassfish.web.loader.WebappClassLoader

1 reply [Last post]
najmi
Offline
Joined: 2003-06-17
Points: 0

Hi Guys,

My webapp deployed in Glassfish 3.1.2 wqas hung. jstack reported the
following deadlock.
Does this look like a Glassfish deadlock issue or an issue in my
webapp's code?

I can't see anything obvious in my code is causing this deadlock.

Please advice before I file an issue on Glassfish 3.1.2. Thanks.

Found one Java-level deadlock:
=============================
"Lucene Merge Thread #0":
waiting to lock monitor 0x15e9d03c (object 0x3824feb8, a
[Ljava.util.jar.JarFile;),
which is held by "SubscriptionManager.eventsProcessThread"
"SubscriptionManager.eventsProcessThread":
waiting to lock monitor 0x08ff9888 (object 0x3823abd8, a
org.glassfish.web.loader.WebappClassLoader),
which is held by "Lucene Merge Thread #0"

Java stack information for the threads listed above:
===================================================
"Lucene Merge Thread #0":
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2094)
- waiting to lock <0x3824feb8> (a [Ljava.util.jar.JarFile;)
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2066)
at
org.glassfish.web.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1976)
at
org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:901)
at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1476)
at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
at
org.apache.lucene.index.SegmentReader.termPositions(SegmentReader.java:960)
at
org.apache.lucene.index.SegmentMergeInfo.getPositions(SegmentMergeInfo.java:66)
at
org.apache.lucene.index.SegmentMerger.appendPostings(SegmentMerger.java:569)
at
org.apache.lucene.index.SegmentMerger.mergeTermInfos(SegmentMerger.java:528)
at
org.apache.lucene.index.SegmentMerger.mergeTerms(SegmentMerger.java:463)
at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:111)
at
org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3938)
at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3614)
at
org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:388)
at
org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:456)
"SubscriptionManager.eventsProcessThread":
at
org.glassfish.web.loader.WebappClassLoader.extractResources(WebappClassLoader.java:2267)
- waiting to lock <0x3823abd8> (a
org.glassfish.web.loader.WebappClassLoader)
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternalFromJars(WebappClassLoader.java:2253)
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2095)
- locked <0x3824feb8> (a [Ljava.util.jar.JarFile;)
at
org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1036)
at
org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1020)
at
org.glassfish.web.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1254)
at
com.sun.syndication.io.impl.PropertiesLoader.(PropertiesLoader.java:72)
at
com.sun.syndication.io.impl.PropertiesLoader.getPropertiesLoader(PropertiesLoader.java:46)
- locked <0x79d73478> (a java.lang.Class for
com.sun.syndication.io.impl.PropertiesLoader)
at
com.sun.syndication.io.impl.PluginManager.(PluginManager.java:54)
at
com.sun.syndication.io.impl.PluginManager.(PluginManager.java:46)
at
com.sun.syndication.feed.synd.impl.Converters.(Converters.java:40)
at
com.sun.syndication.feed.synd.SyndFeedImpl.(SyndFeedImpl.java:59)
at
mypackage.pubsub.publisher.AtomFeedManager.createAllEventsFeedInfo(ProGuard:117)
at
mypackage.pubsub.publisher.AtomFeedManager.createSyndFeedInfo(ProGuard:84)
at
mypackage.pubsub.publisher.AtomFeedManager.getSyndFeedInfo(ProGuard:173)
at
mypackage.pubsub.publisher.AtomFeedManager.publishEvent(ProGuard:200)
at mypackage.server.event.i$3.run(ProGuard:350)
at java.lang.Thread.run(Thread.java:662)

Found 1 deadlock.

--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Stadelmann Jose...
Offline
Joined: 2011-08-03
Points: 0

is there a chance to deploy your web apps into tomcat for a test?
Josef

-----Urspr√ľngliche Nachricht-----
Von: Farrukh Najmi [mailto:farrukh@wellfleetsoftware.com]
Gesendet: Mittwoch, 27. Februar 2013 01:46
An: users@glassfish.java.net
Betreff: Glassfish 3.1.2 deadlock involving org.glassfish.web.loader.WebappClassLoader

Hi Guys,

My webapp deployed in Glassfish 3.1.2 wqas hung. jstack reported the following deadlock.
Does this look like a Glassfish deadlock issue or an issue in my webapp's code?

I can't see anything obvious in my code is causing this deadlock.

Please advice before I file an issue on Glassfish 3.1.2. Thanks.

Found one Java-level deadlock:
=============================
"Lucene Merge Thread #0":
waiting to lock monitor 0x15e9d03c (object 0x3824feb8, a [Ljava.util.jar.JarFile;),
which is held by "SubscriptionManager.eventsProcessThread"
"SubscriptionManager.eventsProcessThread":
waiting to lock monitor 0x08ff9888 (object 0x3823abd8, a org.glassfish.web.loader.WebappClassLoader),
which is held by "Lucene Merge Thread #0"

Java stack information for the threads listed above:
===================================================
"Lucene Merge Thread #0":
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2094)
- waiting to lock <0x3824feb8> (a [Ljava.util.jar.JarFile;)
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2066)
at
org.glassfish.web.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1976)
at
org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:901)
at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1476)
at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
at
org.apache.lucene.index.SegmentReader.termPositions(SegmentReader.java:960)
at
org.apache.lucene.index.SegmentMergeInfo.getPositions(SegmentMergeInfo.java:66)
at
org.apache.lucene.index.SegmentMerger.appendPostings(SegmentMerger.java:569)
at
org.apache.lucene.index.SegmentMerger.mergeTermInfos(SegmentMerger.java:528)
at
org.apache.lucene.index.SegmentMerger.mergeTerms(SegmentMerger.java:463)
at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:111)
at
org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3938)
at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3614)
at
org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:388)
at
org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:456)
"SubscriptionManager.eventsProcessThread":
at
org.glassfish.web.loader.WebappClassLoader.extractResources(WebappClassLoader.java:2267)
- waiting to lock <0x3823abd8> (a
org.glassfish.web.loader.WebappClassLoader)
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternalFromJars(WebappClassLoader.java:2253)
at
org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2095)
- locked <0x3824feb8> (a [Ljava.util.jar.JarFile;)
at
org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1036)
at
org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1020)
at
org.glassfish.web.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1254)
at
com.sun.syndication.io.impl.PropertiesLoader.(PropertiesLoader.java:72)
at
com.sun.syndication.io.impl.PropertiesLoader.getPropertiesLoader(PropertiesLoader.java:46)
- locked <0x79d73478> (a java.lang.Class for
com.sun.syndication.io.impl.PropertiesLoader)
at
com.sun.syndication.io.impl.PluginManager.(PluginManager.java:54)
at
com.sun.syndication.io.impl.PluginManager.(PluginManager.java:46)
at
com.sun.syndication.feed.synd.impl.Converters.(Converters.java:40)
at
com.sun.syndication.feed.synd.SyndFeedImpl.(SyndFeedImpl.java:59)
at
mypackage.pubsub.publisher.AtomFeedManager.createAllEventsFeedInfo(ProGuard:117)
at
mypackage.pubsub.publisher.AtomFeedManager.createSyndFeedInfo(ProGuard:84)
at
mypackage.pubsub.publisher.AtomFeedManager.getSyndFeedInfo(ProGuard:173)
at
mypackage.pubsub.publisher.AtomFeedManager.publishEvent(ProGuard:200)
at mypackage.server.event.i$3.run(ProGuard:350)
at java.lang.Thread.run(Thread.java:662)

Found 1 deadlock.

--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com