#47383 connections attribute in cn=snmp,cn=monitor is counted twice
Closed: Fixed None Opened 6 years ago by nkinder.

Attribute "connections" in cn=snmp,cn=monitor should keep "Number of currently
connected clients", as described in ldap/servers/slapd/slap.h
Because of error in program logic, it is incremented twice - in functions
disconnect_server_nomutex() and connection_reset(). The value is never

How reproducible:
ldapsearch -b 'cn=monitor' connections connectionseq currentconnections


dn: cn=monitor
currentconnections: 46

counters, monitor

dn: cn=counters,cn=monitor

snmp, monitor

dn: cn=snmp,cn=monitor
connections: 116016
connectionseq: 58031

Note that 2 * 58031 - 116016 = 46

Actual results:
connections: 116016

Expected results:
connections: 46

Additional info:

Problem is in function:
void disconnect_server_nomutex( Connection *conn, PRUint64 opconnid, int opid,
PRErrorCode reason, PRInt32 error )
where is called:
instead of:

Attribute "currentconnections" doesn't suffer this problem because it's value
is taken directly from connection table.

git merge ticket47383
Updating 4a0199b..202c983
ldap/servers/slapd/connection.c | 131 ++++++++++++++++++++-------------------
1 files changed, 66 insertions(+), 65 deletions(-)

git push origin master

4a0199b..202c983 master -> master

commit 202c983


ae60af1..17d9dc5  389-ds-base-1.3.1 -> 389-ds-base-1.3.1


136761c..fcce22c  389-ds-base-1.3.0 -> 389-ds-base-1.3.0


8212d48..accea11  389-ds-base-1.2.11 -> 389-ds-base-1.2.11

Metadata Update from @mreynolds:
- Issue assigned to mreynolds
- Issue set to the milestone:

2 years ago

Login to comment on this ticket.