Bug 27811

Summary: Corrected thread problem causing some calls to hang for 25s
Product: dbus Reporter: Johan Redestig <johan.redestig>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: christian
Version: 1.0.x   
Hardware: ARM   
OS: other   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed solution
original patch rebased to master
original patch rebased to 1.2

Description Johan Redestig 2010-04-23 03:52:50 UTC
Created attachment 35253 [details] [review]
Proposed solution

Since the connection lock is released for a short while in
_dbus_connection_acquire_io_path there can already be a method return
received by another thread. The fix is to do an extra check after the
I/O path has been aquired both. This is possibly the same underlying problem as identified in: http://marc.info/?l=freedesktop-dbus&m=117323275932377&w=2

The patch was initially contributed to the Android project: http://review.source.android.com/#change,14121. 

We are hereby looking for input on the patch from the DBUS experts :)
Comment 1 Thiago Macieira 2010-05-17 00:47:24 UTC
Comment on attachment 35253 [details] [review]
Proposed solution

Patch looks good. I'll try and test later.
Comment 2 Ralf Habacker 2010-06-09 01:40:36 UTC
According to http://lists.freedesktop.org/archives/dbus/2010-May/012871.html these patch should be applied. 

Unfortunally the patch failed to apply 

error: patch failed: dbus/dbus-connection.c:2332
error: dbus/dbus-connection.c: patch does not apply
Patch failed at 0001.

Please update
Comment 3 Ralf Habacker 2010-06-09 01:52:14 UTC
(In reply to comment #2)
> According to http://lists.freedesktop.org/archives/dbus/2010-May/012871.html
> these patch should be applied. 
> 
> Unfortunally the patch failed to apply 
> 
> error: patch failed: dbus/dbus-connection.c:2332
> error: dbus/dbus-connection.c: patch does not apply
> Patch failed at 0001.
> 
> Please update

Patch failed in dbus-1.2 and dbus-master branch. Please use the related branch for a rebase.
Comment 4 Johan Redestig 2010-06-09 03:01:20 UTC
Created attachment 36176 [details] [review]
original patch rebased to master
Comment 5 Johan Redestig 2010-06-09 03:01:46 UTC
Created attachment 36177 [details] [review]
original patch rebased to 1.2
Comment 6 Ralf Habacker 2010-06-09 03:18:35 UTC
patches are committed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.