Bug 26086

Summary: dbus-c++ : hal-listen locks up on repeated plug/unplug of usb device
Product: dbus Reporter: Joe Steeve <js>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED NOTOURBUG QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: dbus-c++ lockup, gdb trace
probable fix

Description Joe Steeve 2010-01-17 13:37:09 UTC
When an usb device is repeatedly plugged-in/plugged-out, hal-listen locks up. 

Running through gdb shows that the application is locked waiting to acquire DBus::Dispatcher::_mutex_p in DBus::Dispatcher::queue_connection (check attachment). DBus::Dispatcher::_mutex_p is already locked by the same thread earlier in the call-stack.

Should DBus::Dispatcher::_mutex_p be 'recursive' ?
Comment 1 Joe Steeve 2010-01-17 13:56:48 UTC
Created attachment 32686 [details]
dbus-c++ lockup, gdb trace
Comment 2 Joe Steeve 2010-01-17 13:59:05 UTC
Created attachment 32687 [details] [review]
probable fix

This makes DBus::Dispatcher::_mutex_p as recursive. I am not quite sure whether this will affect anything else. Someone who knows better should tell me :-S
Comment 3 Andreas Volz 2010-01-30 01:13:05 UTC
Hello John,

please attach your minimal test application which shows the crash. I'll take a look then into it.

Thanks for the patch.

regards
Andreas
Comment 4 Joe Steeve 2010-01-30 11:30:42 UTC
(In reply to comment #3)

Hello Andreas,

> please attach your minimal test application which shows the crash. I'll take a
> look then into it.

This happens with the example code (examples/hal/hal-listen) distributed along with dbus-c++.

I'm on Debian Squeeze.

Joe


Comment 5 Simon McVittie 2011-01-05 05:05:22 UTC
dbus-c++ <http://sourceforge.net/projects/dbus-cplusplus/> has its own bug
tracker and is no longer hosted here. Please open a bug over there.

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.