Problems with upgrading from agent++3.5.1a to agent++3.5.5b

Frank Fock Frank.Fock____t-online.de
Wed Sep 4 19:02:39 CEST 2002


Hi Kjersti,

Below are the diffs between v3.5.5 and v3.5.5b of
mib.cpp. These changes should fix the race conditions
occuring when modifying tables from within instrumentation
methods.

Best regards,
Frank

1726,1728c1726,1732
<       MibLeaf* l = find_next(o);
<       if (l) return l->get_oid();
<       return Oidx();
---
 >         ThreadSynchronize s(*this); {
 >               MibLeaf* l = find_next(o);
 >               if (l) {
 >                       return l->get_oid();
 >               }
 >               return Oidx();
 >       }
2969,2971c2973,2983
<                 while (((leaf = ((MibTable*)entry)->find_next(oid)) != 
0) &&
<                        (leaf->get_access() == NOACCESS)) {
<                       oid = leaf->get_oid();
---
 >                 {
 >                       // lock against other threads accessing
 >                       // entry
 >                     ThreadSynchronize sync(*entry);
 >                     while (((leaf =
 >                              ((MibTable*)entry)->find_next(oid)) != 0) &&
 >                            (leaf->get_access() == NOACCESS)) {
 >                         oid = leaf->get_oid();
 >                     }
 >                     if (!leaf) return VACM_notInView;
 >                     oid = leaf->get_oid();
2973,2974d2984
<                 if (!leaf) return VACM_notInView;
<                 oid = leaf->get_oid();


Kjersti Grønnevik wrote:
> Hi Frank,
> 
> I'm not panicing quite yet..  :-) 
> 
> It might seem like it has something to do with my linking, I do not know how, what or why...
> Anyway, we can not go throuh another system test (which we must if I upgrade the agent++ code).
> 
> So I have to stick with the old version and try to find out why the agent crashes without major code changes.
> 
> If you do have any suggestions please tell, otherwise thanks so much for great help and guidence!
> 
> Best regards,
> Kjersti Grønnevik
> 
> 
> 
> -----Original Message-----
> From: Frank Fock [mailto:Frank.Fock____t-online.de]
> Sent: 4. september 2002 15:16
> To: Kjersti Grønnevik
> Cc: agentpp-dl____agentpp.com
> Subject: Re: Problems with upgrading from agent++3.5.1a to agent++3.5.5b
> 
> 
> Hi Kjersti,
> 
> Don't panik ;-)
> 
> The class Synchronized is defined in threads.h and
> implemented in threads.cpp. Are you sure that you
> rebuild anything and that you are using the latest
> library files (replaced shared libs etc.)?
> 
> I am quite sure that the latest SNMP++ and AGENT++
> are compilable/linkable.
> 
> Best regards,
> Frank
> 
> Kjersti Grønnevik wrote:
> 
>>Hi
>>
>>After I have done the make lib files and recompiled the code I get these failures:
>>
>>.../agent++/src/threads.cpp:120: undefined reference to 'Synchronized::unlock(void)'
>>.../agent++/src/threads.cpp:122: undefined reference to 'Synchronized::~Synchronized(void)'
>>.../agent++/src/threads.cpp:130: ...
>>.../agent++/src/threads.cpp:140: ...
>>.../agent++/src/threads.cpp:150: ...
>>.../agent++/src/threads.cpp:160: ...
>>.../agent++/src/../include/List.h:104: undefined reference to 'Synchronized::Synchronized(void)'
>>.../agent++/src/../include/List.h:104: undefined reference to 'Synchronized::~Synchronized(void)'     
>>
>>
>>I find the Synchronized class in the libsnmp.a and in the reentrant.o...
>>
>>What can cause this?
>>If anyone have suggestions or answers, please let me know! 
>>It's crisis if I can't get the agent finished by friday ( deadline friday morning... )...
>>
>>Thanks in advance!
>>
>>Best regards,
>>Kjersti Grønnevik
>>
>>
>>
> 
> 
> 
> 
> 






More information about the AGENTPP mailing list