I stand corrected – This is 50% of what brought our server down.

 

The other half of the deadlock belongs to Seam:

 

 

org.jboss.seam.Component.getInstanceFromFactory() obtains a lock that has static scope, so nothing else can invoke getInstanceFromFacotry() while the lock is held.It then blocks on InMemorySessionManager$SessionImpl.bumpTimeout()

Meanwhile, the invalidate() method blocks against the static method in getInstanceFromFactory()

//EricP

 

 

 

 

From: undertow-dev-bounces@lists.jboss.org [mailto:undertow-dev-bounces@lists.jboss.org] On Behalf Of Eric Peters
Sent: Thursday, June 25, 2015 4:39 PM
To: undertow-dev@lists.jboss.org
Subject: [undertow-dev] InSessionMemoryManager synchronized methods

 

Chasing after another problem I found several blocked task threads, best as I can determine:

InMemorySessionmanager$SessionImpl.invalidate() is invoked.

This method is synchronized, and the call blocks inside SesssionListeners.sessionDestroyed() (separate issue there…)

 

Later, InMemorySessionmanager$SessionImpl.bumpTimeout() is invoked from another thread.

This method is also synchronized, and blocks waiting for invalidate() to complete.  As the first thread is indefinitely blocked inside invalidate(), this second thread also remains blocked indefinitely.

 

In my environment it appears to make an existing problem slightly more severe.

 

Found in 1.1.0, but it looks like it’s in both 1.1.7 and the master branch as well.

Using RHEL, Java 7, Wildfly 8.2

 

invalidate() Thread trace (excerpt):

 

bumpTimeout() Thread trace:

//EricP

 

 

This message has been scanned for malware by Websense. www.websense.com

 

Click here to report this email as spam.