  | |  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.
|
|
 |