Opened 9 years ago

#9055 new Bugs

spin_condition.notify()hangs if communication peer crashes

Reported by: stepan.seycek@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.54.0 Severity: Problem
Keywords: deadlock Cc:

Description

When using interprocess_condition for signalling availability of new data in shared memory the call to notify_one() or notify_all() hangs forever if the communication peer terminates ungracefully. This happens because spin_condition.notify() calls m_enter_mut.lock().

A possible solution that we apply in our project is to provide notify methods with a timeout argument and a boolean return value that call m_enter_mut.timed_wait(abs_time). The return value can then be handled accordingly.

Attachments (1)

interprocess.patch (3.5 KB ) - added by stepan.seycek@… 9 years ago.
patch providing notify methods with timeout

Download all attachments as: .zip

Change History (1)

by stepan.seycek@…, 9 years ago

Attachment: interprocess.patch added

patch providing notify methods with timeout

Note: See TracTickets for help on using tickets.