[AGENT++] AgentX++ suagent commiterror let the RowStatus in detroy(6); the row is block forever!

Claus Klein claus.klein at arcormail.de
Thu Nov 4 23:45:18 CET 2010


On 03.11.2010, at 23:23, Frank Fock wrote:

> Hi Claus,
>
> I have not (re)tested the NET-SNMP master agent within the last year.
> The years before, the master agent had several bugs regarding
> index allocation, context support, and region registration.

I know, but there is also a Bug at the agentpp site:
I run in deadlocks with my tests, and the reason is the missing  
cleanup request!
(The net-snmp agentx master does not like to receive the deregister  
request before see the commit response)

That deadlock in that situation must be prevented on the agentX++ site.
The master close the session, but the client does wait forever.

I append a log for you.

>
> The if_mib.cpp implementation allocates its indexes using the
> any_index() method. You will find comments that illustrate
> the processing.
>
> I am currently extending the agentppTestSharedTable example,
> in order to support effective 2-phase-commit row operations
> with a shared table.
>
> That example will be part of AGENT++ 3.6 which is scheduled
> for release in December 2010.
>
> To simplify testing, maybe you should switch to the AgentX++
> master?
>
> If you need to allocate indexes (for example, because they
> cannot be clustered by subagents by other means), you should
> simply call AgentXSharedTable->allocate_index(..) instead
> ->add_row(..). Alternatively, ->any_index() or ->new_index().
>
> If your shared tables have a RowStatus object, you will have
> a problem as described in my previous email. If that is the
> case, you should raise a JIRA support issue and attach the
> MIB specifications of the shared tables and a description
> why those tables need to be shared between subagents.
> I can then put together a recommendation to solve the
> problem.
>

Hi Frank,
you are right, it is not possible to use RowStatus to create a row  
within a real shared table!

But still there is a problem about the handling.

The default while code generation is AgentXSharedTable.
And if the Table has a rowStatus, the index is not allocated, but  
deallocated while creation with RowStatus.
At leased, that should be prevented in generated code, or not?
i.e.:

         //--AgentGen BEGIN=netSnmpHostsEntry::is_transition_ok
         if(requestedStatus != rowDestroy)	// prevent creation! ck
         {
             std::cerr << "XXX netSnmpHostsEntry::is_transition_ok("  
<< currentStatus << " -> "
                       << requestedStatus << ") This is not allowed!"  
<< std::endl;
             return SNMP_ERROR_INCONSIST_VAL;
         }
         //--AgentGen END



And last but not leased, the net-snmp does response this deallocte  
request  with an error, which is correct!

With regards,
Claus

-------------- next part --------------





More information about the AGENTPP mailing list