i don't have an answer for this, but i have more data.

-i've replicated the issue under perl-5.8.3/net-snmp-5.0.9 and perl-5.8.5/net-snmp-5.1.2.rc2

-and i find that if replace the SNMP.pm bulkwalk method with the command-line snmpbulkwalk command, that the issue goes away:

guru> cat test-cmd
#!/opt/vdops/bin/perl

use strict;
use warnings;
use Data::Dumper;
use SNMP;

my $obj = "sysDescr";
my $read = "public";
my ($sess, $val, $vb);

my %esx = (     "10.10.22.8" => "b2-esx",
                "10.10.16.8" => "a1-esx",
                "10.10.18.8" => "a2-esx",
                "10.10.20.8" => "a3-esx",
           );

for my $addr (keys %esx) {
print "Processing $addr\n";
$val = `/opt/local/bin/snmpbulkwalk -c $read $addr $obj`;
print Dumper($val);
}
guru> ./test-cmd
Processing 10.10.18.8
$VAR1 = 'RFC1213-MIB::sysDescr.0 = STRING: "Cisco Systems, Inc. WS-C4006.Cisco Catalyst Operating System Software, Version 7.6(7).Copyright (c) 1995-2004
by Cisco Systems, Inc.."
';
Processing 10.10.22.8
$VAR1 = 'RFC1213-MIB::sysDescr.0 = STRING: "Cisco Systems, Inc. WS-C4006.Cisco Catalyst Operating System Software, Version 7.6(7).Copyright (c) 1995-2004 by Cisco Systems, Inc.."
';
Processing 10.10.20.8
$VAR1 = 'RFC1213-MIB::sysDescr.0 = STRING: "Cisco Systems, Inc. WS-C4006.Cisco Catalyst Operating System Software, Version 7.6(7).Copyright (c) 1995-2004 by Cisco Systems, Inc.."
';
Processing 10.10.16.8
$VAR1 = 'RFC1213-MIB::sysDescr.0 = STRING: "Cisco Systems, Inc. WS-C4006.Cisco Catalyst Operating System Software, Version 7.6(7).Copyright (c) 1995-2004 by Cisco Systems, Inc.."
';
guru>



i would really like this to work ... i'm in the middle of a big project, and this issue has me stumped. if you can think of a way for me to analyze the issue further, please drop me a line.


--sk

stuart kendrick
fhcrc

Re:  Date: Wed, 4 Aug 2004 08:36:42 -0700 (PDT)
From: Stuart Kendrick <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Use of freed value in iteration

hi folks,

i'm not sure if this is a comp.perl.lang.misc question or net-snmp SNMP.pm
question ...

the first thing i don't understand is why the first $val, the one for
140.107.18.5, has the contents of %esx screwed into it ... this doesn't
make sense to me.  the output of Data::Dumper for the second $val, the one
for 140.107.22.5, now that makes sense to me.

and the second thing i don't understand is why Perl bombs with 'Use of
freed value in iteration' ... i don't see where i'm modifying the contents
of %esx in my loop.
[...]



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to