Issue Details (XML | Word | Printable)

Key: DIRSERVER-1019
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Alex Karasulu
Reporter: Alex Karasulu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Using same thread pool for I/O processing and request handling causes clients to hang and MINA thread pool depletion

Created: 16/Aug/07 06:35 AM   Updated: 16/Aug/07 07:14 PM
Return to search
Component/s: None
Affects Version/s: 1.5.0, 1.0.2, 1.0.1, 1.0, 1.0-RC4, 1.0-RC3, 1.0-RC2, 1.0-RC1, pre-1.0
Fix Version/s: 1.5.1, 1.0.3

Time Tracking:
Not Specified

Resolution Date: 16/Aug/07 07:14 PM


 Description  « Hide
In the ServerContext factory the same thread pool is being used to process I/O
and request handling. This is depleting the thread pool rapidly causing the
server to hang under certain conditions. I caught this bug on a x86_64 machine
with multiple cores when the ReferralITest test was hanging. The right number
of connections and requests being processed could have caused this issue to
arrise. Regardless thankfully the issue appeared and Trustin found the cause
for it.

Trustin tracked the bug down to the way we misconfigured MINA's thread pools.
He is currently fixing the problem in trunk and I suspect the same issue exists
within the 1.0 branch.

I suspect this could have caused serious issues in performance if not causing
several load test clients to hang while others had requests processed. I
recommend reassessing performance metrics once again after this fix. There
should be a considerable boost. I think our impression that MINA was a
bottleneck may have been attributed to this misconfiguration issue.

Anyways once Trustin has the fix in trunk I will apply it to the 1.0 branch and
make sure all tests pass successfully. I am assigning this issue to myself
even though T is providing the fix so I can manage the application on the
1.0 branch and document the results.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alex Karasulu added a comment - 16/Aug/07 06:37 AM
Improving title for clarity

Alex Karasulu made changes - 16/Aug/07 06:37 AM
Field Original Value New Value
Summary Using same thread pool for I/O processing as request handling Using same thread pool for I/O processing and request handling causes clients to hang and MINA thread pool depletion
Alex Karasulu made changes - 16/Aug/07 06:41 AM
Status Open [ 1 ] In Progress [ 3 ]
Repository Revision Date User Message
ASF #566769 Thu Aug 16 16:36:38 UTC 2007 akarasulu Fixed bug arrising from corrections made to fix DIRSERVER-1019 ...

Seems as though the fixes for this revealed an inconsistent state that occurs in
the poorly written filter parser. I have created another JIRA to rewrite the
filter parser here:

   https://issues.apache.org/jira/browse/DIRSERVER-1020

Anyways I found a work around which hides the symptoms instead of curring this
disease. The cure is a parser rewrite in the nice way that seelmann did it for
the other parsers. The work around I used was to make the filter parser in the
ServerDirContext implementation a instance member instead of a static class
member. Again this just hides the issue rather than fixing it.
Files Changed
MODIFY /directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java
MODIFY /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
MODIFY /directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
MODIFY /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java

Repository Revision Date User Message
ASF #566796 Thu Aug 16 18:32:23 UTC 2007 akarasulu fix for DIRSERVER-1019 ...

 o fixed persistent search issues
 o using MINA properly with two pools now for logic and io
 o modified default for max number of threads to 32 as in trunk
Files Changed
MODIFY /directory/apacheds/branches/1.0/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java
MODIFY /directory/apacheds/branches/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
MODIFY /directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
MODIFY /directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java

Alex Karasulu added a comment - 16/Aug/07 07:14 PM
This has been fixed thanks to Trustin.

Alex Karasulu made changes - 16/Aug/07 07:14 PM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Closed [ 6 ]