Synchronisation issue in SNMP++ v3.2

Henning Eggers henning.eggers____plath.de
Mon May 26 13:28:31 CEST 2003


Hi,
I guess I found another issue in the v3MP class in relation to
multithreading. I tracked undeterministic access violations in the
AgentX-Masteragent running here. Tracing into the program at the time of the
crash I found that each was somehow related to access to the v3MP::Cache
object which seemed to return none-sense data. The problem occured daily on
some mashines and never on others. Bogus data and undetermistic behavior
made me conclude that this is a synchronisation problem as more than one
thread is accessing the v3MP::Cache object.
So I added an "SnmpSynchronized" member to the v3MP::Cache class and let all
access functions make calls to lock() and unlock(). This worked, none of my
agents has crashed since.
I will mail the fix to Jochen and Frank.

Also: Would it be possible to rename the macro "REENTRANT" to something like
"SNMP_PP_REENTRANT"? Some Windows lib also defines a macro of that name and
so I get conflicts. Thank you.

Regards,
Henning




More information about the AGENTPP mailing list