[pulseaudio-tickets] [PulseAudio] #703: Deadlock in libpulse when frequently stopping/starting audio
PulseAudio
trac-noreply at tango.0pointer.de
Tue Nov 3 15:52:42 PST 2009
#703: Deadlock in libpulse when frequently stopping/starting audio
-----------------------+----------------------------------------------------
Reporter: aldimond | Owner: lennart
Type: defect | Status: new
Milestone: | Component: libpulse
Resolution: | Keywords:
-----------------------+----------------------------------------------------
Comment(by aldimond):
Sure, here it is. The line numbers in those packages are from alsa-
lib-1.0.21a and alsa-plugins-1.0.21 straight from alsa-project.org. As
one of the other Audacity devs wasn't seeing this behavior, I'll check
what version of these packages he has and whether I can repro with that
version.
{{{
(gdb) thread apply all bt full
Thread 156 (Thread 0x7fffe1dab910 (LWP 26989)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
No locals.
#1 0x00007fffe6e3d42b in pa_threaded_mainloop_wait (m=0x2348e10) at pulse
/thread-mainloop.c:209
__func__ = "pa_threaded_mainloop_wait"
__PRETTY_FUNCTION__ = "pa_threaded_mainloop_wait"
#2 0x00007fffe65b23ba in pulse_wait_operation (p=0x2116c10, o=0x1fc9970)
at pulse.c:72
err = <value optimized out>
__PRETTY_FUNCTION__ = "pulse_wait_operation"
#3 0x00007fffe65b1884 in pulse_stop (io=<value optimized out>) at
pcm_pulse.c:273
pcm = 0x23a9320
o = <value optimized out>
u = <value optimized out>
err = <value optimized out>
err_o = <value optimized out>
err_u = <value optimized out>
__PRETTY_FUNCTION__ = "pulse_stop"
#4 0x00007ffff3f68607 in snd_pcm_ioplug_drop (pcm=0x246ab00) at
pcm_ioplug.c:464
io = 0x246bb00
#5 0x0000000000957469 in AlsaStop (stream=0x23a89a0, abort=128) at
src/hostapi/alsa/pa_linux_alsa.c:2196
result = <value optimized out>
#6 0x000000000095844a in OnExit (data=0x23a89a0) at
src/hostapi/alsa/pa_linux_alsa.c:2513
__PRETTY_FUNCTION__ = "OnExit"
#7 0x000000000095cdf8 in CallbackThreadFunc (userData=<value optimized
out>) at src/hostapi/alsa/pa_linux_alsa.c:3251
__cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf =
{140736982595856, 5562080702487580942, 140737488343520, 0, 0, 3,
-5562023212709850866, 5562081628273234190}, __mask_was_saved = 0}},
__pad = {0x7fffe1dab0a0, 0x0, 0x7ffff3ab69aa, 0x0}}
not_first_call = -512
result = <value optimized out>
stream = 0x23a89a0
timeInfo = {inputBufferAdcTime = 0.046439909297052155, currentTime
= 0, outputBufferDacTime = 0.046439909297052155}
callbackResult = 0
cbFlags = <value optimized out>
__PRETTY_FUNCTION__ = "CallbackThreadFunc"
#8 0x00007ffff3ab5a04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
__res = <value optimized out>
pd = 0x7fffe1dab910
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736982595856,
5562080702487580942, 140737488343520, 0, 0, 3, -5562023212609187570,
-5562053598222233330}, mask_was_saved = 0}}, priv = {
pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0,
canceltype = 0}}}
not_first_call = <value optimized out>
robust = <value optimized out>
#9 0x00007ffff30747bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#10 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 155 (Thread 0x7fffdd5a9910 (LWP 26988)):
#0 __pthread_mutex_lock_full (mutex=0x2475590) at
pthread_mutex_lock.c:303
private = <value optimized out>
e = <value optimized out>
kind = 1
robust = 0
oldval = <value optimized out>
__PRETTY_FUNCTION__ = "__pthread_mutex_lock_full"
#1 0x00007fffe6bfd4ee in pa_mutex_lock (m=0x2475590) at pulsecore/mutex-
posix.c:90
__func__ = "pa_mutex_lock"
__PRETTY_FUNCTION__ = "pa_mutex_lock"
#2 0x00007fffe6e3d219 in poll_func (ufds=<value optimized out>, nfds=2,
timeout=10, userdata=0x2475590) at pulse/thread-mainloop.c:76
r = 1
__func__ = "poll_func"
__PRETTY_FUNCTION__ = "poll_func"
---Type <return> to continue, or q <return> to quit---
#3 0x00007fffe6e2d5e6 in pa_mainloop_poll (m=0x23cc100) at
pulse/mainloop.c:879
__func__ = "pa_mainloop_poll"
__PRETTY_FUNCTION__ = "pa_mainloop_poll"
#4 0x00007fffe6e2eeb9 in pa_mainloop_iterate (m=0x23cc100, block=<value
optimized out>, retval=0x0) at pulse/mainloop.c:961
r = <value optimized out>
__func__ = "pa_mainloop_iterate"
__PRETTY_FUNCTION__ = "pa_mainloop_iterate"
#5 0x00007fffe6e2ef70 in pa_mainloop_run (m=0x23cc100, retval=0x0) at
pulse/mainloop.c:979
r = <value optimized out>
#6 0x00007fffe6e3d12b in thread (userdata=0x2348e10) at pulse/thread-
mainloop.c:94
mask = {__val = {18446744067267100671, 18446744073709551615
<repeats 15 times>}}
#7 0x00007fffe6bfe050 in internal_thread_func (userdata=0x20f3410) at
pulsecore/thread-posix.c:72
__func__ = "internal_thread_func"
__PRETTY_FUNCTION__ = "internal_thread_func"
#8 0x00007ffff3ab5a04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
__res = <value optimized out>
pd = 0x7fffdd5a9910
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736907090192,
5562080702487580942, 140737281523840, 0, 0, 3, -5562015517101534962,
-5562053598222233330}, mask_was_saved = 0}}, priv = {
pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0,
canceltype = 0}}}
not_first_call = <value optimized out>
robust = <value optimized out>
#9 0x00007ffff30747bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#10 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 6 (Thread 0x7fffe25ac910 (LWP 26838)):
#0 0x00007ffff3abd8f1 in nanosleep () from /lib/libpthread.so.0
No symbol table info available.
#1 0x00007ffff60bea8c in wxMicroSleep (microseconds=<value optimized
out>) at ../src/unix/utilsunx.cpp:191
tmReq = {tv_sec = 0, tv_nsec = 10000000}
#2 0x0000000000593bf4 in AudioThread::Entry (this=0x1eb3860) at
AudioIO.cpp:1676
No locals.
#3 0x00007ffff60b8a3a in wxThreadInternal::PthreadStart
(thread=0x1eb3860) at ../src/unix/threadpsx.cpp:766
pthread = 0x1fc2cb0
rc = <value optimized out>
dontRunAtAll = false
__FUNCTION__ = "PthreadStart"
#4 0x00007ffff3ab5a04 in start_thread (arg=<value optimized out>) at
pthread_create.c:300
__res = <value optimized out>
pd = 0x7fffe25ac910
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736990988560,
5562080702487580942, 140737488346368, 0, 0, 3, -5562017714514177778,
-5562053598222233330}, mask_was_saved = 0}}, priv = {
pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0,
canceltype = 0}}}
not_first_call = <value optimized out>
robust = <value optimized out>
#5 0x00007ffff30747bd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#6 0x0000000000000000 in ?? ()
No symbol table info available.
Current language: auto
The current source language is "auto; currently c".
Thread 1 (Thread 0x7ffff7fb37f0 (LWP 26829)):
#0 0x00007ffff3ab6cfd in pthread_join (threadid=140736982595856,
thread_return=0x7fffffffd0f8) at pthread_join.c:89
__ignore = <value optimized out>
_tid = 26989
_buffer = {__routine = 0x7ffff3ab6bd0 <cleanup>, __arg =
0x7fffe1dabd38, __canceltype = 0, __prev = 0x0}
oldtype = 0
result = <value optimized out>
#1 0x0000000000955031 in PaUnixThread_Terminate (self=0x23a8b30,
wait=<value optimized out>, exitResult=0x7fffffffd12c) at
src/os/unix/pa_unix_util.c:406
result = <value optimized out>
pret = <value optimized out>
---Type <return> to continue, or q <return> to quit---
__PRETTY_FUNCTION__ = "PaUnixThread_Terminate"
#2 0x0000000000958213 in RealStop (stream=0x23a89a0, abort=<value
optimized out>) at src/hostapi/alsa/pa_linux_alsa.c:2256
threadRes = 0
result = <value optimized out>
#3 0x0000000000592579 in AudioIO::StopStream (this=0x1eb3170) at
AudioIO.cpp:1189
No locals.
#4 0x000000000079e587 in ControlToolBar::StopPlaying (this=0x2181580) at
toolbars/ControlToolBar.cpp:709
project = 0x205a3a0
#5 0x00000000007b3fd8 in TranscriptionToolBar::OnPlaySpeed
(this=0x2182620, event=...) at toolbars/TranscriptionToolBar.cpp:404
p = 0x205a3a0
playRegionStart = 6.9533558072998324e-310
playRegionEnd = 1.5757381886246045e-316
#6 0x00000000007b4125 in TranscriptionToolBar::OnSpeedSlider
(this=0x2182620, event=...) at toolbars/TranscriptionToolBar.cpp:433
No locals.
#7 0x00007ffff60b97b0 in wxEvtHandler::ProcessEventIfMatches
(entry=<value optimized out>, handler=0x0, event=...) at
../src/common/event.cpp:1231
tableId1 = <value optimized out>
tableId2 = <value optimized out>
#8 0x00007ffff60bace7 in wxEventHashTable::HandleEvent (this=<value
optimized out>, event=..., self=0x2182620) at ../src/common/event.cpp:906
n = 0
count = 2
eventType = <value optimized out>
eTTnode = 0x2228f30
#9 0x00007ffff60bae28 in wxEvtHandler::ProcessEvent (this=0x2182620,
event=...) at ../src/common/event.cpp:1293
__FUNCTION__ = "ProcessEvent"
#10 0x00007ffff6a857fd in wxWindowBase::TryParent (this=<value optimized
out>, event=...) at ../src/common/wincmn.cpp:2661
parent = 0x2182620
#11 0x00000000007bd52a in LWSlider::SendUpdate (this=0x1e6a730,
newValue=0.798426986) at widgets/ASlider.cpp:1105
e = {<wxEvent> = {<wxObject> = {_vptr.wxObject = 0x1cc4770, static
ms_classInfo = {m_className = 0x7ffff60e87d0 L"wxObject", m_objectSize =
16, m_objectConstructor = 0, m_baseInfo1 = 0x0,
m_baseInfo2 = 0x0, static sm_first = 0x0, m_next =
0x7ffff6341d00, static sm_classTable = 0x1ce7980}, m_refData = 0x0},
m_eventObject = 0x0, m_eventType = 10087, m_timeStamp = 0,
m_id = 11, m_callbackUserData = 0x0, m_propagationLevel =
2147483646, m_skipped = false, m_isCommandEvent = true, static
ms_classInfo = {m_className = 0x0, m_objectSize = 0,
m_objectConstructor = 0, m_baseInfo1 = 0x0, m_baseInfo2 =
0x0, static sm_first = 0x0, m_next = 0x0, static sm_classTable =
0x1ce7980}}, m_cmdString = {<wxStringBase> = {
static npos = 18446744073709551615, m_pchData =
0x7ffff60ed818 L""}, <No data fields>}, m_commandInt = 263, m_extraLong =
0, m_clientData = 0x0, m_clientObject = 0x0,
static ms_classInfo = {m_className = 0x7ffff6ad84a0
L"wxCommandEvent", m_objectSize = 104, m_objectConstructor =
0x7ffff6942ab0 <wxCommandEvent::wxCreateObject()>,
m_baseInfo1 = 0x1cbda60, m_baseInfo2 = 0x0, static sm_first =
0x0, m_next = 0x7ffff6ddd580, static sm_classTable = 0x1ce7980}}
intValue = 263
#12 0x00000000007bcff6 in LWSlider::OnMouseEvent (this=0x1e6a730,
event=...) at widgets/ASlider.cpp:1019
prevValue = 0.966404498
r = {x = 28, y = 9, width = 11, height = 14}
tolerantThumbRect = {x = 25, y = 6, width = 17, height = 20}
#13 0x00000000007be44c in ASlider::OnMouseEvent (this=0x1e6a3a0,
event=...) at widgets/ASlider.cpp:1380
No locals.
#14 0x00007ffff60b97b0 in wxEvtHandler::ProcessEventIfMatches
(entry=<value optimized out>, handler=0x0, event=...) at
../src/common/event.cpp:1231
tableId1 = <value optimized out>
tableId2 = <value optimized out>
#15 0x00007ffff60bace7 in wxEventHashTable::HandleEvent (this=<value
optimized out>, event=..., self=0x1e6a3a0) at ../src/common/event.cpp:906
n = 0
count = 1
eventType = <value optimized out>
eTTnode = 0x21f8e90
#16 0x00007ffff60bae28 in wxEvtHandler::ProcessEvent (this=0x1e6a3a0,
event=...) at ../src/common/event.cpp:1293
__FUNCTION__ = "ProcessEvent"
#17 0x00007ffff6980b6a in gtk_window_motion_notify_callback (widget=<value
optimized out>, gdk_event=0x2389480, win=0x1e6a3a0) at
../src/gtk/window.cpp:1786
rc = <value optimized out>
event = {<wxEvent> = {<wxObject> = {_vptr.wxObject = 0x1cc5030,
static ms_classInfo = {m_className = 0x7ffff60e87d0 L"wxObject",
m_objectSize = 16, m_objectConstructor = 0,
m_baseInfo1 = 0x0, m_baseInfo2 = 0x0, static sm_first =
0x0, m_next = 0x7ffff6341d00, static sm_classTable = 0x1ce7980}, m_refData
= 0x0}, m_eventObject = 0x1e6a3a0,
m_eventType = 10103, m_timeStamp = 267163034, m_id = 11,
m_callbackUserData = 0x0, m_propagationLevel = 0, m_skipped = false,
m_isCommandEvent = false, static ms_classInfo = {
m_className = 0x0, m_objectSize = 0, m_objectConstructor =
0, m_baseInfo1 = 0x0, m_baseInfo2 = 0x0, static sm_first = 0x0, m_next =
0x0, static sm_classTable = 0x1ce7980}}, m_x = 32,
m_y = 18, m_leftDown = true, m_middleDown = false, m_rightDown =
false, m_controlDown = false, m_shiftDown = false, m_altDown = false,
m_metaDown = false, m_wheelRotation = 0,
m_wheelDelta = 0, m_linesPerAction = 0, static ms_classInfo =
{m_className = 0x7ffff6ad8598 L"wxMouseEvent", m_objectSize = 96,
m_objectConstructor = 0x7ffff6942850
<wxMouseEvent::wxCreateObject()>, m_baseInfo1 = 0x1cbda60, m_baseInfo2 =
0x0, static sm_first = 0x0, m_next = 0x7ffff6ddd680,
static sm_classTable = 0x1ce7980}}
---Type <return> to continue, or q <return> to quit---
ret = false
#18 0x00007ffff2acb728 in _gtk_marshal_BOOLEAN__BOXED (closure=0x1e6a650,
return_value=0x7fffffffdb40, n_param_values=<value optimized out>,
param_values=0x23aa640,
invocation_hint=<value optimized out>, marshal_data=0x7ffff6980a20) at
/build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c:84
data1 = 0x2209270
data2 = 0x696d
v_return = <value optimized out>
__PRETTY_FUNCTION__ = "_gtk_marshal_BOOLEAN__BOXED"
#19 0x00007ffff24a45ae in IA__g_closure_invoke (closure=0x1e6a650,
return_value=0x7fffffffdb40, n_param_values=2, param_values=0x23aa640,
invocation_hint=0x7fffffffdb00)
at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c:767
marshal = 0xfffffffffffffe00
marshal_data = 0x14
__PRETTY_FUNCTION__ = "IA__g_closure_invoke"
#20 0x00007ffff24b9983 in signal_emit_unlocked_R (node=0x1dc0e50,
detail=<value optimized out>, instance=<value optimized out>,
emission_return=<value optimized out>,
instance_and_params=<value optimized out>) at
/build/buildd/glib2.0-2.22.2/gobject/gsignal.c:3247
tmp = 0x7ffff3ab96b0
handler = 0x2224840
accumulator = 0x1dc0ed0
emission = {next = 0x0, instance = 0x2209270, ihint = {signal_id =
42, detail = 0, run_type = G_SIGNAL_RUN_FIRST}, state = EMISSION_RUN,
chain_type = 4}
class_closure = 0x1dc0de0
handler_list = 0x2224840
return_accu = <value optimized out>
accu = {g_type = 20, data = {{v_int = 0, v_uint = 0, v_long = 0,
v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0,
v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
v_double = 0, v_pointer = 0x0}}}
signal_id = 42
max_sequential_handler_number = <value optimized out>
return_value_altered = 0
#21 0x00007ffff24babcc in IA__g_signal_emit_valist (instance=0x2209270,
signal_id=<value optimized out>, detail=0, var_args=0x7fffffffdcf0) at
/build/buildd/glib2.0-2.22.2/gobject/gsignal.c:2990
return_value = {g_type = 20, data = {{v_int = 0, v_uint = 0,
v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double
= 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0,
v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float
= 0, v_double = 0, v_pointer = 0x0}}}
error = <value optimized out>
signal_return_type = 20
param_values = <value optimized out>
node = 0x1dc0e50
i = <value optimized out>
n_params = <value optimized out>
__PRETTY_FUNCTION__ = "IA__g_signal_emit_valist"
#22 0x00007ffff24bb283 in IA__g_signal_emit (instance=0x7fffe1dab9e0,
signal_id=0, detail=26989) at
/build/buildd/glib2.0-2.22.2/gobject/gsignal.c:3037
var_args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area =
0x7fffffffddd0, reg_save_area = 0x7fffffffdd10}}
#23 0x00007ffff2bd272f in gtk_widget_event_internal (widget=0x2209270,
event=0x2389480) at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c:4767
signal_num = <value optimized out>
return_val = 0
#24 0x00007ffff2ac3cd3 in IA__gtk_propagate_event (widget=0x2209270,
event=0x2389480) at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c:2417
tmp = 0x0
handled_event = 35689072
__PRETTY_FUNCTION__ = "IA__gtk_propagate_event"
#25 0x00007ffff2ac4ca3 in IA__gtk_main_do_event (event=0x2389480) at
/build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c:1622
event_widget = <value optimized out>
grab_widget = 0x2209270
window_group = 0x2277520
rewritten_event = 0x0
tmp_list = <value optimized out>
__PRETTY_FUNCTION__ = "IA__gtk_main_do_event"
#26 0x00007ffff2739cdc in gdk_event_dispatch (source=<value optimized
out>, callback=<value optimized out>, user_data=<value optimized out>)
at /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkevents-x11.c:2369
display = <value optimized out>
event = <value optimized out>
#27 0x00007ffff220bbbe in g_main_dispatch (context=0x1d6fdc0) at
/build/buildd/glib2.0-2.22.2/glib/gmain.c:1960
dispatch = 0x7ffff2739c90 <gdk_event_dispatch>
user_data = 0x0
callback = 0
cb_funcs = 0x0
---Type <return> to continue, or q <return> to quit---
cb_data = 0x0
current_source_link = {data = 0x1d6fd40, next = 0x0}
source = 0x1d6fd40
current = 0x1dec750
i = 0
#28 IA__g_main_context_dispatch (context=0x1d6fdc0) at
/build/buildd/glib2.0-2.22.2/glib/gmain.c:2513
No locals.
#29 0x00007ffff220f588 in g_main_context_iterate (context=0x1d6fdc0,
block=<value optimized out>, dispatch=<value optimized out>, self=<value
optimized out>)
at /build/buildd/glib2.0-2.22.2/glib/gmain.c:2591
max_priority = 0
timeout = 0
some_ready = 1
nfds = 7
allocated_nfds = -158001008
fds = <value optimized out>
__PRETTY_FUNCTION__ = "g_main_context_iterate"
#30 0x00007ffff220f9e5 in IA__g_main_loop_run (loop=0x23a4880) at
/build/buildd/glib2.0-2.22.2/glib/gmain.c:2799
self = 0x1d20930
__PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#31 0x00007ffff2ac5177 in IA__gtk_main () at
/build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c:1218
tmp_list = 0x23a3340
functions = 0x0
init = 0x7ffff6de4548
loop = <value optimized out>
#32 0x00007ffff696bb48 in wxEventLoop::Run (this=0x23a3340) at
../src/gtk/evtloop.cpp:76
__FUNCTION__ = "Run"
exitcode = <value optimized out>
#33 0x00007ffff69fbec8 in wxAppBase::MainLoop (this=0x1e18290) at
../src/common/appcmn.cpp:312
mainLoop = {<wxEventLoopPtr> = {m_ptr = 0x23a3340}, m_pp =
0x1e18308, m_pOld = 0x0}
#34 0x00007ffff60513bc in wxEntry (argc=<value optimized out>, argv=<value
optimized out>) at ../src/common/init.cpp:460
No locals.
#35 0x000000000058abd9 in main (argc=1, argv=0x7fffffffe1d8) at
AudacityApp.cpp:634
No locals.
}}}
--
Ticket URL: <http://pulseaudio.org/ticket/703#comment:3>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server
More information about the pulseaudio-bugs
mailing list