(This mail was sent to -users, with no reply, so I'm trying here.
Sorry for the dup.)

On a particular RADIUS module, in order to authenticate the user, I
have to make a certain check against a CISCO 2950 switch, which
involves browsing a certain subtree.

The code does, at a point:

pdu= snmp_pdu_create(SNMP_MSG_GETNEXT);
snmp_add_null_var(pdu, OID, OID_len);
status= snmp_synch_response(s, pdu, &response);

I start seeing the number of RADIUS threads increasing without bound.
Attaching a debugger, I get that threads are stuck there for many
minutes, even hours:

201 status= snmp_synch_response(s, pdu, &response);
(gdb) print s
$1 = (struct snmp_session *) 0x552af72240
(gdb) print *s
$2 = {version = 0, retries = 5, timeout = 1000000, flags = 0,
subsession = 0x0, next = 0x0,
peername = 0x552af42ee0 "XXXXXXXX", remote_port = 0, localname =
0x0, local_port = 0,
authenticator = 0, callback = 0x2a97b25700 ,
callback_magic = 0x4960be10,
s_errno = 0, s_snmp_errno = 0, sessid = 136, community =
0x552af6f590 "XXXXXXXX@12",
community_len = 14, rcvMsgMaxSize = 65507, sndMsgMaxSize = 0,
isAuthoritative = 0 '\0',
contextEngineID = 0x0, contextEngineIDLen = 0, engineBoots = 0,
engineTime = 0,
contextName = 0x552af18880 "", contextNameLen = 0, securityEngineID
= 0x0,
securityEngineIDLen = 0, securityName = 0x0, securityNameLen = 0,
securityAuthProto = 0x552af72580, securityAuthProtoLen = 10,
securityAuthKey = '\0' , securityAuthKeyLen = 0,
securityAuthLocalKey = 0x0,
securityAuthLocalKeyLen = 0, securityPrivProto = 0x552af49580,
securityPrivProtoLen = 10,
securityPrivKey = '\0' , securityPrivKeyLen = 0,
securityPrivLocalKey = 0x0,
securityPrivLocalKeyLen = 0, securityModel = 3, securityLevel = 1,
securityInfo = 0x0,
myvoid = 0x0}

It doesn't happen all the time. Some threads do get stuck, some don't,
following no evident pattern. My understanding was the timeout should
handle this. Was I wrong? Should I use separate timers?

This is Red Hat Enterprise Linux AS release 4 (2.6.9-42.ELsmp) with
net-snmp-libs-5.1.2-11.EL4.7. Should I upgrade Net-SNMP or the
problem might be somewhere else?

Thanks!

Fernando.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.p...r_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders