Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Installation - Getting started with Red Hat Linux
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
SNMP Perl script hangs when receiving a SNMP response with bad
   checksum.

SNMP Perl script hangs when receiving a SNMP response with bad
   checksum.

2005-02-04       - By Marc Wiatrowski

 Back
Hello,

Tried posting this on the net-snmp list, but haven't gotten anywhere...

I have encountered an issue where a Perl script will just hang on my Enterprise
3 U4
kernel 2.4.21-27.ELsmp box but from the same network a Redhat 7.3 box it runs
just fine.  

I am running net-snmp version 5.1.2 on the RH7.3 box and was running 5.1.2 on
the
Enterprise box as well until upgrading to 5.2.1 to see if that did anything.
(No change)

Also got the redhat 7.3 src rpm for perl 5.6.1 installed on the Enterprise box
and
that didn't help ether.  Still hangs the script.

The script is exactly the same on both boxes. Here is the code that does the
connection and
the "get" which is looped on thousands of addresses.

--
my $sess2 = new SNMP::Session(DestHost => $data->{ip}, Community => $conf->
{comm},
UseSprintValue => 1, UseLongNames => 1, UseNumeric => 1, Timeout => 100000,
Retries => 2);

$SNMP::debugging = 3 if ($opt_debug > 3);

print "Made Connection\n"  if ($opt_debug > 2);
my $vars = new SNMP::VarList(['.1.3.6.1.4.1.1782.2.3.4.3', 0], ['.1.3.6.1.4.1
.1782.2.3.5.1',
0],['.1.3.6.1.4.1.1782.2.3.3.1', 0], ['.1.3.6.1.4.1.1782.2.3.3.4', 0]);

print "Set OIDs\n" if ($opt_debug > 2);
my @(protected) = $sess2->get($vars);
print "Did get\n" if ($opt_debug > 2);
--

With tcpdump, what we think we have traced the problem down to is a corrupted
packet in the
snmp reply.  The end of the packet is corrupted. It looks like the end of the
packet is
corrupted.
At best there is always a bad checksum.  Its not always the same address it
hangs on as the
corrupted packets are not always returned from the same address.

On the RH7.3, when we get the bad packet twice from the 2 reties (and they are
both bad) the
script goes on to the next address.  On the RH Enterprise box the script hangs
right after the
second bad "get".  We have tcpdumps that show the issue if it helps.

Any suggestions on tracing down the issue or working around it.

Thanks for reading,
marc


--
Taroon-list mailing list
Taroon-list@(protected)
http://www.redhat.com/mailman/listinfo/taroon-list

Earn $52 per hosting referral at Lunarpages.