Hi, The snmptrapd core dump again after bring up 8 days, the result is same as before, please see the attachment.
Please advise. Lan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wu, Lan, ALABS Sent: Wednesday, July 20, 2005 11:29 AM To: net-snmp-users@lists.sourceforge.net Subject: RE: snmptrapd Core Dump ! Robert, Thanks for returning my email, the strange thing is, this core dump was happened the first time after I installed the 5.2.1 and patch for snmptrapd to fix the memory leak problem, the snmptrpad can not hold for a day (traps comes in rapidly) then core dump, however, after that I restarted the snmptrpd it was soaking there for a week (same volume) then I restarted it and soaking another week, it just does not happen now (my custom one). I am afraid this may be a time-bomb in the production. (in fact, I am updating the software in production this weekend) << Does this still happen consistently? >> It only happened once. << Does it happen if you use the default log format, instead of your custom one? >> I am always use the custom one. I want to recreate the core dump. Please advise. Thanks. Lan -----Original Message----- From: Robert Story [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 20, 2005 11:10 AM To: Wu, Lan, ALABS Cc: net-snmp-users@lists.sourceforge.net Subject: Re: snmptrapd Core Dump ! On Tue, 19 Jul 2005 18:08:01 -0500 Wu, wrote: WLA> -----Original Message----- WLA> On Mon, 27 Jun 2005 09:57:41 -0500 Wu, wrote: WLA> WLA> I was away for few days, Today, I check the snmptrapd, it core dump WLA> WLA> less a day (6/21 14:01:54 to 6/22 11:31), although the memory did not WLA> WLA> increase, but it is still core dump in the same place, please see the WLA> WLA> attachment. So I am guessing the memory leak may be not the root WLA> WLA> cause of the core dump ?? WLA> WLA> > 1333 sprintf(str, "%ld", *var->val.integer); WLA> Thanks for returning my email, I still keep the old core file here is the WLA> outcome: WLA> WLA> (gdb) print *var WLA> $2 = {next_variable = 0x302b8, name = 0x30078, name_length = 10, WLA> type = 5 '\005', val = {integer = 0x0, string = 0x0, objid = 0x0, WLA> bitstring = 0x0, counter64 = 0x0, floatVal = 0x0, doubleVal = 0x0}, WLA> (gdb) print var->val.integer WLA> $3 = (long int *) 0x0 That's what I expected. But I don't know why it would happen. A NULL val pointer would seem to indicated a failed malloc, but for an integer it should always use the internal buffer instead of allocating memory. Does this still happen consistenly? Does it happen if you use the default log format, instead of your custom one? -- NOTE: messages sent directly to me, instead of the lists, will be deleted unless they are requests for paid consulting services. Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
rw------- 1 snmp staff 1187656 Jul 28 18:18 core $ gdb /home/snmp/netsnmp/net-snmp/5.2.1/apps/libs/snmptrapd /home/snmp/snmpcol/bin GNU gdb 6.0 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 "sparc-sun-solaris2.8".../home/snmp/netsnmp/net-snmp/5.2.1/apps/libs/snmptrapd: No such file or directory. "/home/snmp/snmpcol/bin" is not a core dump: File format not recognized (gdb) exit Undefined command: "exit". Try "help". (gdb) quit $ apps/libs/snmptrapd /home/snmp/snmpcol/bin/core < GNU gdb 6.0 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 "sparc-sun-solaris2.8".../home/snmp/netsnmp/net-snmp/5.2.1/apps/libs/snmptrapd: No such file or directory. Core was generated by `snmptrapd -f -F %N|%w%q|%#y%#02m%#02l_%#02.2h%#02.2j%#02.2k|%A|%B|%-v\n -OTausQ'. Program terminated with signal 11, Segmentation fault. #0 0xff196054 in ?? () (gdb) where #0 0xff196054 in ?? () #1 0xff19a57c in ?? () #2 0xff375d6c in ?? () (gdb) quit $ gdb /home/snmp/netsnmp/net-snmp/5.2.1/apps/.libs/snmptrapd /home/snmp/snmpc> GNU gdb 6.0 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 "sparc-sun-solaris2.8".../home/snmp/netsnmp/net-snmp/5.2.1/apps/.libs/snmptrapd: No such file or directory. Core was generated by `snmptrapd -f -F %N|%w%q|%#y%#02m%#02l_%#02.2h%#02.2j%#02.2k|%A|%B|%-v\n -OTausQ'. Program terminated with signal 11, Segmentation fault. #0 0xff196054 in ?? () (gdb) where #0 0xff196054 in ?? () #1 0xff19a57c in ?? () #2 0xff375d6c in ?? () (gdb) quit $ apps/.libs/snmptrapd /home/snmp/snmpcol/bin/core < GNU gdb 6.0 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 "sparc-sun-solaris2.8"... Core was generated by `snmptrapd -f -F %N|%w%q|%#y%#02m%#02l_%#02.2h%#02.2j%#02.2k|%A|%B|%-v\n -OTausQ'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/libnetsnmptrapd.so.5...done. Loaded symbols for /usr/local/lib/libnetsnmptrapd.so.5 Reading symbols from /usr/local/lib/libnetsnmpagent.so.5...done. Loaded symbols for /usr/local/lib/libnetsnmpagent.so.5 Reading symbols from /usr/local/lib/libnetsnmpmibs.so.5...done. Loaded symbols for /usr/local/lib/libnetsnmpmibs.so.5 Reading symbols from /usr/local/lib/libnetsnmphelpers.so.5...done. Loaded symbols for /usr/local/lib/libnetsnmphelpers.so.5 Reading symbols from /usr/local/lib/libnetsnmp.so.5...done. Loaded symbols for /usr/local/lib/libnetsnmp.so.5 Reading symbols from /usr/lib/libdl.so.1...done. Loaded symbols for /usr/lib/libdl.so.1 Reading symbols from /usr/lib/libkvm.so.1...done. Loaded symbols for /usr/lib/libkvm.so.1 Reading symbols from /usr/local/ssl/lib/libcrypto.so.0.9.7...done. Loaded symbols for /usr/local/ssl/lib/libcrypto.so.0.9.7 Reading symbols from /usr/lib/libkstat.so.1...done. Loaded symbols for /usr/lib/libkstat.so.1 Reading symbols from /usr/lib/libelf.so.1...done. Loaded symbols for /usr/lib/libelf.so.1 Reading symbols from /usr/lib/libm.so.1...done. Loaded symbols for /usr/lib/libm.so.1 Reading symbols from /usr/lib/libnsl.so.1...done. Loaded symbols for /usr/lib/libnsl.so.1 Reading symbols from /usr/lib/libsocket.so.1...done. Loaded symbols for /usr/lib/libsocket.so.1 ---Type <return> to continue, or q <return> to quit--- Reading symbols from /usr/lib/libadm.so.1...done. Loaded symbols for /usr/lib/libadm.so.1 Reading symbols from /usr/lib/libc.so.1...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/local/lib/libgcc_s.so.1...done. Loaded symbols for /usr/local/lib/libgcc_s.so.1 Reading symbols from /usr/lib/libmp.so.2...done. Loaded symbols for /usr/lib/libmp.so.2 Reading symbols from /usr/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1...done. Loaded symbols for /usr/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1 Reading symbols from /usr/lib/nss_files.so.1...done. Loaded symbols for /usr/lib/nss_files.so.1 Reading symbols from /usr/lib/locale/en_US.ISO8859-15/en_US.ISO8859-15.so.2... done. Loaded symbols for /usr/lib/locale/en_US.ISO8859-15/en_US.ISO8859-15.so.2 #0 0xff196054 in sprint_realloc_integer (buf=0xffbeeee8, buf_len=0xffbeeee4, out_len=0xffbeeee0, allow_realloc=1, var=0x30060, enums=0x0, hint=0x0, units=0x0) at mib.c:1333 1333 sprintf(str, "%ld", *var->val.integer); (gdb) print var $1 = (const netsnmp_variable_list *) 0x30060 (gdb) print *var $2 = {next_variable = 0x302b8, name = 0x30078, name_length = 10, type = 5 '\005', val = {integer = 0x0, string = 0x0, objid = 0x0, bitstring = 0x0, counter64 = 0x0, floatVal = 0x0, doubleVal = 0x0}, val_len = 0, name_loc = {1, 3, 6, 1, 4, 1, 1899, 1, 6, 11, 2065722991, 1851158380, 1635019116, 1696627978, 538976288, 976895264, 2065724270, 1836076655, 1953064569, 1181314164, 1701987694, 1953659168, 874544394, 175337069, 1884188532, 1768323398, 1768715365, 1918005111, 1400136052, 1970479183, 1112163651, 1412256857, 1346701856, 538976339, 1498305601, 1478500384, 538976338, 1870091124, 1635022195, 169877536, 541933912, 759251779, 1163088672, 544367969, 1680696178, 1700885605, 169877536, 542331969, 1414877984, 538976288, 543389042, 1919250036, 169877536, 541345107, 1129466192, 1414090574, 169877536, 538976288, 539120744, 1696625524, 1635022195, 544171552, 1952999795, 543387502, 1667592308, 1969318944, 1919907630, 168435744, 538976288, 538976340, 1864393586, 1700885605, 543236210, 1870078057, 1847620712, 1769152628, 1633840229, 740319520, 1835101793, 1734701600, 1836413812, 169877536, 538976288, 538997605, 1948284008, 1769152623, 1651139939, 1948284015, 543517044, 1751478816, 1668441441, 1952792942, 1682403112, 875110511, 1913266208, 538976288, 538976355, 1919246708, 1698786916, 1466001780, 674572590, 571088928, 538982970, 1025538848, 1936616816, 1315927145, 1719223913, 1819567474, 1164866674, 2032153888, 2097809965, 755641645, 170732832, 1131376230, 1869770081, 1852007712, 1768842863, 1919770996, 1768910346, 757926445, 755632755, 1852665934, 1869900134, 2034462573, 1886153057, ---Type <return> to continue, or q <return> to quit--- 1852007795, 542065226, 1162040352}, buf = "\000\000\vĂTIFIER ::=\n", ' ' <repeats 25 times>, data = 0x0, dataFreeHook = 0, index = 0} (gdb) print var->val.integer $3 = (long int *) 0x0 (gdb) print *var->val.integer Cannot access memory at address 0x0 (gdb)