[AGENT++] proper way to shutdown an agent

Mo Po mopo777 at gmail.com
Mon Jun 6 20:46:18 CEST 2011


Hi,

What is the proper way to shut down a multi-threaded agent?

I am getting a core dump when the agent exits (is shut down), such as in:

[Switching to thread 1 (Thread 6710)]#0  0x0000000000000000 in ?? ()
#0  0x0000000000000000 in ?? ()
#1  0x00007f11eb1bd125 in Agentpp::Mib::process_get_bulk_request
(this=0x15c86f8, req=0x7f11e416dfc0) at
tools/snmp/agentpp/src/mib.cpp:4011
#2  0x00007f11eb1bb702 in Agentpp::Mib::do_process_request
(this=0x15c86f8, req=0x7f11e416dfc0) at
tools/snmp/agentpp/src/mib.cpp:3571
#3  0x00007f11eb1d0300 in Agentpp::MibTask::run (this=0x7f11e4099d70)
at tools/snmp/agentpp/src/threads.cpp:957
#4  0x00007f11eb1cef12 in Agentpp::TaskManager::run (this=0x16241e0)
at tools/snmp/agentpp/src/threads.cpp:779
#5  0x00007f11eb1cda56 in Agentpp::thread_starter (t=0x1624240) at
tools/snmp/agentpp/src/threads.cpp:488
#6  0x00007f11f01609ca in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#7  0x00007f11ecff770d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()


I suspect the problem is that the above get bulk requests is still
being processed (asynchronously) while the application is exiting and
destructors are called.
Thanks a lot.

-- 
Mo Po



More information about the AGENTPP mailing list