[AGENT++] Agent crashing on startup with error - "No such file or directory"

Gokul Poduval gokul.poduval at gmail.com
Mon Sep 19 12:42:00 CEST 2005


Hello,
Now I am able to compile the latest version of agent++ and snmp++ 
successfully. However, the agent crashes on starting up. I am following the 
ATM MIB example as closely as possible. The following is the gdb backtrace -


#0 0x40877bb3 in DvSnmpAgent::initSNMPv3BootCounter (this=0x81a0d00) at 
DvSnmpAgent.cpp:802
802 DvSnmpAgent.cpp: No such file or directory.
 in DvSnmpAgent.cpp
(gdb) bt
#0 0x40877bb3 in DvSnmpAgent::initSNMPv3BootCounter (this=0x81a0d00) at 
DvSnmpAgent.cpp:802
#1 0x40873f95 in DvSnmpAgent::DvSnmpAgent (this=0x81a0d00, __in_chrg=1, 
port=161) at DvSnmpAgent.cpp:222
#2 0x408736ec in DvSnmpAgent::init (port=161) at DvSnmpAgent.cpp:146
#3 0x080523ad in main (argc=1, argv=0xbfffdb74) at DvMain.cpp:110
#4 0x4243e316 in __libc_start_main (main=0x8052250 <main>, argc=1, 
ubp_av=0xbfffdb74, init=0x8050e3c <_init>, fini=0x807a704 <_fini>,
 rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xbfffdb6c) at 
../sysdeps/generic/libc-start.c:129

Line 802 is basically trying to set the v3mp for the request list. 

Line 802 : mpRequestList->set_v3mp(v3mp);

Do you know where I could be going wrong ? Trying to extract the engine ID 
gives a similar error.

 
On 9/15/05, Jochen Katz <katz at agentpp.com> wrote:
> 
> Hi,
> 
> you're using _NO_THREADS. Apply the attached patch to agent++ and try 
> again.
> 
> > We were using version 3.5.2. I tried upgrading Agent++ to 3.5.23a, and 
> it
> > Agent++ and SNMP++ compiled without a problem. I upgrade SNMP++ to 
> 3.2.17.
> 
> As agent++ compiled but not your program: It seems you did not define
> _NO_THREADS while compiling agent++/snmp++. This will cause strange
> runtime errors, so take care that compile settings are identical for all
> parts.
> 
> Regards,
> Jochen
> 
> 
> diff -ru agent++v3.5.23a/include/agent_pp/mib.h 
> agent++_patched/include/agent_pp/mib.h
> --- agent++v3.5.23a/include/agent_pp/mib.h 2005-06-18 13:06:24.000000000+0200
> +++ agent++_patched/include/agent_pp/mib.h 2005-09-15 12:26:58.575692872+0200
> @@ -95,13 +95,13 @@
> #include <stdio.h>
> 
> #include <agent_pp/agent++.h>
> +#include <agent_pp/threads.h>
> #include <agent_pp/List.h>
> #include <agent_pp/mib_avl_map.h>
> #include <agent_pp/snmp_pp_ext.h>
> #include <agent_pp/mib_entry.h>
> #include <agent_pp/oidx_ptr.h>
> #include <agent_pp/tools.h>
> -#include <agent_pp/threads.h>
> #include <agent_pp/request.h>
> #include <agent_pp/mib_context.h>
> #include <agent_pp/proxy_forwarder.h>
> diff -ru agent++v3.5.23a/include/agent_pp/notification_originator.h 
> agent++_patched/include/agent_pp/notification_originator.h
> --- agent++v3.5.23a/include/agent_pp/notification_originator.h 2005-06-18 
> 13:06:24.000000000 +0200
> +++ agent++_patched/include/agent_pp/notification_originator.h 2005-09-15 
> 12:05:42.968614624 +0200
> @@ -92,6 +92,7 @@
> #define _notification_originator_h_
> 
> #include <agent_pp/agent++.h>
> +#include <agent_pp/mib.h>
> 
> #define mpV1 0
> #define mpV2c 1
> diff -ru agent++v3.5.23a/include/agent_pp/request.h 
> agent++_patched/include/agent_pp/request.h
> --- agent++v3.5.23a/include/agent_pp/request.h 2005-06-18 13:06:
> 24.000000000 +0200
> +++ agent++_patched/include/agent_pp/request.h 2005-09-15 12:33:
> 02.802322008 +0200
> @@ -92,9 +92,10 @@
> #define request_h_
> 
> #include <agent_pp/agent++.h>
> +#include <agent_pp/threads.h>
> #include <agent_pp/snmp_pp_ext.h>
> #include <agent_pp/List.h>
> -#include <agent_pp/threads.h>
> +#include <agent_pp/mib_entry.h>
> 
> #ifdef _SNMPv3
> // vacm.cpp needs vacm.h and vacm_class.h
> @@ -144,7 +145,11 @@
> AGENTPP_DECL_TEMPL template class AGENTPP_DECL Array<MibEntry>;
> #endif
> 
> +#ifdef _THREADS
> class AGENTPP_DECL Request: public Synchronized {
> +#else
> +class AGENTPP_DECL Request {
> +#endif
> friend class RequestList;
> friend class Mib;
> public:
> diff -ru agent++v3.5.23a/include/agent_pp/threads.h 
> agent++_patched/include/agent_pp/threads.h
> --- agent++v3.5.23a/include/agent_pp/threads.h 2005-06-18 13:06:
> 24.000000000 +0200
> +++ agent++_patched/include/agent_pp/threads.h 2005-09-15 12:34:
> 20.834459320 +0200
> @@ -106,8 +106,6 @@
> #include <sys/types.h>
> 
> #include <agent_pp/List.h>
> -#include <agent_pp/snmp_pp_ext.h>
> -#include <agent_pp/tools.h>
> 
> 
> #define MULTI_THREADED TRUE
> Nur in agent++_patched/src: Makefile.
> diff -ru agent++v3.5.23a/src/mib_context.cpp 
> agent++_patched/src/mib_context.cpp
> --- agent++v3.5.23a/src/mib_context.cpp 2005-06-18 13:06:21.000000000+0200
> +++ agent++_patched/src/mib_context.cpp 2005-09-15 12:18:27.160439808+0200
> @@ -91,6 +91,7 @@
> 
> #include <string.h>
> #include <agent_pp/mib_context.h>
> +#include <agent_pp/tools.h>
> #include <snmp_pp/log.h>
> 
> #ifdef SNMP_PP_NAMESPACE
> diff -ru agent++v3.5.23a/src/mib_entry.cpp 
> agent++_patched/src/mib_entry.cpp
> --- agent++v3.5.23a/src/mib_entry.cpp 2005-06-18 13:06:21.000000000 +0200
> +++ agent++_patched/src/mib_entry.cpp 2005-09-15 12:18:57.894767480 +0200
> @@ -95,6 +95,7 @@
> #include <stdio.h>
> 
> #include <agent_pp/mib_entry.h>
> +#include <agent_pp/tools.h>
> #include <snmp_pp/log.h>
> 
> #ifdef SNMP_PP_NAMESPACE
> 
> 
>



More information about the AGENTPP mailing list