[ace-users] ACE_Sempahore problem

Sowayan, Abdullah (N-DUA) abdullah.sowayan at lmco.com
Thu Sep 27 13:24:20 CDT 2007


Hi,

I tried Lastiri program, it works well on my Fedora Core 5 with NPTL enabled. 

Lastiri, did disabling NPTL flag help you?

Thanks,
Abdul

> -----Original Message-----
> From: Johnny Willemsen [mailto:jwillemsen at remedy.nl]
> Sent: Thursday, September 27, 2007 2:14 PM
> To: Sowayan, Abdullah (N-DUA)
> Cc: Johnny Willemsen; Julián Lastiri; ace-users at cse.wustl.edu
> Subject: RE: [ace-users] ACE_Sempahore problem
> 
> Hi,
> 
> > Yes, we do have Semaphores initialized to 0, this may be the problem
> we're
> > facing as well. I'll try it out and let you know.
> 
> Ok, if you could first extend the ACE regression test (test also other
> values then 0) to reproduce we can at least make this visible on the
> scoreboard.
> 
> Johnny
> 
> >
> > Thanks,
> > Abdul
> >
> > ________________________________________
> > From: Johnny Willemsen [mailto:jwillemsen at remedy.nl]
> > Sent: Thursday, September 27, 2007 12:21 PM
> > To: 'Julián Lastiri'; ace-users at cse.wustl.edu
> > Cc: Sowayan, Abdullah (N-DUA)
> > Subject: RE: [ace-users] ACE_Sempahore problem
> >
> > Hi,
> >
> > Thanks for using the PRF form. This seems the problem that Abdul
> reported
> > earlier. As workaround edit
> include/makeinclude/platform_linux_common.GNU
> > and comment out the next line:
> >     CPPFLAGS += -DACE_HAS_LINUX_NPTL
> >
> > Can you file this in bugzilla so that it doesn't get lost (see
> > )http://deuce.doc.wustl.edu/bugzilla/index.cgi)
> >
> > Regards,
> >
> > Johnny Willemsen
> > Remedy IT
> > Postbus 101
> > 2650 AC  Berkel en Rodenrijs
> > The Netherlands
> > www.theaceorb.nl / www.remedy.nl
> >
> > *** Integrated compile and test statistics see
> > http://scoreboard.theaceorb.nl ***
> > *** Commercial service and support for ACE/TAO/CIAO             ***
> > *** See http://www.theaceorb.nl/en/support.html                 ***
> >
> > ________________________________________
> > From: ace-users-bounces at cse.wustl.edu
> > [mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of Julián Lastiri
> > Sent: Thursday, September 27, 2007 6:00 PM
> > To: ace-users at cse.wustl.edu
> > Subject: [ace-users] ACE_Sempahore problem
> >
> >     ACE VERSION: 5.6.1
> >
> >     HOST MACHINE and OPERATING SYSTEM:
> >
> > Intel X86 32bits. Ubuntu 7.04, kernel 2.6.20-16-generic #2 SMP Sun Sep
> 23
> > 19:50:39 UTC 2007 i686 GNU/Linux
> >
> >     TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
> >     COMPILER NAME AND VERSION (AND PATCHLEVEL):
> >
> > Same as HOST
> >
> >     THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
> >     specific file, simply state which one]:
> >
> > config.h
> > #define ACE_HAS_TIMED_MESSAGE_BLOCKS
> > #include "ace/config-linux.h"
> >
> >     THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
> >     use a link to a platform-specific file, simply state which one
> >     (unless this isn't used in this case, e.g., with Microsoft Visual
> >     C++)]:
> >
> > $ACE_ROOT/include/makeinclude/platform_macros.GNU
> > include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
> >
> >     CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
> >     (used by MPC when you generate your own makefiles):
> >
> >     AREA/CLASS/EXAMPLE AFFECTED:
> > [What example failed?  What module failed to compile?]
> >
> >     DOES THE PROBLEM AFFECT:
> >         COMPILATION?
> > NO
> >         LINKING?
> > NO
> >         EXECUTION?
> > YES
> >
> >     SYNOPSIS:
> > ACE_Semaphore acquire with initial count=0 doesn't block
> >
> >     DESCRIPTION:
> > I'm using ACE_Semaphore initialized with count=0 and when i call acquire
> > it doesn't block
> >
> >
> >     REPEAT BY:
> >
> > test.cpp
> > #include <ace/Semaphore.h>
> > #include <ace/Log_Msg.h>
> > int main(){
> >         ACE_Semaphore semaphore( 0 ) ;
> >         semaphore.acquire() ;
> >         ACE_DEBUG (( LM_DEBUG, "BUG !\n" )) ;
> >         return 0 ;
> > }
> >
> > compiled
> > g++ test.cpp -o test -lACE
> >
> > this example works fine on ACE 5.5.10 with same config.h and
> > platform_macros.GNU
> >
> >     SAMPLE FIX/WORKAROUND:
> >
> > g++ test.cpp -D ACE_HAS_POSIX_SEM -o test -lACE
> >
> >
> 



More information about the Ace-users mailing list