Summary: | Xine Stream is closed in between mutex lockings from Phonon::Xine::XineStream::event() and playbackFinished() | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Phonon | Reporter: | Marcus Harrison <marcus> |
Component: | Xine backend | Assignee: | Harald Sitter <sitter> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | 16303, 1lukas1, aag79at, achim.bewernitz, adundovi, alejandronova, alex26ene, alex, alextazy0, andysemailis, anrvrx, ant_978red, arne_bab, aroejari, artazonster, arthurgarlick, bgdotmail, bug.kde-lists, cameroncros, christopherheiny, cold_sun, contact, curati.marco, dag.ringdal, damm_horse, dave.hills.2009, dima, dragoon.van.trinitas, dschridde+kde, dumith.2006, echidnaman, eduar2tole2, eike, eldred, ellontop, erotanes, extravagant, eyecreate, freeshit, gabrieljoel, gsmanuel, happysmack70, hellknight.tarun, is.surmast, jdkaye10, jiacontrerasp, jorge.salgueiro, josan_pansa, karaluh, kilem86, kovariadam, kretebe, letharion, lothar, luke-jr+kdebugs, maciekwer, martin.sandsmark, martyhebert, matthewhperkins, mdb, mikolajmm, miryalavignesh, mo.mashi, mobile_dan, morgan.peyre, mtadeunet, myhaella5, mytrash12, n.underwood78, nir692007, o-z, odlunag, opaw_dk, opteron241, p92, pascal, patarvden, patrickl, pebmich, poenikatu, raul, rfe.gen, roman.karlstetter, s-t-kdebugs, sabarth, skierpage, ssvdale, stars, stefan.costea, t.kijas, tek, themeehans, the_don125, tonikde, tridentine.avenger, usrrgt, vincenzo84ve, vittoriomandelli, walch.martin, widget-bugs, zhushazang |
Priority: | NOR | Keywords: | release_blocker |
Version: | 4.4.2 (KDE 4.5) | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | New crash information added by DrKonqi |
Description
Marcus Harrison
2009-06-13 12:39:13 UTC
*** Bug 204583 has been marked as a duplicate of this bug. *** *** Bug 198769 has been marked as a duplicate of this bug. *** *** Bug 206205 has been marked as a duplicate of this bug. *** *** Bug 206297 has been marked as a duplicate of this bug. *** Configured system to use a different backend (GStreamer instead of Xine) but still the same problems... *** Bug 206557 has been marked as a duplicate of this bug. *** *** Bug 206557 has been marked as a duplicate of this bug. *** *** Bug 207267 has been marked as a duplicate of this bug. *** *** Bug 208235 has been marked as a duplicate of this bug. *** *** Bug 208257 has been marked as a duplicate of this bug. *** confirming since it's happening to many people *** Bug 209804 has been marked as a duplicate of this bug. *** *** Bug 209916 has been marked as a duplicate of this bug. *** *** Bug 210000 has been marked as a duplicate of this bug. *** *** Bug 212625 has been marked as a duplicate of this bug. *** *** Bug 212633 has been marked as a duplicate of this bug. *** *** Bug 213595 has been marked as a duplicate of this bug. *** *** Bug 213913 has been marked as a duplicate of this bug. *** *** Bug 213936 has been marked as a duplicate of this bug. *** *** Bug 206713 has been marked as a duplicate of this bug. *** *** Bug 205595 has been marked as a duplicate of this bug. *** *** Bug 213471 has been marked as a duplicate of this bug. *** *** Bug 212948 has been marked as a duplicate of this bug. *** *** Bug 212337 has been marked as a duplicate of this bug. *** *** Bug 206983 has been marked as a duplicate of this bug. *** *** Bug 207034 has been marked as a duplicate of this bug. *** *** Bug 207152 has been marked as a duplicate of this bug. *** *** Bug 208082 has been marked as a duplicate of this bug. *** *** Bug 208304 has been marked as a duplicate of this bug. *** *** Bug 208428 has been marked as a duplicate of this bug. *** *** Bug 209391 has been marked as a duplicate of this bug. *** *** Bug 212176 has been marked as a duplicate of this bug. *** *** Bug 212242 has been marked as a duplicate of this bug. *** *** Bug 212327 has been marked as a duplicate of this bug. *** *** Bug 212505 has been marked as a duplicate of this bug. *** *** Bug 212560 has been marked as a duplicate of this bug. *** *** Bug 212635 has been marked as a duplicate of this bug. *** *** Bug 213755 has been marked as a duplicate of this bug. *** *** Bug 213993 has been marked as a duplicate of this bug. *** *** Bug 214015 has been marked as a duplicate of this bug. *** *** Bug 214128 has been marked as a duplicate of this bug. *** *** Bug 214517 has been marked as a duplicate of this bug. *** *** Bug 214712 has been marked as a duplicate of this bug. *** *** Bug 214867 has been marked as a duplicate of this bug. *** *** Bug 215436 has been marked as a duplicate of this bug. *** *** Bug 215678 has been marked as a duplicate of this bug. *** *** Bug 215683 has been marked as a duplicate of this bug. *** *** Bug 216329 has been marked as a duplicate of this bug. *** *** Bug 216384 has been marked as a duplicate of this bug. *** *** Bug 216431 has been marked as a duplicate of this bug. *** *** Bug 216699 has been marked as a duplicate of this bug. *** I decided to look through xinestream.cpp. I see many instances of "if (m_stream) {...}", and a few places that set m_stream to 0. However, there's no check for m_stream being 0 in XineStream::playbackFinished. Should there be one? Can anyone guarantee that m_stream will not be 0 there? *** Bug 216846 has been marked as a duplicate of this bug. *** *** Bug 217020 has been marked as a duplicate of this bug. *** *** Bug 217678 has been marked as a duplicate of this bug. *** *** Bug 217687 has been marked as a duplicate of this bug. *** *** Bug 217748 has been marked as a duplicate of this bug. *** *** Bug 218396 has been marked as a duplicate of this bug. *** *** Bug 218770 has been marked as a duplicate of this bug. *** We got a backtrace at https://launchpad.net/bugs/359966 that seems to indicate that xine_close is indeed trying to close a null stream. I would assume that this would mean that we could not ensure that m_stream always be around when playbackFinished() is called. In the case of the first backtrace, it looks like there's a point in time where when the code enters into the: if (!xine_open(m_stream, m_mrl.constData())) statement and unlocks the mutex right before calling playbackFinished which gives an albeit small window of opportunity for a separate thread to do something that deletes m_stream before the mutex is locked again in playbackFinished. It probably wouldn't hurt to check for m_stream's existence before deleting anyways; better safe than sorry. #0 0xb778b9e0 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0 #1 0xb25685ef in xine_close (stream=0x0) at xine.c:497 No locals. #2 0xb25c514f in Phonon::Xine::XineStream::playbackFinished (this=0x8d51720) at /build/buildd/phonon-4.3.1/xine/xinestream.cpp:792 locker = {{mtx = 0x8d5175d, val = 148182877}} #3 0xb25c6dfb in Phonon::Xine::XineStream::event (this=0x8d51720, ev=0xad0c558) at /build/buildd/phonon-4.3.1/xine/xinestream.cpp:1049 eventName = 0xb25f8f5a "GaplessSwitch" __PRETTY_FUNCTION__ = "virtual bool Phonon::Xine::XineStream::event(QEvent*)" #4 0xb6e72f2c in QApplicationPrivate::notify_helper (this=0x8d0f590, receiver=0x8d51720, e=0xad0c558) at kernel/qapplication.cpp:4084 consumed = <value optimized out> #5 0xb6e7b22e in QApplication::notify (this=0xbfa32724, receiver=0x8d51720, e=0xad0c558) at kernel/qapplication.cpp:3631 res = true #6 0xb7d6294d in KApplication::notify (this=0xbfa32724, receiver=0x8d51720, event=0xad0c558) at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307 No locals. #7 0xb69a1a3b in QCoreApplication::notifyInternal (this=0xbfa32724, receiver=0x8d51720, event=0xad0c558) at kernel/qcoreapplication.cpp:602 result = false cbdata = {0x8d51720, 0xad0c558, 0xb1b7205b} threadData = (QThreadData *) 0x8dd59a0 returnValue = <value optimized out> #8 0xb69a2695 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, (Backtrace limited to one thread and snipped, full trace at http://launchpadlibrarian.net/25281801/ThreadStacktrace.txt) *** Bug 214762 has been marked as a duplicate of this bug. *** SVN commit 1062986 by jmthomas: Check for the Xine stream's existence before closing it. In the sense that the stream shouldn't really be closed between the mutex close/open event() and playbackFinished() this bug is still present. It should not cause crashes now, however. CCBUG: 196320 M +6 -1 xinestream.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1062986 *** Bug 219418 has been marked as a duplicate of this bug. *** Is this still valid with Phonon 4.3.1 (KDE 4.4 beta 2)? If it is the same bug... got those crashes (about 4 of them) in a row in 10mins period of time, while doing different things (being away, browsing menus etc) http://pastebin.ca/1726685 http://pastebin.ca/1726686 http://pastebin.ca/1726688 Last one is with more debug packages installed, yet it didnt got more stars :( *** Bug 220078 has been marked as a duplicate of this bug. *** This bug is still valid with trunk. I only worked around the crash. *** Bug 221454 has been marked as a duplicate of this bug. *** *** Bug 221679 has been marked as a duplicate of this bug. *** *** Bug 223682 has been marked as a duplicate of this bug. *** *** Bug 224428 has been marked as a duplicate of this bug. *** *** Bug 224570 has been marked as a duplicate of this bug. *** *** Bug 224592 has been marked as a duplicate of this bug. *** *** Bug 224931 has been marked as a duplicate of this bug. *** *** Bug 225144 has been marked as a duplicate of this bug. *** *** Bug 225169 has been marked as a duplicate of this bug. *** *** Bug 225064 has been marked as a duplicate of this bug. *** *** Bug 225447 has been marked as a duplicate of this bug. *** *** Bug 225544 has been marked as a duplicate of this bug. *** *** Bug 225819 has been marked as a duplicate of this bug. *** *** Bug 225839 has been marked as a duplicate of this bug. *** *** Bug 212820 has been marked as a duplicate of this bug. *** *** Bug 220353 has been marked as a duplicate of this bug. *** *** Bug 220363 has been marked as a duplicate of this bug. *** *** Bug 226607 has been marked as a duplicate of this bug. *** *** Bug 226712 has been marked as a duplicate of this bug. *** *** Bug 227081 has been marked as a duplicate of this bug. *** *** Bug 227790 has been marked as a duplicate of this bug. *** *** Bug 228208 has been marked as a duplicate of this bug. *** *** Bug 228230 has been marked as a duplicate of this bug. *** *** Bug 228442 has been marked as a duplicate of this bug. *** *** Bug 228871 has been marked as a duplicate of this bug. *** *** Bug 229028 has been marked as a duplicate of this bug. *** *** Bug 229208 has been marked as a duplicate of this bug. *** *** Bug 229501 has been marked as a duplicate of this bug. *** *** Bug 230483 has been marked as a duplicate of this bug. *** *** Bug 230779 has been marked as a duplicate of this bug. *** *** Bug 230960 has been marked as a duplicate of this bug. *** *** Bug 232272 has been marked as a duplicate of this bug. *** *** Bug 233691 has been marked as a duplicate of this bug. *** *** Bug 234688 has been marked as a duplicate of this bug. *** "NEW status"? I also can confirm this old bug. *** Bug 193050 has been marked as a duplicate of this bug. *** *** Bug 237934 has been marked as a duplicate of this bug. *** *** Bug 238873 has been marked as a duplicate of this bug. *** *** Bug 240165 has been marked as a duplicate of this bug. *** *** Bug 240681 has been marked as a duplicate of this bug. *** Confirmed with Amarok 2.3.1 and KDE SC 4.4.4. *** Bug 241311 has been marked as a duplicate of this bug. *** *** Bug 242618 has been marked as a duplicate of this bug. *** *** Bug 243158 has been marked as a duplicate of this bug. *** *** Bug 243307 has been marked as a duplicate of this bug. *** *** Bug 244789 has been marked as a duplicate of this bug. *** *** Bug 245668 has been marked as a duplicate of this bug. *** *** Bug 246661 has been marked as a duplicate of this bug. *** (In reply to comment #108) > Confirmed with Amarok 2.3.1 and KDE SC 4.4.4. the status NEW means confirmed, else it would read UNCONFIRMED :) What steps will reproduce the problem? 1. Reproduce a stream. 2. Have any hiccup, that drops you out from the server. 3. Boom! What is the expected output? What do you see instead? Bangarang should fail gracefully. This is the backtrace. Application: bangarang (1.89 (2.0 Alpha)) KDE Platform Version: 4.5.00 (KDE 4.5.0) Qt Version: 4.7.0 Operating System: Linux 2.6.34.3-37.fc13.x86_64 x86_64 Distribution: "Fedora release 13 (Goddard)" -- Information about the crash: <En detalle, comente que estaba haciendo cuando la aplicación se cerró.> -- Backtrace: Application: Bangarang (bangarang), signal: Segmentation fault [Current thread is 1 (Thread 0x7f2b04cd4960 (LWP 24207))] Thread 7 (Thread 0x7f2af0182710 (LWP 24208)): #0 0x000000379140b729 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x000000379f2139b1 in metronom_sync_loop (this=0x1e135c0) at metronom.c:870 #2 0x0000003791407761 in start_thread () from /lib64/libpthread.so.0 #3 0x00000037908e151d in clone () from /lib64/libc.so.6 Thread 6 (Thread 0x7f2aef781710 (LWP 24209)): [KCrash Handler] #6 0x00007f2af8dfaa32 in QExplicitlySharedDataPointer (this=0x7f2ae8002390) at /usr/include/QtCore/qshareddata.h:162 #7 threadSafeObject (this=0x7f2ae8002390) at /usr/src/debug/phonon-4.4.2/xine/sinknode.h:76 #8 Phonon::Xine::XineStream::createStream (this=0x7f2ae8002390) at /usr/src/debug/phonon-4.4.2/xine/xinestream.cpp:515 #9 0x00007f2af8dfdf03 in Phonon::Xine::XineStream::event (this=0x7f2ae8002390, ev=0x2c33110) at /usr/src/debug/phonon-4.4.2/xine/xinestream.cpp:1244 #10 0x000000379ddb1ccc in QApplicationPrivate::notify_helper (this=0x1bb29d0, receiver=0x7f2ae8002390, e=0x2c33110) at kernel/qapplication.cpp:4389 #11 0x000000379ddb731d in QApplication::notify (this=<value optimized out>, receiver=0x7f2ae8002390, e=0x2c33110) at kernel/qapplication.cpp:4270 #12 0x000000379b5573dc in QCoreApplication::notifyInternal (this=0x7fff9fe2d930, receiver=0x7f2ae8002390, event=0x2c33110) at kernel/qcoreapplication.cpp:732 #13 0x000000379b55a9f2 in sendEvent (receiver=0x0, event_type=0, data=0x1c65ac0) at kernel/qcoreapplication.h:215 #14 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1c65ac0) at kernel/qcoreapplication.cpp:1373 #15 0x000000379b57f913 in sendPostedEvents (s=<value optimized out>) at kernel/qcoreapplication.h:220 #16 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276 #17 0x000000379203bd02 in g_main_dispatch (context=0x7f2ae80009b0) at gmain.c:1960 #18 IA__g_main_context_dispatch (context=0x7f2ae80009b0) at gmain.c:2513 #19 0x000000379203fae8 in g_main_context_iterate (context=0x7f2ae80009b0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2591 #20 0x000000379203fc9c in IA__g_main_context_iteration (context=0x7f2ae80009b0, may_block=1) at gmain.c:2654 #21 0x000000379b57f453 in QEventDispatcherGlib::processEvents (this=0x7f2ae80008c0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #22 0x000000379b556222 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149 #23 0x000000379b5564fc in QEventLoop::exec (this=0x7f2aef780b90, flags=...) at kernel/qeventloop.cpp:201 #24 0x000000379b46f8c0 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490 #25 0x00007f2af8df0b30 in Phonon::Xine::XineThread::run (this=0x1c5e7c0) at /usr/src/debug/phonon-4.4.2/xine/xinethread.cpp:143 #26 0x000000379b471e7e in QThreadPrivate::start (arg=0x1c5e7c0) at thread/qthread_unix.cpp:266 #27 0x0000003791407761 in start_thread () from /lib64/libpthread.so.0 #28 0x00000037908e151d in clone () from /lib64/libc.so.6 Thread 5 (Thread 0x7f2aee060710 (LWP 24211)): #0 0x00000037908da073 in select () from /lib64/libc.so.6 #1 0x000000379f23c145 in xine_usec_sleep (usec=<value optimized out>) at utils.c:481 #2 0x000000379f2215d9 in video_out_loop (this_gen=0x22e0260) at video_out.c:1246 #3 0x0000003791407761 in start_thread () from /lib64/libpthread.so.0 #4 0x00000037908e151d in clone () from /lib64/libc.so.6 Thread 4 (Thread 0x7f2aed45b710 (LWP 24212)): #0 0x00000037908d7e13 in poll () from /lib64/libc.so.6 #1 0x00000037a982cc0f in poll_func (ufds=0x7f2ae0001460, nfds=2, timeout=-1, userdata=0x2705df0) at pulse/thread-mainloop.c:75 #2 0x00000037a981cae6 in pa_mainloop_poll (m=0x2705cf0) at pulse/mainloop.c:879 #3 0x00000037a981dec9 in pa_mainloop_iterate (m=0x2705cf0, block=<value optimized out>, retval=0x0) at pulse/mainloop.c:961 #4 0x00000037a981df80 in pa_mainloop_run (m=0x2705cf0, retval=0x0) at pulse/mainloop.c:979 #5 0x00000037a982ca0b in thread (userdata=0x2704f80) at pulse/thread-mainloop.c:94 #6 0x00000037a9c38878 in internal_thread_func (userdata=0x2705ea0) at pulsecore/thread-posix.c:72 #7 0x0000003791407761 in start_thread () from /lib64/libpthread.so.0 #8 0x00000037908e151d in clone () from /lib64/libc.so.6 Thread 3 (Thread 0x7f2aeca5a710 (LWP 24213)): #0 0x000000379140b3bc in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x000000379f224753 in fifo_peek_int (this_gen=0x2709030) at audio_out.c:348 #2 fifo_peek (this_gen=0x2709030) at audio_out.c:388 #3 ao_loop (this_gen=0x2709030) at audio_out.c:1015 #4 0x0000003791407761 in start_thread () from /lib64/libpthread.so.0 #5 0x00000037908e151d in clone () from /lib64/libc.so.6 Thread 2 (Thread 0x7f2ae7fff710 (LWP 24216)): #0 0x000000379140b3bc in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x000000379f224753 in fifo_peek_int (this_gen=0x28c0050) at audio_out.c:348 #2 fifo_peek (this_gen=0x28c0050) at audio_out.c:388 #3 ao_loop (this_gen=0x28c0050) at audio_out.c:1015 #4 0x0000003791407761 in start_thread () from /lib64/libpthread.so.0 #5 0x00000037908e151d in clone () from /lib64/libc.so.6 Thread 1 (Thread 0x7f2b04cd4960 (LWP 24207)): #0 0x000000379140b729 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x000000379b471445 in thread_sleep (ti=0x7fff9fe2d600) at thread/qthread_unix.cpp:416 #2 0x000000379b4715b0 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:442 #3 0x00007f2af8e1455a in Phonon::Xine::Backend::~Backend (this=0x1d879d0, __in_chrg=<value optimized out>) at /usr/src/debug/phonon-4.4.2/xine/backend.cpp:111 #4 0x00007f2af8e14769 in Phonon::Xine::Backend::~Backend (this=0x1d879d0, __in_chrg=<value optimized out>) at /usr/src/debug/phonon-4.4.2/xine/backend.cpp:123 #5 0x00000037abc35167 in Phonon::FactoryPrivate::~FactoryPrivate (this=0x1c56650, __in_chrg=<value optimized out>) at /usr/src/debug/phonon-4.4.2/phonon/factory.cpp:218 #6 0x00000037abc352e9 in Phonon::FactoryPrivate::~FactoryPrivate (this=0x1c56650, __in_chrg=<value optimized out>) at /usr/src/debug/phonon-4.4.2/phonon/factory.cpp:222 #7 0x000000379b55775c in qt_call_post_routines () at kernel/qcoreapplication.cpp:203 #8 0x000000379ddbc6f8 in QApplication::~QApplication (this=0x7fff9fe2d930, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1044 #9 0x0000000000429ea5 in BangarangApplication::~BangarangApplication (this=0x7fff9fe2d930, __in_chrg=<value optimized out>) at /root/bangarang/src/bangarangapplication.cpp:213 #10 0x000000000045343a in main (argc=1, argv=<value optimized out>) at /root/bangarang/src/main.cpp:66 I got this backtrace with Bangarang, trying to play a stream there, and I strongly think that this has a relationship with this bug. Submitting. *** Bug 248934 has been marked as a duplicate of this bug. *** Created attachment 51486 [details]
New crash information added by DrKonqi
amarok (2.3.1) on KDE Platform 4.5.00 (KDE 4.5.0) using Qt 4.6.3
- What I was doing when the application crashed:
I was playing music from Jamendo and when he went to the next song, failed and was closed.
- Custom settings of the application:
Using list of songs from Jamendo and support in MySQL database
-- Backtrace (Reduced):
#7 0x00007f875b083b85 in _x_meta_info_get_public () from /usr/lib/libxine.so.1
#8 0x00007f875b2bfa6a in Phonon::Xine::XineStream::updateMetaData() () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#9 0x00007f875b2c25d3 in Phonon::Xine::XineStream::event(QEvent*) () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#10 0x00007f87718c4854 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#11 0x00007f87718c893a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
*** Bug 244519 has been marked as a duplicate of this bug. *** *** Bug 258142 has been marked as a duplicate of this bug. *** *** Bug 260894 has been marked as a duplicate of this bug. *** Please use another backend, the xine backend is deprecated as the upstream development is stalled. You can choose between the gstreamer backend or the vlc backend, both are actively developed and maintained. *** Bug 200702 has been marked as a duplicate of this bug. *** *** Bug 211303 has been marked as a duplicate of this bug. *** *** Bug 248823 has been marked as a duplicate of this bug. *** *** Bug 236342 has been marked as a duplicate of this bug. *** |