#47383 connections attribute in cn=snmp,cn=monitor is counted twice
Closed: wontfix None Opened 9 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
decremented.

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

monitor

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:
slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsConnections);
instead of:
slapi_counter_decrement(g_get_global_snmp_vars()->ops_tbl.dsConnections);

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


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

git push origin master

4a0199b..202c983 master -> master

commit 202c983

1.3.1

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

1.3.0

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

1.2.11

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: 1.2.11.22

5 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/720

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

2 years ago

Login to comment on this ticket.

Metadata