Bug 26086 - dbus-c++ : hal-listen locks up on repeated plug/unplug of usb device
Summary: dbus-c++ : hal-listen locks up on repeated plug/unplug of usb device
Status: RESOLVED NOTOURBUG
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-17 13:37 UTC by Joe Steeve
Modified: 2011-01-05 05:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dbus-c++ lockup, gdb trace (15.51 KB, text/plain)
2010-01-17 13:56 UTC, Joe Steeve
Details
probable fix (318 bytes, patch)
2010-01-17 13:59 UTC, Joe Steeve
Details | Splinter Review

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.