Opened 6 years ago

Last modified 6 years ago

#12232 new Bugs

boost::interprocess::intermodule_singleton initialization failed in Windows 2012 Server

Reported by: rafael.bronzeri@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

Hi,

I've got the following exception from Boost Interprocess using Windows 2012 Server: "boost::interprocess::intermodule_singleton initialization".

I've tried to fix it removing SharedMemory and Shared variables previously created, but it doesn't work. The only solution for it is restarting the server.

The expcetion happens using this code:

Removing previously created

boost::interprocess::named_mutex::remove("TEST.SHARED.MEMORY0000002.MTX1.0.000000000000000000000000009"); if (mtx1 != nullptr) {

delete mtx1; mtx1 = nullptr;

}

boost::interprocess::named_condition::remove("TEST.SHARED.MEMORY0000004.NMC1.0.000000000000000000000000050")); if (condition1 != nullptr) {

delete condition1; condition1 = nullptr;

}

boost::interprocess::shared_memory_object::remove("TEST.SHARED.MEMORY0000001.XXX.0.000000000000000000000000021"); if (shmObj1 != nullptr) {

delete shmObj1; shmObj1 = nullptr;

}

Creating SharedMemory boost::interprocess::permissions shared_memory_Perm; shared_memory_Perm.set_unrestricted(); boost::interprocess::managed_shared_memory shmObj1 = new boost::interprocess::managed_shared_memory

(boost::interprocess::create_only_t(), "TEST.SHARED.MEMORY0000001.XXX.0.000000000000000000000000021", 42768, static_cast<const void*>(NULL), shared_memory_Perm );

boost::interprocess::named_mutex* mtx1 = new boost::interprocess::named_mutex(boost::interprocess::create_only_t(), "TEST.SHARED.MEMORY0000002.MTX1.0.000000000000000000000000009"); boost::interprocess::named_condition* condition1 = new boost::interprocess::named_condition(boost::interprocess::create_only_t(), "TEST.SHARED.MEMORY0000004.NMC1.0.000000000000000000000000050");

Please, I need some help to fix this problem. Is there any solution without restaring the server for it?

Thanks!

Change History (2)

comment:1 by anonymous, 6 years ago

This problem occurs sometimes and it is very hard to reproduce, but when happens the only solution, that I've found, is restarting the server (reboot).

Note: See TracTickets for help on using tickets.