[Freeipa-devel] [PATCH] check pending_return after dbus_connection_send_with_reply

Simo Sorce ssorce at redhat.com
Wed Jun 24 12:16:28 UTC 2009


On Wed, 2009-06-24 at 09:37 +0200, Sumit Bose wrote:
> Am 23.06.2009 23:18, schrieb Simo Sorce:
> > On Tue, 2009-06-23 at 15:05 +0200, Sumit Bose wrote:
> >> Hi,
> >>
> >> according to
> >> http://dbus.freedesktop.org/doc/dbus/api/html/group__DBusConnection.html#ga951b2a6f6c4069fa392752000b24ebe
> >> dbus_connection_send_with_reply can return TRUE, but set pending_return
> >> to NULL. This patch adds a check to protect the following call which try
> >> to use pending_return.
> >>
> >> I have found this while running some load tests with >40 parallel
> >> authentication requests.
> > 
> > Your patch will cacth it but the effect is the same (we will ourselves).
> > Do you know in what cases this can happen and what it means ?
> 
> According to the url above pending_return == NULL means that the
> connection is disconnected.
> 
> > 
> > Why does it return true if pending_return is null ?
> > 
> 
> dbus at lists.freedesktop.org ?
> 
> > Is there anything we can do, like loop back and retry 2-3 times before
> > giving up ?
> > 
> 
> I do not know if it makes sense here. If the connection is disconnected
> the reason might be that the other side of the connection died. If the
> other side is restarted by the monitor can we use the old connection or
> it is necessary to reconnect?

We need to reconnect, so I guess your patch is ok.

Thanks,
Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the Freeipa-devel mailing list