Menu

#4 Fix dbus signal handler deadlock

closed
Andreas
None
5
2012-10-03
2009-11-30
naBerTech
No

Problem:
We get a deadlock when a dbus signal handler (es. signal handler 1) call a dbus method (es. method N) that rise a signal (es. signal 2) before return the reply.

          Process          Process
             A                B
                    signal 1

             -  <-----------x
     signal  |
  handler 1  |    method N

(wait method ret)| x-----------> -
| |
| signal 2 |
signal - <------------------x | method handler
handler 2 | | |
# # method N ret |
<------------ -

= deadlock

The solution, that you can find on attached patch consist of use a copy of the pending queue when we loop to dispatch, allowing to enqueue requests (from a dispatched request) on orignal pending queue without deadlock.

Discussion

  • naBerTech

    naBerTech - 2009-11-30

    Fix dbus signal handler deadlock

     
  • Andreas

    Andreas - 2011-11-28

    => Syncing Gitorious... [OK]
    To git@gitorious.org:dbus-cplusplus/mainline.git
    d1ec254..82c63b2 master -> master

     

Log in to post a comment.

MongoDB Logo MongoDB