Opened 8 years ago

Closed 8 years ago

#10721 closed Bugs (fixed)

boost::signals2 deadlock with pthread

Reported by: Stefan Bühler <buehler@…> Owned by: Frank Mori Hess
Milestone: To Be Determined Component: signals2
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

Hi,

boost::signals2 releases the tracked pointers while holding the lock of the following connection_body; if a destructor of a tracked object tries to use this connection (for example through signal::empty() or connection::connected()) it enters a recursive lock on windows (works fine) and deadlocks with pthread.

regards, Stefan

Attachments (2)

deadlock-boost-signals2.cpp (1.7 KB ) - added by Stefan Bühler <buehler@…> 8 years ago.
slot_call_iterator.hpp.patch (648 bytes ) - added by Stefan Bühler <buehler@…> 8 years ago.

Download all attachments as: .zip

Change History (4)

by Stefan Bühler <buehler@…>, 8 years ago

Attachment: deadlock-boost-signals2.cpp added

by Stefan Bühler <buehler@…>, 8 years ago

comment:1 by Stefan Bühler <buehler@…>, 8 years ago

Component: Nonesignals2
Owner: set to Frank Mori Hess

The attached patch fixes the issue - I think it should be safe to release the tracked pointers outside the lock.

comment:2 by Frank Mori Hess, 8 years ago

Resolution: fixed
Status: newclosed

Patch has been merged in git.

Note: See TracTickets for help on using tickets.