death/dbus — Issue #4: wait-for-incoming-message can hang on event-dispatch
Author: joseph-gay
Created: 2012-02-05 09:56:18+00:00
State: open

This may prove difficult to reproduce in isolation.

My use case is as follows (it helps to be familiar with stumpwm):

Displaying status information in the mode-line: a function is called with an interval of every 5 seconds. Inside this function are several dbus method calls in the following form:

```lisp
(dbus:with-open-bus (bus (dbus:system-server-addresses))
(dbus:with-introspected-object (wicd-service bus path "org.wicd.daemon")
(apply #'wicd-service interface name args)))
```

Thus far, I've been able to look at stack frames for three or four occurrences of the issue. In each case, the thread hangs after an event-dispatch waiting for the reply to an "Introspect" call generated from with-introspected-object. Also, as you might expect, pending-messages for the connection does not contain a method-return-message, only a signal-message.

Tracking down why the method-return-message is not present in these cases has proved difficult for me. My guess is that a race condition is present somewhere in or around the event code. The hanging call may happen after only a few minutes to several hours. I will try to trace through the event code.