[AGENT++] Segmentation fault when trying to use no threads

Frank Fock fock at agentpp.com
Wed Mar 9 21:07:33 CET 2005


Hi James,

If you use _NO_THREADS you have to recompile *everything*. All libs
and the executable. The stack trace below seems to be caused by 
inconsistent
object libraries (some with _NO_THREADS others without).

Hope this helps.

Best regards,
Frank

JAMES Robin wrote:

>We have tried to use the no threads mode in snmp++ and agent++. To do this we uncommented the defining of _NO_THREADS in agent++.h and config_snmp_pp.h and re-compiled everything. When the subagent runs it causes a segmentation fault. The back trace is:
> 
>#0  0x00263b2a in _int_malloc () from /lib/tls/libc.so.6
>#1  0x00262e7d in malloc () from /lib/tls/libc.so.6
>#2  0x0019f40e in operator new () from /usr/lib/libstdc++.so.5
>#3  0x0019f55f in operator new[] () from /usr/lib/libstdc++.so.5
>#4  0x007cfccf in Oid (this=0x88bd984, oid=@0xbfff81f0 <mailto:oid=@0xbfff81f0> ) at oid.cpp:136
>#5  0x006929db in Oidx (this=0x88bd984, _ctor_arg=@0xbfff81f0 <mailto:_ctor_arg=@0xbfff81f0> ) at mib_entry.h:202
>#6  0x00699026 in MibEntry (this=0x88bd938, o=@0xbfff81f0 <mailto:o=@0xbfff81f0> , a=NOACCESS) at mib_entry.cpp:128
>#7  0x006d5b08 in MibGroup (this=0x88bd938, o=@0xbfff81f0 <mailto:o=@0xbfff81f0> , p=@0xbfff8210 <mailto:p=@0xbfff8210> ) at mib_context.cpp:110
>#8  0x0805ed10 in graphics_mib (this=0x88bd938) at graphics_mib_agent.C:817
>#9  0x080539d5 in main (argc=2, argv=0xbfff8314) at gphs_mib.C:104
>
> 
>The code is failing at line 817 in the following code extract:
> 
>814 // Group
>815 graphics_mib::graphics_mib():
>816    MibGroup("1.3.6.1.4.1.1254.1.1.11", "graphics_mib")
>817 {
>818  //--AgentGen BEGIN=graphics_mib::graphics_mib
>819  //--AgentGen END
>820  add(new graphics_mib_gphAttributeChangeCount());
>821  add(new graphics_mib_gphServerType());
>822  add(new graphics_mib_gphServerState());
>823  add(new graphics_mib_gphGraphicsState());
>824  add(new graphics_mib_gphPointerState());
>825  add(new graphics_mib_gphKeyboardState());
>826  add(new graphics_mib_decGraphicsCardType());
>827  add(new graphics_mib_decPointerType());
>828  add(new graphics_mib_decKeyboardType());
>829  add(new graphics_mib_sonyDdmMajorSystemState());
>830  add(new graphics_mib_sonyDdmM1BoardState());
>831  add(new graphics_mib_sonyDdmDacState());
>832  add(new graphics_mib_sonyDdmDfgState());
>833  //--AgentGen BEGIN=graphics_mib::graphics_mib:post
>834  //--AgentGen END
>835 }
>
> 
>We also tried to use the no threads mode by defining _NO_THREADS in Makefile.linux but then had undefined references when linking the subagent:
> 
>gphs_mib.o: In function `Agentpp::Thread::clone()':
>agent++/include/agent_pp/List.h:282: undefined reference to `Agentpp::Thread::get_runnable()'
>gphs_mib.o:agent++/include/agent_pp/List.h:169: undefined reference to `Agentpp::Thread::Thread(Agentpp::Runnable&)'
>gphs_mib.o: In function `Agentpp::TaskManager::clone()':
>agent++/include/agent_pp/List.h:1077: undefined reference to `Agentpp::ThreadPool::ThreadPool(int, int)'
>gphs_mib.o:agent++/include/agent_pp/List.h:485: undefined reference to `Agentpp::TaskManager::TaskManager(Agentpp::ThreadPool*, int)'
>
> 
>When compiled without defining _NO_THREADS the program works. What settings should be we be using to remove thread support?
> 
>Regards
>Robin James
> 
>
>____
>
>This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
>
>Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy.
>
>Any views expressed in this message are those of the sender.
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/agentpp
>
>  
>





More information about the AGENTPP mailing list