Title: Message
Hi Dave,
 
GET-NEXT on last scalar object resulting in a loop is solved when SNMP_ERR_GENERR is passed to netsnmp_set_request_error() api
for the tables instead of SNMP_NOSUCHINSTANCE. Net-snmp library called the table handlers in the correct order without any loop.
This works fine if the request contains only one varbind.
 
However, we observed that if request contains multiple varbinds and if one of them is last scalar object as mentioned in our MIB,
again subagent goes to the loop.
 
Our test mib contains the following MIB objects (all these objects are childs of a common parent as mentioned below).
 
1. Scalars Group (contains seven objects) =============>registered with NET-SNMP Library using scalar_group (netsnmp_register_scalar_group())helper
2. TableOne (three columns, but no rows created) =====>registered with NET-SNMP Library using table.c (netsnmp_register_table()) helper
3. TableTwo (three columns, but no rows created) =====>                                    ----- do -----
4. TableThree (three columns, but no rows created) =====>                                  ----- do -----
5. TableFour (three columns, but no rows created) =====>                                   ----- do -----
6. TableFive (three columns, but no rows created) =====>                                    ----- do -----
7. TableSix (three columns, but TWO rows created) =====>                                    ----- do -----
 
Scalar Group contains 7th object as a not accessible object. When SNMP GETNEXT request is given with 6th and 7th varbinds, we observed the following AgentX requests exchanged between agent and subagent and the error code returned in the response.
 
                Request from Agent                                           Response form SubAgent
RequestId              OIDs                                     Error Status                            Error Index
=================================================================================
    698            scalars.6.0, scalars.7.0                SNMP_ERR_NOACCESS                 1
    699            scalars.7.0                                  SNMP_ERR_GENERR                      1
    700            tableone, scalars.7.0                    SNMP_ERR_GENERR                      1
    701            tabletwo, scalars.7.0                    SNMP_ERR_GENERR                      1
    702            tabletthree, scalars.7.0                 SNMP_ERR_GENERR                      1
    703            tablefour, scalars.7.0                    SNMP_ERR_GENERR                      1
    704            tablefive, scalars.7.0                     SNMP_ERR_GENERR                      1
    705            tablesix, scalars.7.0                     SNMP_ERR_NOERR                         2
------------------------------------------------------------------------------------------------------------------------------------
    706            tableone                                      SNMP_ERR_GENERR                       1
    707            tableone                                      SNMP_ERR_GENERR                       1
    708            tableone                                      SNMP_ERR_GENERR                       1
    709            tableone                                      SNMP_ERR_GENERR                       1
 
                    This runs in infinite loop.....!
 
I have the following doubts abt this.
 
1. The request with Id 699 contains only one varbind. why is it so..?
2. Why does every request starting from RequestId, 700 to 705 contains scalars.7.0 as 2nd OID.?
3. Why is the loop of requests for get-next on tableone from request with Id 706..?
 
Any information on this can be greatly appreciated. 
 
Thanks,
suresh.
   
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurapati M-G19456
Sent: Friday, May 13, 2005 6:35 PM
To: net-snmp-users@lists.sourceforge.net
Subject: GETNEXT looping problem

We are using NET-SNMP 5. 1. 1.
 
Our test mib contains the following MIB objects.
 
1. Scalars Group (contains five objects) =============>registered with NET-SNMP Library using scalar_group (netsnmp_register_scalar_group())helper
2. TableOne (three columns, but no rows created) =====>registered with NET-SNMP Library using table.c (netsnmp_register_table()) helper
3. TableTwo (three columns, but no rows created) =====>                                    ----- do -----
4. TableThree (three columns, but no rows created) =====>                                  ----- do -----
5. TableFour (three columns, but no rows created) =====>                                   ----- do -----
6. TableFive (three columns, Two rows created) =====>                                       ----- do -----
 
We are observing following misbehaviors.
 
1. GETNEXT on the last scalar object:
    NET-SNMP Library calls the table handlers in the following order.
 
    a. getnext on table-one (our application returns SNMP_NOSUCHINSTANCE)
    b. getnext on table-two (our application returns SNMP_NOSUCHINSTANCE)
    c. getnext on table-three (our application returns SNMP_NOSUCHINSTANCE)
    d. getnext on table-two (our application returns SNMP_NOSUCHINSTANCE)
    e. getnext on table-three (our application returns SNMP_NOSUCHINSTANCE)
    f. getnext on table-three (our application returns SNMP_NOSUCHINSTANCE)
    g. getnext on table-four (our application returns SNMP_NOSUCHINSTANCE)
    h. getnext on table-five (our application returns valid values)
 
We are not able to understand, the iterations c-->d, d--->e, and e-->f.  Did anybody face this kind of problem?  When we searched in the mail archives, we found a message about infinite loop in getnext processing.  But, that was way back in 2001.  Are we missing something?  Any light on this issue will be greatly appreciated.
 
2. GETNEXT on the non-existing scalar object
    Above behavior repeats in infinite loop.
 
 
Please help us.
 
Thanks
Mahesh
 

Reply via email to