Opened 13 years ago
Closed 13 years ago
#3754 closed Bugs (invalid)
Multithread problem in Named Mutexes
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | interprocess |
Version: | Boost 1.40.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
I was developing a test for named_mutex and the program began to close unexpectedly. The situation occurred with multiple threads simultaneously trying to create named_mutex objects. Investigating the problem more deeply I have identified that the builder tries to create the named_mutex control file (in file "/ boost_1_40_0/boost/interprocess/detail/managed_open_or_create_impl.hpp" line 264) and if the control file already exists an exception occurs, which ultimately call the operating system (FormatMessageA the file "/ boost_1_40_0/boost/interprocess/detail/win32_api.hpp" line 471) and the program quits after calling this function. This problem only occurs with multiple threads creating named_mutexes simultaneously, and I believe it is because this function OS is not multi-threaded safe.
Change History (1)
comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Severity: | Showstopper → Not Applicable |
Status: | new → closed |
I tried to correct the problem by using a anonymous mutex but I realized later that the problem did not occur anymore. I could no longer reproduce the problem. Maybe it was a problem specific to my machine, and a boot has resolved. I apologize for everything.