I'm not an expert on concurrency, but I think the problem might be the code 
trying to upgrade the read lock to a write lock...

http://stackoverflow.com/questions/464784/java-reentrantreadwritelocks-how-to-safely-acquire-write-lock

Stepping back for a second, what is the purpose of using the lock?



----- Original Message -----
From: "Shawn McKinney" <[email protected]>
To: [email protected]
Sent: Sunday, March 6, 2016 10:17:35 AM
Subject: Re: LDAP Connection Management

> On Mar 6, 2016, at 8:03 AM, Chris Pike <[email protected]> wrote:
> 
> After a lot of troubleshooting, I'm not sure it is a connection pool issue, 
> but appears to be a deadlock issue that only manifests itself when the 
> application starts and has to process lots of requests.
> 
> See 
> https://github.com/apache/directory-fortress-core/blob/master/src/main/java/org/apache/directory/fortress/core/impl/RoleUtil.java#L383
> 
> Basically, all requests get into this method, then all lock and hang the app 
> server.

Chris,

Good work.  I agree that method’s a likely culprit.  I’ve caught wind of it 
during jmeter load testing, when delay time between thread startup is 
shortened.  At the time I treated as a red herring, and still not certain we’re 
looking at same one, but worth investigating further.

The good news is if it’s reproducible, will be easy to fix.  

Shawn

Reply via email to