Bug 123924 - pass-through scripts don't execute properly
pass-through scripts don't execute properly
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-21 14:57 EDT by Douglas E. Warner
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-21 05:31:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log of executed snmpwalks (1.32 KB, text/plain)
2004-05-21 14:58 EDT, Douglas E. Warner
no flags Details
passtest script modified to execute an external command (1.14 KB, text/plain)
2004-05-21 14:59 EDT, Douglas E. Warner
no flags Details

  None (edit)
Description Douglas E. Warner 2004-05-21 14:57:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040211 Firefox/0.8

Description of problem:
It seems that passthrough scripts that execute other programs to get
data to return have a higher chance of failing (much higher, in some
cases) than scripts that don't.
For example, the test passthrough script that comes with net-snmp
5.1.1 works most of the time (not always), but when I modify the
script to execute a 'find' in the middle, it will sometimes (randomly)
die there.  If the script's first oid's output is the result of an
external command, often snmpwalk will return "No Such Object available
on this agent at this OID".  This behavior is not experienced under a
tarball install of  net-snmp 5.0.9 on FC2, but is still observed with
a tarball install of net-snmp 5.1.1 on FC2, thus I suspect the problem
is within net-snmp itself.
I've attached the output from snmpwalks against my modified passtest
script, as well as the modified passtest script itself.


Version-Release number of selected component (if applicable):
net-snmp-5.1.1-2

How reproducible:
Sometimes

Steps to Reproduce:
1. write a pass-through script that executes other programs to gather
the data it reports
2. snmpwalk or snmpget the oid that uses your pass-through script
3. watch it work some of the times, but not others.
    

Additional info:
Comment 1 Douglas E. Warner 2004-05-21 14:58:34 EDT
Created attachment 100430 [details]
Log of executed snmpwalks
Comment 2 Douglas E. Warner 2004-05-21 14:59:03 EDT
Created attachment 100431 [details]
passtest script modified to execute an external command
Comment 3 Douglas E. Warner 2004-05-22 18:23:42 EDT
Comment on attachment 100430 [details]
Log of executed snmpwalks

>[dwarner@webcode tmp]$ snmpwalk -v2c -c public server .1.3.6.1.4.1.2021.255
>UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
>UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
>UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
>UCD-SNMP-MIB::ucdavis.255.2.3 = INTEGER: 19
>UCD-SNMP-MIB::ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42.00
>UCD-SNMP-MIB::ucdavis.255.4 = IpAddress: 127.0.0.1
>UCD-SNMP-MIB::ucdavis.255.5 = Counter32: 42
>UCD-SNMP-MIB::ucdavis.255.6 = Gauge32: 42
>[dwarner@webcode tmp]$ snmpwalk -v2c -c public server .1.3.6.1.4.1.2021.255
>UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
>UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
>UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
>[dwarner@webcode tmp]$ snmpwalk -v2c -c public server .1.3.6.1.4.1.2021.255
>UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
>UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
>UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
>UCD-SNMP-MIB::ucdavis.255.2.3 = INTEGER: 19
>UCD-SNMP-MIB::ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42.00
>UCD-SNMP-MIB::ucdavis.255.4 = IpAddress: 127.0.0.1
>UCD-SNMP-MIB::ucdavis.255.5 = Counter32: 42
>UCD-SNMP-MIB::ucdavis.255.6 = Gauge32: 42
>
Comment 4 Phil Knirsch 2004-05-26 09:08:32 EDT
Hm, i've been trying to reproduce the problem you reported, but
couldn't reproduce it at all even after a couple of thousand runs of
the snmpwalk request.

Is your machine under load when you try this? How fast is the machine?

Read ya, Phil
Comment 5 Douglas E. Warner 2004-05-26 09:42:54 EDT
Machine is not under load at all; it's not the fastest box either; but
the passthrough stuff all works under 5.0.9 compiled from source on FC2. 
Are there new resource or process time limits on passthrough scripts
in Net-SNMP 5.1.1?
The computers I've been testing on are new installs of FC2 using a
kickstart file we built.

CPU: P2 350MHZ
Load Avg: 0.04, 0.01, 0.00

Just testing, I've been getting failures almost every time:

[dwarner@webcode dwarner]$ snmpwalk -v2c -c public server
.1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
[dwarner@webcode dwarner]$ snmpwalk -v2c -c public server
.1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
[dwarner@webcode dwarner]$ snmpwalk -v2c -c public server
.1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
[dwarner@webcode dwarner]$ snmpwalk -v2c -c public server
.1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
[dwarner@webcode dwarner]$ snmpwalk -v2c -c public server
.1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255.1 = STRING: "life the universe and everything"
UCD-SNMP-MIB::ucdavis.255.2.1 = INTEGER: 42
UCD-SNMP-MIB::ucdavis.255.2.2 = OID: SNMPv2-SMI::private.42.42.42
UCD-SNMP-MIB::ucdavis.255.2.3 = INTEGER: 21
UCD-SNMP-MIB::ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42.00
UCD-SNMP-MIB::ucdavis.255.4 = IpAddress: 127.0.0.1
UCD-SNMP-MIB::ucdavis.255.5 = Counter32: 42
UCD-SNMP-MIB::ucdavis.255.6 = Gauge32: 42
Comment 6 Michael J. Slifcak 2004-09-15 21:54:16 EDT
There were several issues with ssize_t in the passthrough code,
which were expected to be fixed as of net-snmp-5.1.2.
Please try net-snmp-5.1.2-4 or later.
Comment 7 Douglas E. Warner 2004-09-18 11:44:18 EDT
Using net-snmp-5.1.2-6 I was unable to duplicate the problem (that is
to say, it seems to work as expected).  It also seems that it fixed
bug#119688 for me as well (although I hadn't reported on it, I had
noticed the problem with the 2.6 kernel series).
Thanks for your efforts.

-Doug

Note You need to log in before you can comment on or make changes to this bug.