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

Stephen Gallagher sgallagh at redhat.com
Wed Jun 24 10:06:53 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/24/2009 03:37 AM, 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 ?
>>
Simo, the function only returns false if there was a memory allocation
error.
> 
> 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?
> 

I agree with Sumit. The only reason a peer-to-peer D-BUS connection
would be disconnected is if one end of it exited. So retrying is just
wasting cycles. It's better to just kill it off and let the monitor
restart the offending process.

> bye,
> Sumit
> 
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel


- -- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkpB+rkACgkQeiVVYja6o6OknwCgmS1ojXkX18xiTsFSnPDF+DaF
iS4AnRGEajLOa8Ze1isn/2XFSCfTMK1M
=x81v
-----END PGP SIGNATURE-----




More information about the Freeipa-devel mailing list