opensubscriber
   Find in this group all groups
 
Unknown more information…

n : net-snmp-coders@lists.sourceforge.net 11 May 2006 • 10:28PM -0400

net-snmp-5.3.0.1: the snmpd crashes while startup on ppc and linux
by Claus Klein

REPLY TO AUTHOR
 
REPLY TO GROUP



Hi,

the snmpd crashes while startup on ppc.

I found a possible problem in net-snmp-5.3.0.1/agent/mibgroup/hardware/cpu/cpu_linux.c,
but with or without my fix, the snmpd crashes.

What may I do to fix this problem?

claus


[root@mdms_em25:~]# strace -e open,read snmpd -f
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnetsnmpmibs.so.10", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\2\306"..., 4096) = 4096
open("/lib/libnetsnmpagent.so.10", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\273"..., 4096) = 4096
open("/lib/libnetsnmphelpers.so.10", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\203"..., 4096) = 4096
open("/lib/libnetsnmp.so.10", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1b\330"..., 4096) = 4096
open("/lib/libdl.so.0", O_RDONLY)       = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\10"..., 4096) = 4096
open("/lib/libcrypto.so.0.9.7", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libcrypto.so.0.9.7", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\3\232"..., 4096) = 4096
open("/lib/libm.so.0", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0;\260"..., 4096) = 4096
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\26"..., 4096) = 4096
open("/lib/libc.so.0", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\366"..., 4096) = 4096
open("/etc/services", O_RDONLY)         = 5
read(5, "# /etc/services:\n# $Id: services"..., 4096) = 4096
open("/proc/net/dev", O_RDONLY)         = 5
read(5, "Inter-|   Receive               "..., 4096) = 1061
open("/proc/sys/net/ipv4/neigh/lo/retrans_time", O_RDONLY) = 7
read(7, "100\n", 4096)                  = 4
open("/proc/sys/net/ipv4/neigh/eth0/retrans_time", O_RDONLY) = 7
read(7, "100\n", 4096)                  = 4
open("/proc/sys/net/ipv4/neigh/eth1/retrans_time", O_RDONLY) = 7
read(7, "100\n", 4096)                  = 4
open("/proc/sys/net/ipv4/neigh/br0/retrans_time", O_RDONLY) = 7
read(7, "100\n", 4096)                  = 4
read(5, "", 4096)                       = 0
open("/proc/cpuinfo", O_RDONLY)         = 5
read(5, "cpu\t\t: 82xx (Hip7)\ncore clock\t: "..., 4096) = 132
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
[root@mdms_em25:~]# snmpd -v

NET-SNMP version:  5.3.0.1
Web:               http://www.net-snmp.org/
Email:             net-snmp-coders@list...

[root@mdms_em25:~]# cat /proc/cpuinfo
cpu             : 82xx (Hip7)
core clock      : 333 MHz
CPM  clock      : 199 MHz
bus  clock      : 66 MHz
revision        : 32.19 (pvr 8082 2013)
bogomips        : 222.00
[root@mdms_em25:~]#   uname -a
Linux mdms_em25 2.4.22 #42 Tue May 9 16:11:08 GMT 2006 ppc unknown
[root@mdms_em25:~]#  

DEBK1919:/scratch/buildroot> diff -u /tools/build_powerpc/net-snmp-5.3.0.1/agent/mibgroup/hardware/cpu/cpu_linux.c /tools/build_powerpc/net-snmp-5.3.1.pre1/agent/mibgroup/hardware/cpu/cpu_linux.c
--- /tools/build_powerpc/net-snmp-5.3.0.1/agent/mibgroup/hardware/cpu/cpu_linux.c       2006-05-11 08:35:45.000000000 +0000
+++ /tools/build_powerpc/net-snmp-5.3.1.pre1/agent/mibgroup/hardware/cpu/cpu_linux.c    2005-07-20 22:07:41.000000000 +0000
@@ -35,7 +35,6 @@
     int  i;
     netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 1 );
     strcpy(cpu->name, "Overall CPU statistics");
-       cpu->descr[0] = '\0';   // see strcat below! ck

     fp = fopen( CPU_FILE, "r" );
     while ( fgets( buf, sizeof(buf), fp)) {
@@ -47,7 +46,7 @@
#endif
         }

-#ifdef DESCR_FIELD
+#ifdef DESCR2_FIELD
         if (!strncmp( buf, DESCR_FIELD, strlen(DESCR_FIELD))) {
             cp = strchr( buf, ':' );
             strcpy( cpu->descr, cp+2 );
DEBK1919:/scratch/buildroot>          




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@list...
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.