[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-899989 ] 5.1 agent dies during perl-induced bulkwalk
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2004-02-29 13:59:50
Message-ID: E1AxRTy-0002pl-00 () sc8-sf-web3 ! sourceforge ! net
[Download RAW message or body]

Bugs item #899989, was opened at 2004-02-18 19:12
Message generated for change (Comment added) made by alex_b
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=899989&group_id=12694

Category: agent
Group: None
Status: Closed
Resolution: Fixed
Priority: 8
Submitted By: Michael J. Slifcak (slif)
Assigned to: Wes Hardaker (hardaker)
Summary: 5.1 agent dies during perl-induced bulkwalk

Initial Comment:
as recent as 5.1.1-pre1  built on Win32 using MSVC++6.0

with patch #898464 applied
with patch-win32-perl-make-test5 applied
   (see alex@fragit.net for location)
Using ActiveState Perl 5.8.2

Problem:  agent can be crashed on Win32 when
a GETBULK request is received which has no repeaters in
the varbind,
but the request specifies a non-zero repeaters value.

If the SECOND argument to s1->bulkwalk is 0, no problem.
Setting the value to 1, 2, or leaving the original
value of 16,
  crashes the agent on Win32.
If the value is 1 or 2, the agent was seen to crash on
Windows XP
only when the system was not idle, for instance, if
resources
were used to compile another program.



Review this code from perl/SNMP/t/bulkwalk.t:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Attempt to use the bulkwalk method to get only
non-repeaters
# test 2
$vars = new SNMP::VarList ( [&#039;sysUpTime&#039;], [&#039;ifNumber&#039;]
); # NON-repeaters

$expect = scalar @$vars;
@list = $s1->bulkwalk(2, 16, $vars);
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Line 446 in agent/snmp_agent.c reveals an
illegal value for asp->bulkcache[i]



----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-02-29 08:59

Message:
Logged In: YES 
user_id=85836

snmp_agent.c was modified (by Wes) to fix the problem:

Added to _reorder_getbulk:

/* we do nothing if there is nothing repeated */
if (r == 0)
return;

Changed in netsnmp_create_subtree_cache:

if ((r = count - n) < 0) {
 changed to:
if ((r = count - n) <= 0) {

Perl workaround (win32-perl-bulkwalk.patch) was not applied.


----------------------------------------------------------------------

Comment By: Wes Hardaker (hardaker)
Date: 2004-02-28 01:42

Message:
Logged In: YES 
user_id=76242

Thanks for the bug report!  We've fixed the problem in the
5.1.x code branch and the main development tree,
so it should be fixed in future releases of the net-snmp package.

----------------------------------------------------------------------

Comment By: Michael J. Slifcak (slif)
Date: 2004-02-24 16:19

Message:
Logged In: YES 
user_id=88697

apply the win32-perl-bulkwalk.patch in order to avoid this
problem on Win32.



----------------------------------------------------------------------

Comment By: Michael J. Slifcak (slif)
Date: 2004-02-19 20:37

Message:
Logged In: YES 
user_id=88697

another bug #655267 may be related.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=899989&group_id=12694


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic