RE: segmentation fault
"Ramon Tarruella" <[email protected]> Sun, 28 Mar 2004 00:32:06 -0400
| Newsgroups | gmane.network.net-policy.user |
|---|---|
| Message-ID | <[email protected]> |
Michael this problem was never solved, I'am working again with net-policy, after 5 months, with the before-mayor-dbchanges version + with the corrected file opensnmp/app/snmpEngine.C:27 from the CVS you told me and still receiving segmentation fault for: [[email protected] root]# np-distd -u root -p administrador -s 0 I have to tell you that I reinstalled everything again, RH9, open-snmp, net-snmp , net-policy, to make everything clean but problem persist, I ran some tests so you can help me find out what the real problem is, I tried everything but no luck, check what I did: [[email protected] root]# service net-policy status np-datad esta parado np-distd esta parado [[email protected] root]# service net-policy start Starting np-datad: [ OK ] Starting np-distd: [ OK ] [[email protected] root]# service net-policy status Se esta ejecutando np-datad (pid 3984)... np-distd inactivo pero subsistema bloqueado [[email protected] root]# np-distd -u root -p administrador -s 0 Violacion de segmento [[email protected] root]# gdb np-distd core GNU gdb Red Hat Linux (5.3post-0.20021129.18rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"... /root/core: No existe el fichero o el directorio. (gdb) where No stack. (gdb) gdb np-distd Undefined command: "gdb". Try "help". (gdb) np-distd Undefined command: "np-distd". Try "help". (gdb) r -u root -p administrador Starting program: /usr/local/sbin/np-distd -u root -p administrador [New Thread 1078332320 (LWP 4036)] [New Thread 1086725312 (LWP 4043)] [New Thread 1095113792 (LWP 4044)] [New Thread 1103502272 (LWP 4045)] [New Thread 1116941120 (LWP 4047)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1086725312 (LWP 4043)] 0x00000021 in ?? () (gdb) where #0 0x00000021 in ?? () #1 0x080cb123 in PDU::EraseData() () #2 0x080cb03e in PDU::~PDU() () #3 0x080cf099 in ScopedPDU::~ScopedPDU() () #4 0x0813c9c9 in snmpV3Message::EraseData() () #5 0x0813c422 in snmpV3Message::~snmpV3Message() () #6 0x080e8c7c in snmpStandardMessage_internalData::~snmpStandardMessage_internalData() () #7 0x080eb24b in snmpStandardMessage::~snmpStandardMessage() () #8 0x08118ee0 in snmpMPPrepareOutgoingMsgASI::~snmpMPPrepareOutgoingMsgASI() () #9 0x080f8b5c in snmpDispArchObj::main_loop() () #10 0x080aae20 in snmpDispArchRegObj::init() () #11 0x080e327b in snmpRegObj::initializeArch(snmpArchRegObj*) () #12 0x4010a2b6 in start_thread () from /lib/tls/libpthread.so.0 (gdb) r -u root -p administrador -s 0 The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/local/sbin/np-distd -u root -p administrador -s 0 [New Thread 1078332320 (LWP 4048)] [New Thread 1086725312 (LWP 4055)] [New Thread 1095113792 (LWP 4056)] [New Thread 1103502272 (LWP 4057)] [New Thread 1116941120 (LWP 4059)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1086725312 (LWP 4055)] 0x00000021 in ?? () (gdb) where #0 0x00000021 in ?? () #1 0x080cb123 in PDU::EraseData() () #2 0x080cb03e in PDU::~PDU() () #3 0x080cf099 in ScopedPDU::~ScopedPDU() () #4 0x0813c9c9 in snmpV3Message::EraseData() () #5 0x0813c422 in snmpV3Message::~snmpV3Message() () #6 0x080e8c7c in snmpStandardMessage_internalData::~snmpStandardMessage_internalData() () #7 0x080eb24b in snmpStandardMessage::~snmpStandardMessage() () #8 0x08118ee0 in snmpMPPrepareOutgoingMsgASI::~snmpMPPrepareOutgoingMsgASI() () #9 0x080f8b5c in snmpDispArchObj::main_loop() () #10 0x080aae20 in snmpDispArchRegObj::init() () #11 0x080e327b in snmpRegObj::initializeArch(snmpArchRegObj*) () #12 0x4010a2b6 in start_thread () from /lib/tls/libpthread.so.0 (gdb) Wait for your answer Thanks Ramon Tarruella -----Mensaje original----- De: net-policy-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:net-policy-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]En nombre de Michael Baer Enviado el: lunes, 29 de septiembre de 2003 20:40 Para: Ramon Tarruella CC: Wes Hardaker; net-policy-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Asunto: Re: segmentation fault >>>>> "Ramon" == Ramon Tarruella <[email protected]> writes: Ramon> Wes here are both results: [[email protected] root]# gdb np-distd Ramon> Program received signal SIGSEGV, Segmentation fault. Ramon> [Switching to Thread 1078328224 (LWP 4616)] 0x4020f206 in Ramon> getNode (oidlen=11, oid=0xbfffe3a0) at smi.c:140 140 Ramon> for(nodePtr = smiHandle->rootNodePtr, i=0; i < oidlen; i++) Ramon> { (gdb) where Ramon> #0 0x4020f206 in getNode (oidlen=11, oid=0xbfffe3a0) at Ramon> #smi.c:140 1 0x40210178 in smiGetNodeByOID (oidlen=11, Ramon> #oid=0xbfffe3a0) at smi.c:953 2 0x080c86c6 in Ramon> #OID::toDisplayString(oid_display_types) const () 3 Ramon> #0x080c902d in OID::operator std::string() const () 4 Ramon> #0x080d84e4 in VarBind::operator std::string() const () 5 Ramon> #0x080ed462 in PersistentVarBind::operator std::string() Ramon> #const () 6 0x080c0d4b in operator<<(std::ostream&, Ramon> #asnDataType const&) () 7 0x080a1225 in Ramon> #snmpEngine::snmpEngine() () 8 0x0808c631 in Ramon> #snmpCGArch::init(snmpFIFOObj*&, snmpFIFOObj*&) () 9 Ramon> #0x08083e3a in CG::CG() () 10 0x08069c0d in Ramon> #__static_initialization_and_destruction_0(int, int) () 11 Ramon> #0x0806bd07 in _GLOBAL__I_Debug () 12 0x08157c4d in Ramon> #__do_global_ctors_aux () 13 0x080516f9 in _init () 14 Ramon> #0x08157bda in __libc_csu_init () 15 0x42015539 in Ramon> #__libc_start_main () from /lib/tls/libc.so.6 I found the seg-fault error. It's in OpenSNMP and has been fixed in CVS. You can update and recompile or you can just comment out the line opensnmp/app/snmpEngine.C:27 'DEBUG9_L(debugObj, " and engine id is '" << psSnmpEngineId << "'");' or just move it down to the end of the procedure. Strange that it does not cause problem when testing the opensnmp cg application. It really should fail there as well (and I would have caught it then!). Mike -- [email protected] OpenSNMP/NetSNMP ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Net-policy-users mailing list Net-policy-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/net-policy-users ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click