[AGENT++] When I kill snmpd process, my application crashes

Frank Fock fock at agentpp.com
Mon Apr 8 09:44:00 CEST 2013


Hi Michal,

The location you quoted is definitely not the root cause of the memory
fault.
Rather then it seems that closing the AgentX session creates a race
condition with some other updates running on the same objects
at the same time.
If you run the agent in the debugger while you kill the snmpd,
what do you see on the stack traces of the running threads?

Are you running the AgentX++ agent as master agent? This
is recommended when you want to integrate a NET-SNMP agent
via AgentX. The AgentX implementation of NET-SNMP master agent
has some bugs which could cause problems - although, this might
not be the case here.

See the AgentX++ README for details.

Best regards,
Frank

Am 08.04.2013 08:52, schrieb Michal Lp:
> Hi
>
> I'm using AGENT++ 3.5.31, AgentX++ 1.4.18, SNMP++ 3.2.25 (I purchased the
> license)
>
> I faced this issue, when I kill *snmpd* process (pkill snmpd), my
> application crashes.
>
> I added some debug prints and see that it happens at this line: *
> content.remove(&o)*; (in method void AgentXSharedTable::remove_row(const
> Oidx& ind))
>
> content.remove calls:
>
>                  void remove(Oidx* oidptr) {
>
>                                  T* t = find(oidptr);
>
>                                  content->del(oidptr);
>
>                                  if (t) delete t;
>
>                  }
>
>
>
> Which calls
>
> void OidxPtrEntryPtrAVLMap::del(OidxPtr  item)
>
> {
>
>    if (root == 0) return;
>
>    _need_rebalancing = 0;
>
>    _already_found = 0;
>
>    _found_node = 0;
>
>    _target_item = &item;
>
>    _del(root, root);
>
>    if (_found_node)
>
>    {
>
>      delete(_found_node);
>
>      if (--count == 0)
>
>        root = 0;
>
>    }
>
> }
>
>
>
> I can't add debug prints there, so I can't say what cause the crash, and it
> is also seems very protected, (checking the pointers before deleting them)
>
> Did you face this kind of situation? Can you please assist?
>
>
>
> Thanks,
>
> Michal.
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231



More information about the AGENTPP mailing list