Ticket #4039 (closed Bugs: fixed)

Opened 7 years ago

Last modified 7 years ago

interprocess named_mutex does not survive hibernate

Reported by: Jan Stetka <jan.stetka@…> Owned by: igaztanaga
Milestone: Boost 1.45.0 Component: interprocess
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:


The named mutex is created before the hibernate, then opened after the hibernate, when I was debugging, the debugger would go back to another thread when opening the mutex.

windows xp visual c++ 2003 standard


interprocess test.cpp Download (671 bytes) - added by jan.stetka@… 7 years ago.

Change History

comment:1 Changed 7 years ago by igaztanaga

Could you specify a bit more the error? The mutex can't be opened after the hibernation? The mutex disappears?

comment:2 Changed 7 years ago by Jan Stetka <jan.stetka@…>

I've put try...catch around the mutex too as it may be throwing an exception and that's why it was going back to the other thread, although I didn't look in the debug output. Will test it in a standalone program tonight.

comment:3 Changed 7 years ago by anonymous

#define BOOST_DATE_TIME_NO_LIB #include "boost\interprocess\sync\named_mutex.hpp" #include <string> #include <iostream>

using namespace boost::interprocess; using namespace std;

int main(int argc, char argv[]) {

try {

named_mutex nm(create_only,"testmtx");


catch(interprocess_exception &ex){

cout<< ex.what() <<endl;


string s; cin>> s; pause to allow hibernation try{ named_mutex nm(open_only,"testmtx"); }

catch(interprocess_exception &ex){

cout<< ex.what() <<endl; The system cannot find the file specified.


return 0;


Changed 7 years ago by jan.stetka@…

comment:4 Changed 7 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Boost 1.43.0 to Boost-1.45.0

Fixed for Boost 1.45 in release branch


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.