From: SourceForge.net <no...@so...> - 2007-11-22 12:14:11
|
Bugs item #1836008, was opened at 2007-11-21 14:35 Message generated for change (Comment added) made by jeffreyforman You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1836008&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: apps Group: openBSD Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: net-snmp 5.4 unresponsive after first query, cpu/mem Initial Comment: I am running net-snmp 5.4 on my Sparc Ultra 60 (2xUSII-450 with 1GB of ram) running OpenBSD current (# uname -a OpenBSD formangate.jeffreyforman.net 4.2 GENERIC.MP#2 sparc64) I setup a very generic snmpd.conf to test querying the system for resources, etc. The bug is that when I send a very simple snmpwalk query, it responds, and then seems to die midway through the query. Subsequent queries go unanswered. Using 'top' to see the status of the process, it seems to be eating away at CPU time and memory. I have to 'kill -9' the process and even then, subsequent queries go unanswered. System Info/Status is attached infile. ---------------------------------------------------------------------- Comment By: JeffF (jeffreyforman) Date: 2007-11-22 07:14 Message: Logged In: YES user_id=1942694 Originator: NO bash-3.2# cat /etc/snmp/snmpd.conf # contact syslocation Something syscontact "ro...@so..." # auth rocommunity public --------------------- Obviously in production I would change the community string, this was just in testing to rule out all complications. ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2007-11-22 06:18 Message: Logged In: YES user_id=848638 Originator: NO What's the content of your snmpd.conf? ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2007-11-22 06:17 Message: Logged In: YES user_id=848638 Originator: NO Please see http://www.net-snmp.org/wiki/index.php/Debugger for gdb usage instructions. ---------------------------------------------------------------------- Comment By: JeffF (jeffreyforman) Date: 2007-11-21 23:25 Message: Logged In: YES user_id=1942694 Originator: NO I did get it to build that time, and tried running it through gdb (I am unfamiliar with this utility. Please suggest proper execution if mine was incorrect): # gdb /home/jforman/net-snmp-5.4.1/agent/snmpd /root/snmpd.core GNU gdb 6.3 Copyright 2004 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 "sparc64-unknown-openbsd4.2"..."/home/jforman/net-snmp-5.4.1/agent/snmpd": not in executable format: File format not recognized Core was generated by `snmpd'. Program terminated with signal 8, Arithmetic exception. #0 0x000000004edb347c in ?? () (gdb) bt #0 0x000000004edb347c in ?? () #1 0x000000004edb3588 in ?? () Previous frame identical to this frame (corrupt stack?) I did see this in the /var/log/snmpd.log: NET-SNMP version 5.4.1 kvm_read(*, 7f, 0x40d72400, 328) = -1: invalid address (7f) The first time it ran though and I executed snmpwalk, I did get some output before it timed out: .... DISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_mteTriggerRising' = STRING: _triggerFire NOTIFICATION-LOG-MIB::nlmConfigGlobalEntryLimit.0 = Gauge32: 1000 NOTIFICATION-LOG-MIB::nlmConfigGlobalAgeOut.0 = Gauge32: 1440 minutes NOTIFICATION-LOG-MIB::nlmStatsGlobalNotificationsLogged.0 = Counter32: 0 notifications NOTIFICATION-LOG-MIB::nlmStatsGlobalNotificationsBumped.0 = Counter32: 0 notifications Timeout: No Response from localhost I do have a rather large core dump file (3.6MB) from the gdb run if I can post that somewhere. ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2007-11-21 17:47 Message: Logged In: YES user_id=848638 Originator: NO Use "./configure ... --with-out-mib-modules=host" for the moment. ---------------------------------------------------------------------- Comment By: JeffF (jeffreyforman) Date: 2007-11-21 15:40 Message: Logged In: YES user_id=1942694 Originator: NO I tried building 5.4.1 from the standard "./configure; make; make install" sequence. While running 'make' it errored out on this: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include -I/usr/libdata/perl5/sparc64-openbsd/5.8.8/CORE -g -O2 -Uopenbsd4 -Dopenbsd4=openbsd4 -c host/hr_disk.c -fPIC -DPIC -o host/.libs/hr_disk.o host/hr_disk.c: In function `Get_Next_HR_Disk': host/hr_disk.c:668: warning: cast to pointer from integer of different size host/hr_disk.c:726: warning: overflow in implicit constant conversion host/hr_disk.c: In function `Save_HR_Disk_Specific': host/hr_disk.c:823: error: invalid use of undefined type `struct disklabel' host/hr_disk.c: In function `Save_HR_Disk_General': host/hr_disk.c:844: error: `dktypenames' undeclared (first use in this function) host/hr_disk.c:844: error: (Each undeclared identifier is reported only once host/hr_disk.c:844: error: for each function it appears in.) host/hr_disk.c:844: error: invalid use of undefined type `struct disklabel' host/hr_disk.c: In function `Query_Disk': host/hr_disk.c:900: error: invalid application of `sizeof' to an incomplete type host/hr_disk.c: At top level: host/hr_disk.c:132: error: storage size of `HRD_info' isn't known *** Error code 1 Stop in /home/jforman/net-snmp-5.4.1/agent/mibgroup. *** Error code 1 Stop in /home/jforman/net-snmp-5.4.1/agent (line 781 of Makefile). *** Error code 1 Stop in /home/jforman/net-snmp-5.4.1 (line 519 of Makefile). ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2007-11-21 15:07 Message: Logged In: YES user_id=848638 Originator: NO If it still fails with 5.4.1: - Please run in the foreground with "-DALL" (full debugging) and attach the output. - Attach to the hanging snmpd with gdb and post the backtrace. ---------------------------------------------------------------------- Comment By: JeffF (jeffreyforman) Date: 2007-11-21 15:00 Message: Logged In: YES user_id=1942694 Originator: NO Hi Tanders, To answer your questions, it is a stock 5.4 openbsd package installed via the pkg_add utility. You can find one of the tarballs at: ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/sparc64/net-snmp-5.4p1.tgz As for the command output: # net-snmp-config --configure-options '--enable-shared' '--with-libwrap' '--with-perl-modules' '--with-copy-persistent-files=no' '--with-mib-modules=host disman/event-mib smux mibII/mta_sendmail' '--with-default-snmp-version=3' '--with-sys-contact=no...@no...valid' '--with-sys-location=somewhere' '--with-logfile=/var/log/snmpd' '--with-persistent-directory=/var/net-snmp' '--prefix=/usr/local' '--sysconfdir=/etc' '--mandir=/usr/local/man' '--infodir=/usr/local/info' 'CC=cc' 'CFLAGS=-O2 -pipe' 'CXXFLAGS=-O2 -pipe' 'CXX=c++' As for the command snmpd in the foreground, I dont actually get any output at all. It just spikes CPU usage on one cpu on the machine (It is a dual processor Ultrasparc-II machine). Trying to query it with snmpwalk returns no output. As for my snmpd.conf file: ------------------------- -bash-3.2$ cat /etc/snmp/snmpd.conf # contact syslocation Something syscontact "ro...@so..." # auth rocommunity public # disk monitoring disk / ---------------------- I will try to build a 5.4.1 package now and report back. ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2007-11-21 14:47 Message: Logged In: YES user_id=848638 Originator: NO Is this a stock 5.4 package compiled from source or a version with OpenBSD patches applied? What's the output of "net-snmp-config --configure-options"? If you run snmpd in the foreground ("snmpd -f -Le ..."), what output do you get? Can you retry with 5.4.1 and report back, please? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1836008&group_id=12694 |