Red Hat Bugzilla – Bug 1271330
nunc-stans: Attempt to release connection that is not acquired
Last modified: 2016-11-03 16:36:32 EDT
Description of problem:
DS with nunc stans enabled produces lots of messages like
[13/Oct/2015:11:29:24 -0400] connection - conn=98 fd=161 Attempt to release connection that is not acquired
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Enable nunc stans and restart the server
2. Add 1k users with ldclt
ldclt -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -f cn=MrXXXXXX -b "ou=people,dc=example,dc=com" -e add,person,incr,noloop,commoncounter -r0 -R1000
3. Check errors log for "Attempt to release connection that is not acquired"
grep "Attempt to release connection that is not acquired" -c /var/log/dirsrv/slapd-instance/errors
I can not reproduce any errors on 1.3.4 or 1.3.5. I even tried adding 10000 entries.
I am testing this on f22:
What version of libtevent/libevent were you testing with?
Are there any other steps I might be missing?
I was able to reproduce this on f22 using an optimized build of DS. The debug build worked fine though.
Just doing a single search triggers the error, so it's not a race condition. Continuing investigation...
Created attachment 1086527 [details]
With the scratch build that contains a fix , I had another crash  in quickinstall test with nunc-stans enabled.
 This crash is new, and it's happening at server startup(this is odd). Does it happen every time you start the server?
If it does crash every time you start the server:
- Perhaps the scratch build was not created correctly? I noticed that you build using --with-nunc-stans=../nunc-stans-0.1.5
- Does the following library already exist?
- If this library exists, can you remove "--with-nunc-stans=../nunc-stans-0.1.5" from your scratch build configure command,a nd try and rebuild it
(In reply to mreynolds from comment #7)
>  This crash is new, and it's happening at server startup(this is odd).
> Does it happen every time you start the server?
Crash happens every time I start the server with 'nsslapd-enable-nunc-stans: on' in dse.ldif
> If it does crash every time you start the server:
> - Perhaps the scratch build was not created correctly? I noticed that
> you build using --with-nunc-stans=../nunc-stans-0.1.5
> - Does the following library already exist?
Yes, it's there:
ls /usr/lib64/dirsrv/libnunc-stans.so -la
lrwxrwxrwx. 1 root root 22 Oct 26 11:13 /usr/lib64/dirsrv/libnunc-stans.so -> libnunc-stans.so.0.0.0
> - If this library exists, can you remove
> "--with-nunc-stans=../nunc-stans-0.1.5" from your scratch build configure
> command,a nd try and rebuild it
I used to run this command to build 389-ds-base
$ brew build --scratch rhel-7.2-candidate ./389-ds-base-184.108.40.206-19.99.el7.src.rpm
And spec file was modified only to contain new fix, no other changes were made.
I modified spec file to compile without this line, but build failed:
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see firstname.lastname@example.org with any questions
After repeating steps in the description:
# grep "Attempt to release connection that is not acquired" -c /var/log/dirsrv/slapd-rhel7ds/errors
Message no longer appears in the logs.
Marking as VERIFIED.
*** Bug 1274377 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.