directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selcuk AYA <>
Subject Re: Release troubles and failing tests
Date Thu, 10 May 2012 05:57:18 GMT
The problem seems to be caused by the test
testPagedSearchWrongCookie(). This tests failure in pages search by
sending a bad cookie. After failing, it relies on ctx.close() to
cleanup the session. Cleanup of the session will close all the cursors
related to paged searches through the session.

It seems that somehow ctx.close does not result in an unbind message
at the server side time to time. I do not know what causes this but
this leaves a cursor open(specifically a NoDups cursor on rdn index).
Eventually as changes happen to the Rdn index, we run out of freeable
cache headers. After ignoring this test, pagedsearchit and searchit
pass fine together. It would be good to understand why arrival of
unbind message is a hit and miss case in this test.

Note that for debugging the problem, I changed JDBM browser(cursor of
jdbm) to take a comment. Comment changes based on where the browser is
opened. I added the browsers to a global list and printed this list
when the out of cache headers situation happened. This pointed to the
code path that left the browser open. This seems to be an inexpensive
way of tracking these kinds of problems.


On Wed, May 9, 2012 at 4:20 PM, Emmanuel Lécharny <> wrote:
> Le 5/9/12 10:39 PM, Selcuk AYA a écrit :
>> What I saw happening was there is a reader at version 188. Some reader
>> somehow does not decremented the ref count at this version  and
>> writers keep bumping up the version upto until ~600. Then we run out
>> of freeable cache elements.
>> We always have problem with the same version(188) and the problem
>> always happens when updateding the nbchildren nbdescendants of the
>> parents in rdn index. This is a new code but I dont see anything wrong
>> with it. What I am thinking is that this new code exposed some bug in
>> LRUCache that was there before.
> May be because we now are updating the RdnIndex many times instead of only
> one when adding or deleting an entry...
>> I am stuck at this point because of my ignorance of the build
>> environment. I use the debugger to step through the code and I have
>> the apacheds-jdbm as a module but the runtime uses a jdbm jar in
>> repository rather than the code I modify so I cannot add debug code to
>> jdbm. I really would appreciate some help here.
> Here is what I do :
> 1) svn co
> it grabs all the projects from the repo
> 2) cd trunks
> 3) vi pom.xml
> 4) comment the <module>studio</module> module (no need to spend CPU
> compiling studio)
> 5) mvn clean install -DskipTests
> It builds everything without tests, saving 20 minutes
> 6) mvn eclipse:eclipse
> Now, you shoud have all the .classpath pointing to projects in Eclipse, and
> not on jars
> 7) launch eclipse
> 8) create the jdbm, apacheds and shared workingsets
> 9) import jdbm into jdbm
> 10) import shared into shared
> 11) Import apacheds into apacheds
> 12 in the apacheds/apacheds-jdbm-partition, I open the properties, and in
> the Java Build Path, I add the jdbm project  in the projects tab, and I
> remove the reference to the jdbm lib in the Librairies tab.
> Now, you shoul dbe able to put a breakpoint on the jdbm code, and run it in
> debug mode. You will still be able to modify the jdbm code.
> of course, I drescribed in extenso what you should do, but if you already
> have almost all present, the only omportant step is (12).
> I'm going to crash now, try to catch me early tomorrow (around 7h30 my time,
> 10:30PM your time) if you have any problem...
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny

View raw message