Hey,
We've got a enterprise app with a net-snmp library based backend
monitoring engine. It's highly multi-threaded (ie about 100-200
worker threads doing snmp get/getnexts's at any given time. I was
under the impression from reading
http://www.net-snmp.org/docs/README.thread.html that as long as I stuck
to the Single Session API for forming and sending requests I would be
ok. However, it appears that while this is true for v1 and v2c
requests it does not apply to v3. The base of the problem seems
to be that ./snmplib/snmpusm.c defines a global linked list (userList)
to track users generated in the usm security model. This list
gets modified (indirectly through several other calls) when one calls
snmp_sess_open (maybe snmp_sess_close as well?). This is causing
me a major headache and random segfaults in my application and we're
going to have to pull v3 support for the moment.
Is this a known issue? Is there work towards making v3 thread
safe when using the single session API? My first ignorant thought
it just put the userList in the session object... but maybe its not
that simple. I do notice at the end of README.thread it does list
restrictions but nothing about v3. The closest thing seems to be
a mention of SNMPv2p but that doesn't appear to be one and the same to
v3 and the usm issue. At the very least someone should update the
README.thread to warn of this issue. If I don't get feedback
telling me I'm crazy or this is known I'll post a bug and try to work
up a simple c program to reproduce the issue in the next couple days.
John
- SNMP v3 Not Thread Safe even using Single Session API John McCaskey
- Re: SNMP v3 Not Thread Safe even using Single Session A... Dave Shield
- Re: SNMP v3 Not Thread Safe even using Single Sessi... John McCaskey
- Re: SNMP v3 Not Thread Safe even using Single S... Wes Hardaker
- Re: SNMP v3 Not Thread Safe even using Single S... Robert Story
- Re: SNMP v3 Not Thread Safe even using Sing... John McCaskey
