Bug#536231: phonon-backend-xine: blocks exit()
Package: phonon-backend-xine
Version: 4:4.3.1-1
Severity: normal
A couple of times, I've had my X server crash, and then found
that Konversation is still running (alive enough that it's not
getting kicked from IRC for inactivity).
The main program thread has called exit(), and processing of the
on-exit cleanup is stuck in Backend's destructor. It appears to
be waiting for XineThread::event to remove objects from a list,
but in XineThread::event that list is const.
Regards,
Steve
Backend::~Backend()
{
m_inShutdown = true;
if (!m_cleanupObjects.isEmpty()) {
Q_ASSERT(m_thread);
QCoreApplication::postEvent(m_thread, new Event(Event::Cleanup));
while (!m_cleanupObjects.isEmpty()) {
XineThread::msleep(200); // static QThread::msleep, but that one is protected and XineThread is our friend
}
}
bool XineThread::event(QEvent *e)
{
switch (e->type()) {
case Event::Cleanup:
e->accept();
{
const QList<QObject *> cleanupObjects = Backend::cleanupObjects();
foreach (QObject *o, cleanupObjects) {
delete o;
}
}
return true;
case Event::NewStream:
(gdb) thread apply all bt
Thread 6 (Thread 0x7f3f049a1950 (LWP 6811)):
#0 0x00007f3f19edcded in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0x00007f3f08e8fca1 in metronom_sync_loop (this=0x20470e0) at metronom.c:870
#2 0x00007f3f19ed8f7a in start_thread () from /lib/libpthread.so.0
#3 0x00007f3f1c26289d in clone () from /lib/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 5 (Thread 0x7f3f03303950 (LWP 6812)):
#0 0x00007f3f1c25a066 in poll () from /lib/libc.so.6
#1 0x00007f3f189a1cc9 in ?? () from /usr/lib/libglib-2.0.so.0
#2 0x00007f3f189a1fac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3 0x00007f3f1d5b84bf in QEventDispatcherGlib::processEvents (this=0x1fdb120, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:324
#4 0x00007f3f1d58d6f2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5 0x00007f3f1d58dabd in QEventLoop::exec (this=0x7f3f03303030, flags=...) at kernel/qeventloop.cpp:200
#6 0x00007f3f1d4a37e8 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#7 0x00007f3f090ea634 in Phonon::Xine::XineThread::run (this=0x2047f70) at ../../xine/xinethread.cpp:143
#8 0x00007f3f1d4a6742 in QThreadPrivate::start (arg=0x2047f70) at thread/qthread_unix.cpp:189
#9 0x00007f3f19ed8f7a in start_thread () from /lib/libpthread.so.0
#10 0x00007f3f1c26289d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()
Thread 4 (Thread 0x7f3f028f9950 (LWP 6815)):
#0 0x00007f3f1c25a066 in poll () from /lib/libc.so.6
#1 0x00007f3f028fe849 in my_snd_mixer_wait (data=<value optimized out>) at audio_alsa_out.c:150
#2 ao_alsa_handle_event_thread (data=<value optimized out>) at audio_alsa_out.c:166
#3 0x00007f3f19ed8f7a in start_thread () from /lib/libpthread.so.0
#4 0x00007f3f1c26289d in clone () from /lib/libc.so.6
#5 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7f3f020f8950 (LWP 6816)):
#0 0x00007f3f19edcb69 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0x00007f3f08ea0ce3 in fifo_peek_int (this_gen=<value optimized out>) at audio_out.c:348
#2 fifo_peek (this_gen=<value optimized out>) at audio_out.c:388
#3 ao_loop (this_gen=<value optimized out>) at audio_out.c:1015
#4 0x00007f3f19ed8f7a in start_thread () from /lib/libpthread.so.0
#5 0x00007f3f1c26289d in clone () from /lib/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f3efbfff950 (LWP 6820)):
#0 0x00007f3f1c25c232 in select () from /lib/libc.so.6
#1 0x00007f3f1d56d936 in QProcessManager::run (this=0x1e179e0) at io/qprocess_unix.cpp:305
#2 0x00007f3f1d4a6742 in QThreadPrivate::start (arg=0x1e179e0) at thread/qthread_unix.cpp:189
#3 0x00007f3f19ed8f7a in start_thread () from /lib/libpthread.so.0
#4 0x00007f3f1c26289d in clone () from /lib/libc.so.6
#5 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f3f20cb3760 (LWP 6807)):
#0 0x00007f3f19edcded in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0x00007f3f1d4a6195 in thread_sleep (ti=0x7fff28df1420) at thread/qthread_unix.cpp:298
#2 0x00007f3f1d4a62ee in QThread::msleep (msecs=200) at thread/qthread_unix.cpp:324
#3 0x00007f3f0910de7a in ~Backend (this=0x1fdb5f0, __in_chrg=<value optimized out>) at ../../xine/backend.cpp:108
#4 0x00007f3f1f89b030 in ~FactoryPrivate (this=0x1e34320, __in_chrg=<value optimized out>) at ../../phonon/factory.cpp:199
#5 0x00007f3f1c1cc41d in exit () from /lib/libc.so.6
#6 0x00007f3f1ca29c58 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:707
#7 0x00007f3f1e18ada8 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib/libkdeui.so.5
#8 0x00007f3f1f57453e in _XIOError (dpy=0x1e1cef0) at ../../src/XlibInt.c:2959
#9 0x00007f3f1f57b83f in process_responses (dpy=0x1e1cef0, wait_for_first_event=0, current_error=0x0, current_request=18446744073709551506) at ../../src/xcb_io.c:240
#10 0x00007f3f1f57c177 in _XEventsQueued (dpy=0x1e1cef0, mode=<value optimized out>) at ../../src/xcb_io.c:256
#11 0x00007f3f1f564e83 in XEventsQueued (dpy=0x1e1cef0, mode=2) at ../../src/Pending.c:44
#12 0x00007f3f1ca64e3c in x11EventSourceCheck (s=0x1e16fd0) at kernel/qguieventdispatcher_glib.cpp:87
#13 0x00007f3f189a145c in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#14 0x00007f3f189a1d11 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00007f3f189a1fac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#16 0x00007f3f1d5b84bf in QEventDispatcherGlib::processEvents (this=0x1df6c90, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:324
#17 0x00007f3f1ca64c7f in QGuiEventDispatcherGlib::processEvents (this=0x7fff28df13a4, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#18 0x00007f3f1d58d6f2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#19 0x00007f3f1d58dabd in QEventLoop::exec (this=0x7fff28df1800, flags=...) at kernel/qeventloop.cpp:200
#20 0x00007f3f1d58fd84 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#21 0x0000000000460b15 in _start ()
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.29-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages phonon-backend-xine depends on:
ii libc6 2.9-19 GNU C Library: Shared libraries
ii libphonon4 4:4.3.1-1 Phonon multimedia framework for Qt
ii libqt4-dbus 4.5.1-2 Qt 4 D-Bus module
ii libqtcore4 4.5.1-2 Qt 4 core module
ii libqtgui4 4.5.1-2 Qt 4 GUI module
ii libstdc++6 4.4.0-10 The GNU Standard C++ Library v3
ii libxcb1 1.3-2 X C Binding
ii libxine1 1.1.16.3-1+b2 the xine video/media player librar
phonon-backend-xine recommends no packages.
phonon-backend-xine suggests no packages.
-- no debconf information
-- Konversation info:
Package: konversation
Version: 1.2~alpha4-2
Versions of packages konversation depends on:
ii kdebase-runtime 4:4.2.4-2 runtime components from the offici
ii kdelibs5 4:4.2.4-1 core libraries for all KDE 4 appli
ii kdepimlibs5 4:4.2.4-1 core libraries for KDE PIM 4 appli
ii libc6 2.9-19 GNU C Library: Shared libraries
ii libphonon4 4:4.3.1-1 Phonon multimedia framework for Qt
ii libqca2 2.0.2-1 libraries for the Qt Cryptographic
ii libqt4-dbus 4.5.1-2 Qt 4 D-Bus module
ii libqt4-network 4.5.1-2 Qt 4 network module
ii libqt4-qt3support 4.5.1-2 Qt 3 compatibility library for Qt
ii libqt4-xml 4.5.1-2 Qt 4 XML module
ii libqtcore4 4.5.1-2 Qt 4 core module
ii libqtgui4 4.5.1-2 Qt 4 GUI module
ii libstdc++6 4.4.0-10 The GNU Standard C++ Library v3
ii libx11-6 2:1.2.1-1 X11 client-side library
ii libxss1 1:1.1.3-1 X11 Screen Saver extension library
ii phonon 4:4.3.1-1 metapackage for Phonon multimedia
Versions of packages konversation recommends:
ii python 2.5.4-2 An interactive high-level object-o
Reply to: