Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] hang locking p_hdr->m_mutex
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-08-19 19:43:09


El 20/08/2011 0:54, David Byron escribió:
> I've got my machine (Win 7) into a state where using a message queue
> results in a hang. More specifically, calls to:
>
> scoped_lock<interprocess_mutex> lock(p_hdr->m_mutex);
>
> hang forever.
>
> As a bit more background, there's a message queue that holds up to 5 x
> 1024 byte messages, and I believe currently has 2. I'm having a hard
> time verifying that because calls to get_num_msg() hang trying on calls
> like the one above, but that's what I see when I look in
> c:/ProgramData/boost_interprocess/20110816195406.550541/CliIPC.
>
> I have feeling what happened is that some process that was using the
> message queue got terminated while holding the p_hdr->m_mutex. Does
> anyone have any suggestions for recovering from this?
>
> I'm using version 1.47.

For now, the only thing you can do is using a timed lock, It's not easy
to support robust mutexes when using emulated process-shared resources.

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net