[ace-users] Files created for USYNC_PROCESS mutexes

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Mon Sep 10 14:28:59 CDT 2007

Hi Nathan,

   Can you please be more specific about which operating systems
you're seeing this on, e.g., does Windows behave the same way as the
UNIX platforms, do all the UNIX platforms have the same problem, etc.?
My guess is that you're simply seeing a consequence of the way in
which process-level locks are implemented on some platforms, but it
would be helpful if you could provide more info.



>We are using a couple of named ACE_Mutex objects of type
>run on Windows, Redhat Linux ES/AS 3.0+, and Solaris 9+. On Linux and
>we see the following. The mutexes are statically initialized, but that
>not seem to make any difference to the symptoms described below.
>When a process using the mutexes is running, there are always files
>names matching the names of the mutexes that appear in the current
>where the process was run. The fact that there are files is bad enough
>on its own.
>If the process is terminated abnormally, e.g. ^C, segmentation fault,
>some other signal, then this files are left lying around. Also bad.
>Depending on the state of the program and the mutexes at the time of
>the abnormal termination, the existence of the files may prevent the
>from ever being acquirable again until the files are removed by hand.
>We are using ACE 5.5.1, but this behavior has been around for a long,
>We use these mutexes to ensure that certain initialization code is run
>only once, no matter how many processes may attempt to invoke it at
>Is this a bug or a feature? Is there a different synchronization
>I can use between processes that will not behave in this fashion?
>Here is a very short sample to illustrate the symptom:
>#include "ace/ACE.h"
>#include "ace/Mutex.h"
>    ACE_Mutex foo_mutex(USYNC_PROCESS, "test_mut");
>    printf("Hit return to continue\n");
>    getchar();
>If you ^C the program, the test_mut file will remain.
>                                Thanks,
>                                Nathan

Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu

More information about the Ace-users mailing list