Dear list, I'm running a Debian based rtg snmp poller. As a polling daemon rtg lives on top of libsnmp (I'll list exact versions later in the message). The system was in fine working condition for a long time. A couple of days ago I mentioned a strange behavior.
rtg daemon is logging every poll round, with reports for error(s), wraps(s), and so on. Normal logging sequence of daemon looks like this: === snip === [Polls = 1180317092] [DBInserts = 1180112027] [Wraps = 535907] [OutOfRange = 340164] [No Resp = 371433] [SNMP Errs = 0] [Slow = 0] [PollTime = 0.011s] Next Poll: 10...*** Counter Wrap ([email protected]) [poll: 190447615][last: 3788532698][insert: 696882212] *** Counter Wrap ([email protected]) [poll: 2864663][last: 43611440][insert: 18446744073668804838] *** Out of Range ([email protected]) [insert_val: 18446744073668804838] [oor: 750000000000] [set.out_of_range: 750000000000] 9...8...7...6...5... Reading RTG target list [../etc/targets.cfg]. Successfully hashed [0] new targets, (0 bytes). 4...3...2...1... [01/25 05:59:47 Queue ready, broadcasting thread go condition.] [01/25 05:59:47 Poll round 106789 complete.] === snip === The problem log I found was looking like this: === snip === [Polls = 1180328829] [DBInserts = 1180123765] [Wraps = 535909] [OutOfRange = 340165] [No Resp = 371433] [SNMP Errs = 0] [Slow = 0] [PollTime = 0.000s] Next Poll: 10... No log handling enabled - turning on stderr logging truncating signed value to 32 bits (10) truncating signed value to 32 bits (10) truncating signed value to 32 bits (10) truncating signed value to 32 bits (10) truncating signed value to 32 bits (10) truncating signed value to 32 bits (10) truncating signed value to 32 bits (10) === snip === At first glance, I was thinking that rtgpoll daemon was stuck. rtg project has no activity for a long time and this was normal assumption due its old and unsupported code. My next step was to search for a logged strings inside rtg's source tree. Unfortunately I did not find them inside the rtg's source tree. Well I found the searched strings inside libsnmp's source tree. === snip === rtg:/home/lisp/work/c/net-snmp-5.4.1~dfsg# egrep -r 'truncating signed value to 32 bits' . ./snmplib/asn1.c: snmp_log(LOG_ERR,"truncating signed value to 32 bits (%d)\n",y); \ ./man/netsnmp_asn1_packet_parse.3: snmp_log(LOG_ERR,'truncating signed value to 32 bits (%d)\n',y); \ rtg:/home/lisp/work/c/net-snmp-5.4.1~dfsg# === snip === I'm not so familiar with SNMP protocol internals, more I'm a regular C API user :). Due to my understanding CHECK_OVERFLOW_S macros make a integer underflow/overflow check. Is that right? Further more I'm searching for a possible explanation of such a strange behavior. As I mentioned in message subject Debian is virutalized. If this was a normal physical machine, my first assumption would be, that it comes to a memory corruption problem. But inside virtual environment somebody else is taking care of machine memory. Next thing I was thinking about, was the network stack. I.e. is it possible malformed snmp packages to crash libsnmp in that way ? And are there any tools inside the project, which generate such a packages? Exact data about my virtualized Debian machine is as follows: === snip === rtg:/home/lisp/work/c# cat /etc/debian_version 5.0.5 rtg:/home/lisp/work/c# uname -a Linux rtg 2.6.26-2-amd64 #1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64 GNU/Linux rtg:/home/lisp/work/c# file /usr/lib/libsnmp.so.15.1.0 /usr/lib/libsnmp.so.15.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped rtg:/home/lisp/work/c# dpkg -l | grep libsnmp ii libsnmp-base 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) MIBs and documentati ii libsnmp-dev 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) development files ii libsnmp-perl 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) Perl5 support ii libsnmp-session-perl 1.12-1 Perl support for accessing SNMP-aware devices ii libsnmp15 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) library === snip === Debian is running inside vmware's vsphere virtualization envrionment. I did not find any strange message inside Debian's syslog or messages files. Any ideas, thoughts, suggestions how to debug/explain the issue will be appreciated! Thank you. Regards, Hristo ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
