Bug 281312 - Deadlock in FAM/KDirWatch usage
Summary: Deadlock in FAM/KDirWatch usage
Status: RESOLVED UPSTREAM
Alias: None
Product: kdelibs
Classification: Unclassified
Component: kdecore (show other bugs)
Version: 4.8
Platform: Compiled Sources Linux
: VHI crash with 81 votes (vote)
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 277330 289891 290835 293646 294699 295607 300850 306172 324197 335258 353949 363105 (view as bug list)
Depends on:
Blocks: 308086
  Show dependency treegraph
 
Reported: 2011-09-04 11:44 UTC by Alex Merry
Modified: 2016-06-27 08:00 UTC (History)
27 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (14.32 KB, text/plain)
2014-04-15 19:00 UTC, Ambroz Bizjak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Merry 2011-09-04 11:44:17 UTC
Version:           unspecified (using Devel) 
OS:                Linux

[marked as "crash", on the basis that a deadlock amounts to the same thing]

Amarok has a potential deadlock (that I keep hitting) in its usage of FAM, through KDirWatch (nb: I'm actually using Gamin).

This happens pretty much every time for me when I exit Amarok, and sometimes when starting it (the latter particularly when I'm running strace on Gamin).

Backtrace from a deadlock on startup (Amarok has got to the point where it has displayed the GUI, but is completely frozen) is below.

Gamin is, at this point, blocking on a write to the socket it shares with Amarok (strace indicates it has written a load of stuff to Amarok which Amarok hasn't read, and is presumeably sitting in the socket buffer).  The write in Thread 8 is therefore blocking in return.  Meanwhile, Thread 1 is trying to deal with those incoming messages from Gamin, and is blocking on Thread 8's use of libfam.  Hence the deadlock.

Thread 10 (Thread 0x7f2f8eaae700 (LWP 24242)):
#0  0x00007f2fad600ff3 in poll () from /lib/libc.so.6
#1  0x00007f2fa62d97d4 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f2fa62d9d09 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f2fadf3d66e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f2fadf11a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f2fadf11c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f2fade2913f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f2fadef4aef in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#10 0x00007f2fad60925d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f2f8f2af700 (LWP 24258)):
#0  0x00007f2faad1bac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f2fade2c06b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f2faa0409b6 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1328910, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f2faa044b59 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0x00007f2faa040934 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x1328910, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0x00007f2faa044afb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#9  0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#10 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#11 0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#12 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#13 0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#14 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#15 0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#16 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#17 0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#18 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x12ff670, previous=0x170e0f0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#19 0x00007f2faa04269b in ThreadWeaver::ThreadRunHelper::run (this=0x7f2f8f2aee10, parent=0x1328910, th=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:87
#20 0x00007f2faa04294a in ThreadWeaver::Thread::run (this=0x12ff670) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:142
#21 0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#22 0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#23 0x00007f2fad60925d in clone () from /lib/libc.so.6
#24 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f2f8c44a700 (LWP 24259)):
#0  0x00007f2fad5fcfdd in write () from /lib/libc.so.6
#1  0x00007f2fa4ee889a in ?? () from /usr/lib/libfam.so.0
#2  0x00007f2fa4ee89a0 in ?? () from /usr/lib/libfam.so.0
#3  0x00007f2fa4ee9588 in FAMMonitorDirectory () from /usr/lib/libfam.so.0
#4  0x00007f2fae383b4c in KDirWatchPrivate::useFAM (this=0x162fc80, e=0x26d8d28) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:615
#5  0x00007f2fae385333 in KDirWatchPrivate::addWatch (this=0x162fc80, e=0x26d8d28) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:933
#6  0x00007f2fae38520f in KDirWatchPrivate::addEntry (this=0x162fc80, instance=0x15b9df0, _path="/home/music/Dionne_Warwick", sub_entry=0x0, isDir=true, watchModes=...) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:891
#7  0x00007f2fae38518c in KDirWatchPrivate::addEntry (this=0x162fc80, instance=0x15b9df0, _path="/home/music", sub_entry=0x0, isDir=true, watchModes=...) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:887
#8  0x00007f2fae389446 in KDirWatch::addDir (this=0x15b9df0, _path="/home/music", watchModes=...) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:1770
#9  0x00007f2f8f48afda in DirWatchJob::run (this=0x2591350) at /home/kde-devel/src/amarok/src/core-impl/collections/db/ScanManager.cpp:385
#10 0x00007f2faa043208 in ThreadWeaver::JobRunHelper::runTheJob (this=0x7f2f8c449d50, th=0x14ca320, job=0x2591350) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Job.cpp:106
#11 0x00007f2faa04346e in ThreadWeaver::Job::execute (this=0x2591350, th=0x14ca320) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Job.cpp:135
#12 0x00007f2faa0426f3 in ThreadWeaver::ThreadRunHelper::run (this=0x7f2f8c449e10, parent=0x1328910, th=0x14ca320) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:95
#13 0x00007f2faa04294a in ThreadWeaver::Thread::run (this=0x14ca320) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:142
#14 0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#15 0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#16 0x00007f2fad60925d in clone () from /lib/libc.so.6
#17 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f2f8aff8700 (LWP 24260)):
#0  0x00007f2faad1bac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f2fade2c06b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f2faa0409b6 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1328910, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f2faa044b59 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x1412f80, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0x00007f2faa040934 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x1328910, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0x00007f2faa044afb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x1775080, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x1775080, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#9  0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#10 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x1775080, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#11 0x00007f2faa044b26 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#12 0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x1775080, previous=0x178eab0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#13 0x00007f2faa04269b in ThreadWeaver::ThreadRunHelper::run (this=0x7f2f8aff7e10, parent=0x1328910, th=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:87
#14 0x00007f2faa04294a in ThreadWeaver::Thread::run (this=0x1775080) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:142
#15 0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#16 0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#17 0x00007f2fad60925d in clone () from /lib/libc.so.6
#18 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f2f8a5e9700 (LWP 24261)):
#0  0x00007f2faad1bac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f2fade2c06b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f2faa0409b6 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1328910, th=0x172eaa0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f2faa044b59 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x1412f80, th=0x172eaa0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0x00007f2faa040934 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x1328910, th=0x172eaa0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0x00007f2faa044afb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1412f80, th=0x172eaa0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f2faa0408fb in ThreadWeaver::WeaverImpl::applyForWork (this=0x1328910, th=0x172eaa0, previous=0x2344870) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0x00007f2faa04269b in ThreadWeaver::ThreadRunHelper::run (this=0x7f2f8a5e8e10, parent=0x1328910, th=0x172eaa0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:87
#8  0x00007f2faa04294a in ThreadWeaver::Thread::run (this=0x172eaa0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:142
#9  0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#11 0x00007f2fad60925d in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f2f89798700 (LWP 24262)):
#0  0x00007f2faad1bac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f2fa1b835ba in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007f2fa1b836a9 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#4  0x00007f2fad60925d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f2f88e97700 (LWP 24263)):
#0  0x00007f2fad600ff3 in poll () from /lib/libc.so.6
#1  0x00007f2fa62d97d4 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f2fa62d9d09 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f2fadf3d606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f2fadf11a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f2fadf11c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f2fade2913f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#9  0x00007f2fad60925d in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f2f87577700 (LWP 24266)):
#0  0x00007f2fad603093 in select () from /lib/libc.so.6
#1  0x00007f2fadef44a1 in ?? () from /usr/lib/libQtCore.so.4
#2  0x00007f2fade2bbc5 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#4  0x00007f2fad60925d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f2f86d76700 (LWP 24268)):
#0  0x00007f2faad1bac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f2fa8f7cf72 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007f2fa8f7cfa9 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007f2faad17d60 in start_thread () from /lib/libpthread.so.0
#4  0x00007f2fad60925d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f2fb0ec8780 (LWP 24233)):
#0  0x00007f2faad1e47c in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x00007f2faad19e80 in _L_lock_530 () from /lib/libpthread.so.0
#2  0x00007f2faad19d19 in pthread_mutex_lock () from /lib/libpthread.so.0
#3  0x00007f2fa4ee9a03 in FAMPending () from /usr/lib/libfam.so.0
#4  0x00007f2fae387bde in KDirWatchPrivate::famEventReceived (this=0x162fc80) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:1501
#5  0x00007f2fae389eff in KDirWatchPrivate::qt_metacall (this=0x162fc80, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff54703230) at /home/kde-devel/build/kdelibs/kdecore/kdirwatch_p.moc:80
#6  0x00007f2fadf255ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#7  0x00007f2fadf6ec3e in QSocketNotifier::activated(int) () from /usr/lib/libQtCore.so.4
#8  0x00007f2fadf2d29b in QSocketNotifier::event(QEvent*) () from /usr/lib/libQtCore.so.4
#9  0x00007f2fae957ae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#10 0x00007f2fae95c951 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#11 0x00007f2fb08233cb in KApplication::notify (this=0x7fff54703a10, receiver=0x162fd60, event=0x7fff54703750) at /home/kde-devel/src/kdelibs/kdeui/kernel/kapplication.cpp:311
#12 0x00007f2fadf1289c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#13 0x00007f2fadf3cce7 in ?? () from /usr/lib/libQtCore.so.4
#14 0x00007f2fa62d929d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#15 0x00007f2fa62d9a78 in ?? () from /usr/lib/libglib-2.0.so.0
#16 0x00007f2fa62d9d09 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#17 0x00007f2fadf3d606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#18 0x00007f2fae9faeee in ?? () from /usr/lib/libQtGui.so.4
#19 0x00007f2fadf11a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#20 0x00007f2fadf11c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#21 0x00007f2fadf15eab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#22 0x000000000040cf3a in main (argc=2, argv=0x7fff54706078) at /home/kde-devel/src/amarok/src/main.cpp:291

Reproducible: Sometimes

Steps to Reproduce:
Quit Amarok after having it open for a couple of minutes.

Actual Results:  
Amarok's GUI disappears, but the process hangs around.

Expected Results:  
Amarok should exit properly.
Comment 1 Alex Merry 2011-09-04 11:49:26 UTC
And a backtrace from the deadlock-at-exit.  This one appears to be different to the other one - in this case, the deadlock isn't happening between threads.  Instead, FAMCancelMonitor is blocking directly on a write.  This could be a bug in libfam - FAMCancelMonitor should probably flush the queue of incoming messages before writing.


Thread 17 (Thread 0x7f680615f700 (LWP 29739)):
#0  0x00007f6824cb1ff3 in poll () from /lib/libc.so.6
#1  0x00007f681d98a7d4 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f681d98ad09 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f68255ee606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f68255c2a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f68255c2c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f68254da13f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f68255a5aef in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f68254dcbc5 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#10 0x00007f6824cba25d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

[snip ThreadWeaver threads waiting for jobs]

Thread 12 (Thread 0x7f6800e49700 (LWP 29745)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f68192345ba in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007f68192346a9 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#4  0x00007f6824cba25d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f6800548700 (LWP 29746)):
#0  0x00007f6824cb1ff3 in poll () from /lib/libc.so.6
#1  0x00007f681d98a7d4 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f681d98ad09 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f68255ee606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f68255c2a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f68255c2c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f68254da13f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f68254dcbc5 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#9  0x00007f6824cba25d in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f67fec28700 (LWP 29749)):
#0  0x00007f6824cb4093 in select () from /lib/libc.so.6
#1  0x00007f68255a54a1 in ?? () from /usr/lib/libQtCore.so.4
#2  0x00007f68254dcbc5 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#4  0x00007f6824cba25d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f67fe427700 (LWP 29751)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f682062df72 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007f682062dfa9 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#4  0x00007f6824cba25d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f67f4043700 (LWP 29784)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f6808fd988d in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#2  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#3  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#4  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#5  0x00007f67f2e3758d in ?? () from /usr/lib/gstreamer-0.10/libgstvorbis.so
#6  0x00007f67f2e386d3 in ?? () from /usr/lib/gstreamer-0.10/libgstvorbis.so
#7  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#8  0x00007f6808fd5dd0 in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#9  0x00007f680b474940 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#10 0x00007f681d9b2340 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#13 0x00007f6824cba25d in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f67f3842700 (LWP 29785)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f680b1dd488 in gst_data_queue_push () from /usr/lib/libgstbase-0.10.so.0
#2  0x00007f6808fd53c9 in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#3  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#4  0x00007f67f448132e in ?? () from /usr/lib/gstreamer-0.10/libgstogg.so
#5  0x00007f67f4484d7f in ?? () from /usr/lib/gstreamer-0.10/libgstogg.so
#6  0x00007f67f4485b12 in ?? () from /usr/lib/gstreamer-0.10/libgstogg.so
#7  0x00007f67f448861d in ?? () from /usr/lib/gstreamer-0.10/libgstogg.so
#8  0x00007f67f4488b4a in ?? () from /usr/lib/gstreamer-0.10/libgstogg.so
#9  0x00007f680b474940 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#10 0x00007f681d9b2340 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#13 0x00007f6824cba25d in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f67f2e31700 (LWP 29786)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f6809621319 in ?? () from /usr/lib/libgstaudio-0.10.so.0
#2  0x00007f6809621531 in ?? () from /usr/lib/libgstaudio-0.10.so.0
#3  0x00007f68096279be in ?? () from /usr/lib/libgstaudio-0.10.so.0
#4  0x00007f680b1c2ad7 in ?? () from /usr/lib/libgstbase-0.10.so.0
#5  0x00007f680b1c531f in ?? () from /usr/lib/libgstbase-0.10.so.0
#6  0x00007f680b1c5677 in ?? () from /usr/lib/libgstbase-0.10.so.0
#7  0x00007f680b1c5a5f in ?? () from /usr/lib/libgstbase-0.10.so.0
#8  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#9  0x00007f680b1d2db7 in ?? () from /usr/lib/libgstbase-0.10.so.0
#10 0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#11 0x00007f680b1d2db7 in ?? () from /usr/lib/libgstbase-0.10.so.0
#12 0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#13 0x00007f680b1d2db7 in ?? () from /usr/lib/libgstbase-0.10.so.0
#14 0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#15 0x00007f6808fda79a in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#16 0x00007f680b474940 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#17 0x00007f681d9b2340 in ?? () from /usr/lib/libglib-2.0.so.0
#18 0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#19 0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#20 0x00007f6824cba25d in clone () from /lib/libc.so.6
#21 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f67f2630700 (LWP 29787)):
#0  0x00007f6824cb20c3 in ppoll () from /lib/libc.so.6
#1  0x00007f680b45a795 in gst_poll_wait () from /usr/lib/libgstreamer-0.10.so.0
#2  0x00007f680b46d450 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#3  0x00007f680b429c34 in gst_clock_id_wait () from /usr/lib/libgstreamer-0.10.so.0
#4  0x00007f680b1c0f8d in gst_base_sink_wait_clock () from /usr/lib/libgstbase-0.10.so.0
#5  0x00007f680b1c38ec in ?? () from /usr/lib/libgstbase-0.10.so.0
#6  0x00007f680b1c531f in ?? () from /usr/lib/libgstbase-0.10.so.0
#7  0x00007f680b1c5677 in ?? () from /usr/lib/libgstbase-0.10.so.0
#8  0x00007f680b1c5a5f in ?? () from /usr/lib/libgstbase-0.10.so.0
#9  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#10 0x00007f680b1d2db7 in ?? () from /usr/lib/libgstbase-0.10.so.0
#11 0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#12 0x00007f680b1d2db7 in ?? () from /usr/lib/libgstbase-0.10.so.0
#13 0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#14 0x00007f6808fda79a in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#15 0x00007f680b474940 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#16 0x00007f681d9b2340 in ?? () from /usr/lib/libglib-2.0.so.0
#17 0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#18 0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#19 0x00007f6824cba25d in clone () from /lib/libc.so.6
#20 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f67f1e2f700 (LWP 29788)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f6808fd988d in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#2  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#3  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#4  0x00007f6808fe42b0 in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#5  0x00007f6808fe46ff in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#6  0x00007f680b44e3ac in gst_pad_push () from /usr/lib/libgstreamer-0.10.so.0
#7  0x00007f6808fda79a in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#8  0x00007f680b474940 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#9  0x00007f681d9b2340 in ?? () from /usr/lib/libglib-2.0.so.0
#10 0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#12 0x00007f6824cba25d in clone () from /lib/libc.so.6
#13 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f67f162e700 (LWP 29789)):
#0  0x00007f68223ccac4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f6808fda0e4 in ?? () from /usr/lib/gstreamer-0.10/libgstcoreelements.so
#2  0x00007f680b474940 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#3  0x00007f681d9b2340 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#6  0x00007f6824cba25d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f67f0e2d700 (LWP 29791)):
#0  0x00007f6824cb1ff3 in poll () from /lib/libc.so.6
#1  0x00007f680bb48023 in snd1_pcm_wait_nocheck (pcm=0x2c41390, timeout=40) at pcm.c:2367
#2  0x00007f680bb47ee4 in snd_pcm_wait (pcm=0x2c41390, timeout=40) at pcm.c:2338
#3  0x00007f680984353a in ?? () from /usr/lib/gstreamer-0.10/libgstalsa.so
#4  0x00007f680962eb58 in ?? () from /usr/lib/libgstaudio-0.10.so.0
#5  0x00007f681d9afd16 in ?? () from /usr/lib/libglib-2.0.so.0
#6  0x00007f68223c8d60 in start_thread () from /lib/libpthread.so.0
#7  0x00007f6824cba25d in clone () from /lib/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f6828579780 (LWP 29733)):
#0  0x00007f6824cadfdd in write () from /lib/libc.so.6
#1  0x00007f681c59989a in ?? () from /usr/lib/libfam.so.0
#2  0x00007f681c5999a0 in ?? () from /usr/lib/libfam.so.0
#3  0x00007f681c59ab0f in FAMCancelMonitor () from /usr/lib/libfam.so.0
#4  0x00007f6825a363be in KDirWatchPrivate::removeWatch (this=0x1a759c0, e=0x2bed908) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:946
#5  0x00007f6825a366fc in KDirWatchPrivate::removeEntry (this=0x1a759c0, instance=0x2a752e0, e=0x2bed908, sub_entry=0x0) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:1006
#6  0x00007f6825a365d0 in KDirWatchPrivate::removeEntry (this=0x1a759c0, instance=0x2a752e0, _path="/home/music/Sum_41", sub_entry=0x0) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:982
#7  0x00007f6825a36b4c in KDirWatchPrivate::removeEntries (this=0x1a759c0, instance=0x2a752e0) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:1059
#8  0x00007f6825a3a351 in KDirWatch::~KDirWatch (this=0x2a752e0, __in_chrg=<optimized out>) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:1759
#9  0x00007f6825a3a3da in KDirWatch::~KDirWatch (this=0x2a752e0, __in_chrg=<optimized out>) at /home/kde-devel/src/kdelibs/kdecore/io/kdirwatch.cpp:1766
#10 0x00007f68255d54a5 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#11 0x00007f68255daa79 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#12 0x00007f68216f40cb in ThreadWeaver::Job::~Job (this=0x2796600, __in_chrg=<optimized out>) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Job.cpp:82
#13 0x00007f6806b41ade in DirWatchJob::~DirWatchJob (this=0x2796600, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/ScanManager.h:172
#14 0x00007f6806b41b10 in DirWatchJob::~DirWatchJob (this=0x2796600, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/ScanManager.h:172
#15 0x00007f68255d54a5 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#16 0x00007f68255daa79 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#17 0x00007f6806b3ad00 in ScanManager::~ScanManager (this=0x16934a0, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/ScanManager.cpp:84
#18 0x00007f6806b3ad32 in ScanManager::~ScanManager (this=0x16934a0, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/ScanManager.cpp:89
#19 0x00007f68255d54a5 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#20 0x00007f68255daa79 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#21 0x00007f68279ebf44 in Collections::Collection::~Collection (this=0x1663290, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core/collections/Collection.cpp:79
#22 0x00007f6806b41c48 in Collections::DatabaseCollection::~DatabaseCollection (this=0x1663290, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/DatabaseCollection.cpp:30
#23 0x00007f6806b47db8 in Collections::SqlCollection::~SqlCollection (this=0x1663290, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/sql/SqlCollection.cpp:179
#24 0x00007f6806b47df6 in Collections::SqlCollection::~SqlCollection (this=0x1663290, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/db/sql/SqlCollection.cpp:191
#25 0x00007f6827268022 in qDeleteAll<QList<Collections::Collection*>::const_iterator> (begin=..., end=...) at /usr/include/QtCore/qalgorithms.h:322
#26 0x00007f6827266cf6 in qDeleteAll<SmartPointerList<Collections::Collection> > (c=...) at /usr/include/QtCore/qalgorithms.h:330
#27 0x00007f682726218d in CollectionManager::~CollectionManager (this=0x1621cd0, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/support/CollectionManager.cpp:137
#28 0x00007f6827262294 in CollectionManager::~CollectionManager (this=0x1621cd0, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/core-impl/collections/support/CollectionManager.cpp:140
#29 0x00007f6827261f15 in CollectionManager::destroy () at /home/kde-devel/src/amarok/src/core-impl/collections/support/CollectionManager.cpp:107
#30 0x00007f682737f5bc in App::~App (this=0x7fff168eed20, __in_chrg=<optimized out>) at /home/kde-devel/src/amarok/src/App.cpp:248
#31 0x000000000040cf4b in main (argc=2, argv=0x7fff168f1388) at /home/kde-devel/src/amarok/src/main.cpp:289
Comment 2 Myriam Schweingruber 2011-11-12 10:32:59 UTC
*** Bug 277330 has been marked as a duplicate of this bug. ***
Comment 3 Marian Kyral 2011-12-05 06:56:42 UTC
This happen to me a quite frequently after upgrade KDE to version 4.8. After start, Amarok plays one song and hangs. It is not possible to quit Amarok, I have to kill it.

The backtrace of running Amarok. Amarok compiled from git yesterday.

(gdb) bt full
#0  0x00007ff805e7dedd in read () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007ff7ff32f171 in gamin_read_data () from /usr/lib64/libfam.so.0
No symbol table info available.
#2  0x00007ff7ff32fb4d in FAMNextEvent () from /usr/lib64/libfam.so.0
No symbol table info available.
#3  0x00007ff806c0b877 in KDirWatchPrivate::famEventReceived (this=0x2bec7b0) at /var/tmp/portage/kde-base/kdelibs-4.7.80/work/kdelibs-4.7.80/kdecore/io/kdirwatch.cpp:1510
        fe = {fc = 0x2bec840, fr = {reqnum = 579}, hostname = 0x0, filename = "/mnt/sdd/data/music/N/Nohavica&Plihal/Hulin_1994_-_koncert", '\000' <repeats 4037 times>, userdata = 0x3eed518, code = FAMEndExist}
        __PRETTY_FUNCTION__ = "void KDirWatchPrivate::famEventReceived()"
#4  0x00007ff806c0d2ec in KDirWatchPrivate::qt_metacall (this=0x2bec7b0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff092a5460) at /var/tmp/portage/kde-base/kdelibs-4.7.80/work/kdelibs-4.7.80_build/kdecore/kdirwatch_p.moc:80
No locals.
#5  0x00007ff8067d2867 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#6  0x00007ff80681a81e in QSocketNotifier::activated(int) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#7  0x00007ff8067d8ecb in QSocketNotifier::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#8  0x00007ff8071afd04 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#9  0x00007ff8071b487a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#10 0x00007ff808efaa72 in KApplication::notify (this=0x7fff092a5e10, receiver=0x2bebb10, event=0x7fff092a5b30) at /var/tmp/portage/kde-base/kdelibs-4.7.80/work/kdelibs-4.7.80/kdeui/kernel/kapplication.cpp:311
        t = <optimized out>
#11 0x00007ff8067be09b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#12 0x00007ff8067e89a8 in socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#13 0x00007ff8008e8072 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#14 0x00007ff8008e8868 in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#15 0x00007ff8008e8a41 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#16 0x00007ff8067e8fef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#17 0x00007ff8072553fe in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
No symbol table info available.
#18 0x00007ff8067bd442 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#19 0x00007ff8067bd684 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#20 0x00007ff8067c1b0b in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
No symbol table info available.
#21 0x000000000040a831 in main (argc=1, argv=0x7fff092a85a8) at /var/tmp/portage/media-sound/amarok-9999/work/amarok-9999/src/main.cpp:310
        aboutData = {d = 0x1fc7590}
        debugColorsEnabled = <optimized out>
        debugEnabled = false
        app = {<KUniqueApplication> = {<KApplication> = {<QApplication> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x7ff807c2f480, stringdata = 0x7ff8090757c0 "KApplication", data = 0x7ff809075960, extradata = 0x0}}, 
              static loadedByKdeinit = false, static KApp = 0x7fff092a5e10, d = 0x203e5b0}, static staticMetaObject = {d = {superdata = 0x7ff809384060, stringdata = 0x7ff809076260 "KUniqueApplication", data = 0x7ff809076360, extradata = 0x0}}, d = 0x2125ff0}, 
          static staticMetaObject = {d = {superdata = 0x7ff809384200, stringdata = 0x7ff8085cd4c0 "App", data = 0x7ff8085cd6c0, extradata = 0x0}}, m_isUniqueInstance = false, m_mainWindow = {d = 0x262e270, value = 0x263b000}, m_tray = 0x2f9d710, 
          m_mediaDeviceManager = 0x0, static s_delayedAmarokUrls = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 25869}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x6145c0}, d = 0x6145c0}}, <No data fields>}}
        args = 0x1fe04c0
        startFlag = 0
Comment 4 Christoph Feck 2011-12-22 20:52:49 UTC
Would it mean KDirWatch is not thread-safe in this case?
Comment 5 Myriam Schweingruber 2011-12-27 19:41:10 UTC
*** Bug 289891 has been marked as a duplicate of this bug. ***
Comment 6 Myriam Schweingruber 2012-01-30 07:12:49 UTC
*** Bug 290835 has been marked as a duplicate of this bug. ***
Comment 7 Myriam Schweingruber 2012-02-23 17:30:47 UTC
*** Bug 294699 has been marked as a duplicate of this bug. ***
Comment 8 Myriam Schweingruber 2012-03-10 10:52:17 UTC
*** Bug 295607 has been marked as a duplicate of this bug. ***
Comment 9 Myk Taylor 2012-03-21 17:36:59 UTC
I have some log messages (from 2.4.3) from the time of the crash that may be helpful:

amarok(6454)/kio (KDirWatch) KDirWatchPrivate::famEventReceived: FAM connection problem, switching to polling. 
QSocketNotifier: Invalid socket 5 and type 'Read', disabling...
amarok: Fatal IO error: client killed
KCrash: Application 'amarok' crashing...

2.5.0 still crashes, but doesn't leave any log messages.  Turning off "watch folders for changes" avoids the crash.  I use famd, not gamin.
Comment 10 Matěj Laitl 2012-05-08 18:33:20 UTC
Hmm, I don't think this is an Amarok bug. The code clearly deadlocks under KDirWatch and the documentation doesn't mention anything about threads, so let's assume KDirWatch class is re-entrant but not thread-safe. (e.g. safe to call from different threads as long as each thread operates on its own object)

Reporters, have you tried using inotify backend (which should be superior to FAM one) in KDirWatch?
Comment 11 Igor Poboiko 2012-05-08 20:31:47 UTC
As for me, I didn't. But I can try if you tell me how can I do it :)
Comment 12 Matěj Laitl 2012-05-09 09:16:20 UTC
(In reply to comment #11)
> As for me, I didn't. But I can try if you tell me how can I do it :)

First, fire up kdebugdialog and enable debugging for code 7001 (KDirWatch). Then restart Amarok and watch ~/.xsession-errors for KDirWatch messages. Mine says:

$ grep KDirWatch ~/.xsession-errors | grep -v addEntry
amarok(4690)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: INotify available:  true

KDirWatch should use INotify by default on all Linuxen that support it. (must be enabled in kernel, all sane distros enable it)
Comment 13 Henning Becker 2012-05-09 10:58:35 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > As for me, I didn't. But I can try if you tell me how can I do it :)
> 
> First, fire up kdebugdialog and enable debugging for code 7001 (KDirWatch).
> Then restart Amarok and watch ~/.xsession-errors for KDirWatch messages.
> Mine says:
> 
> $ grep KDirWatch ~/.xsession-errors | grep -v addEntry
> amarok(4690)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: INotify
> available:  true
> 
> KDirWatch should use INotify by default on all Linuxen that support it.
> (must be enabled in kernel, all sane distros enable it)

Hallo Matej,
thanks for your hint, how to debug KDirWatch.
I found out, that amarok exceeded the inotify max_user_watches, which
was set to 65536 in /etc/sysctl.conf. So, KDirWatch switched to FAM, which
caused the deadlock.

Increasing the number in /etc/sysctl.conf or rather in /proc/sys/fs/inotify/max_user_watches
seems to solve the issue for me.

Nevertheless there is a bug and presumably it's in KDirWatch.

Thanks,
Henning
Comment 14 Matěj Laitl 2012-05-09 11:46:28 UTC
Reassigning to kdelibs. Guys, I think FAM backed in KDirWatch is to blame here. Reporters, kdelibs folks will probably want to know whether newest kdelibs 4.8.3 are affected.

A workaround for Amarok is to raise max_user_watches in /etc/sysctl.conf to something really big. See http://www.afiestas.org/nepomuk-is-not-fast-is-instant/
Comment 15 Rex Dieter 2012-05-09 13:33:19 UTC
fyi too, gamin has some deadlocks of it's own, see
https://bugzilla.gnome.org/show_bug.cgi?id=667230
https://bugzilla.gnome.org/show_bug.cgi?id=669292

I'd encourage folks experiencing this to poke your distro gamin maintainers to consider applying one of the patches referenced above.
Comment 16 Henning Becker 2012-05-09 22:05:33 UTC
The problem still occures with kdelibs 4.8.3.

If time allows, I will test the mentioned patches.
Comment 17 Matěj Laitl 2012-05-11 10:30:29 UTC
*** Bug 293646 has been marked as a duplicate of this bug. ***
Comment 18 Andreas Pakulat 2012-05-14 13:47:00 UTC
Problems with FAM/gamin also affect arbitrary non-KDE apps that want to integrate into KDE. For example my Google Chrome regularly fails to give me a save-file-dialog, since its using kdialog for that in a KDE4 environment and kdialog uses KFileDialog, which in turn starts FAM. For me this hangs in FAMOpen, no idea how to trigger that.
Comment 19 Myriam Schweingruber 2012-06-04 07:33:27 UTC
*** Bug 300850 has been marked as a duplicate of this bug. ***
Comment 20 Andreas Hartmetz 2012-06-26 15:33:58 UTC
AFAIK KDirWatch on FAM has never worked  well.
We had really bad problems with KDirWatch crashing kded4 in the time before the 4.0 release. Somebody fixed a typo in a preprocessor statement, which made FAM the default backend, which seems to have been the intention at some point, but didn't do anything due to the typo.
So we explicitly made inotify the default backend. FAM has not been fixed.
Comment 21 Rex Dieter 2012-06-26 15:49:55 UTC
Re: comment #20
Andreas, when you say "we", to whom are you referring exactly?
Comment 22 Andreas Hartmetz 2012-06-26 19:11:48 UTC
(In reply to comment #21)
> Re: comment #20
> Andreas, when you say "we", to whom are you referring exactly?

KDE(libs) developers. I haven't done much in a while, but I was there at the time.
Comment 23 Andreas Hartmetz 2012-06-26 19:16:28 UTC
Oops, it looks like dfaure has improved FAM support in the meantime. It has never been the default, though, and I still wouldn't trust is as much as inotify.
Comment 24 Andy Kelk 2012-08-01 09:47:12 UTC
Any advice on how to force KDirWatch to use iNotify instead of FAM? Amarok is unusable for me right now as it just deadlocks every time it tries to scan the collection.

Have tried setting all of the following in /etc/sysctl.conf but with no joy:

fs.inotify.max_user_watches = 1048576
fs.inotify.max_queued_events = 1048576
fs.inotify.max_user_instances = 1024
Comment 25 Myriam Schweingruber 2012-09-10 02:15:28 UTC
*** Bug 306172 has been marked as a duplicate of this bug. ***
Comment 26 sombragris 2012-09-23 01:00:56 UTC
Whoa, this bug is nasty! Especially from the POV of a regular user, who would tend to blame the application.

I can confirm this bug is alive and well in Slackware 14.0 RC5 (Slackware-current) x86-64 using KDE 4.9.1.

Killing the gam_server process usually restores functionality. Meanwhile, you have a lot of hung apps you thought exited a long time before, and newer apps unable to start.

I understand this is not exactly KDE stuff but if you can fix this it would be greatly appreciated. Thanks!
Comment 27 Andreas Hartmetz 2012-09-23 15:46:52 UTC
The config entry that sets the default backend for non-NFS directories is, in $KDEHOME/share/config/kdeglobals:

[DirWatch]
PreferredMethod=inotify (or Fam or Stat)

and for NFS directories:
nfsPreferredMethod=inotify (or Fam or Stat)

Note that $KDEHOME is usually $HOME/.kde. Also note that the default for non-NFS mounts is already inotify, so either your distro sets something, possibly in /etc/ from where it cascades into your user config (you can override it), or you are using NFS mounts. inotify doesn't work for NFS, so you could try setting
nfsPreferredMethod=Stat
which uses "manual" polling. You can set the polling interval in milliseconds using
NFSPollInterval=12345 (the default is 5000).

Is anyone having problems on Linux kernels with working inotify support (>2.6.14)? That is where inotify should be used by default.
Comment 28 sombragris 2012-09-23 16:33:47 UTC
In my kdeglobals there is no [DirWatch] entry, so it's using a default value. Even so, I'm being affected by this bug.
Comment 29 Mauren Berti 2012-09-23 17:18:37 UTC
(In reply to comment #28)
> In my kdeglobals there is no [DirWatch] entry, so it's using a default
> value. Even so, I'm being affected by this bug.

My file also didn't have this entry. I'm using Fedora 17 with Linux version 3.5.3-1. My KDE version is 4.8.5.
Comment 30 sombragris 2012-09-25 13:31:46 UTC
My distribution (Slackware64-current, right now is 14.0 RC5) issued a patch for gamin that it's supposed to fix the issue. So far, it seems to work.
Comment 31 Mauren Berti 2012-09-30 19:14:57 UTC
After update to KDE 4.9.1, I tried to use Amarok and it stopped playback after the second song in playlist. When I hit play, it crashed with a SIGSEGV.
Stacktrace follows:
Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7fdd83ea2880 (LWP 25894))]

Thread 11 (Thread 0x7fdd63dbb700 (LWP 25907)):
#0  0x00000035a90e8bcf in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00000035ab447af4 in g_main_context_poll (n_fds=1, fds=0x7fdd5c001c30, timeout=-1, context=0x7fdd5c0009e0, priority=<optimized out>) at gmain.c:3440
#2  g_main_context_iterate (context=context@entry=0x7fdd5c0009e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3141
#3  0x00000035ab447c14 in g_main_context_iteration (context=0x7fdd5c0009e0, may_block=1) at gmain.c:3207
#4  0x00000035b15a4506 in QEventDispatcherGlib::processEvents (this=0x7fdd5c000900, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00000035b157513f in QEventLoop::processEvents (this=this@entry=0x7fdd63dbacf0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00000035b15753c8 in QEventLoop::exec (this=0x7fdd63dbacf0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00000035b1478650 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00000035b1555b4f in QInotifyFileSystemWatcherEngine::run (this=0x1e57f90) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00000035b147b5eb in QThreadPrivate::start (arg=0x1e57f90) at thread/qthread_unix.cpp:307
#10 0x00000035a9407d14 in start_thread (arg=0x7fdd63dbb700) at pthread_create.c:309
#11 0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 10 (Thread 0x7fdd62012700 (LWP 25910)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00000035b147baeb in wait (time=18446744073709551615, this=0x3befb30) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2455520, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000035c4a0aa81 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x3befa10, th=0x2983d00) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00000035c4a0d2cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2983d00) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00000035c4a0d2e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2983d00) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00000035c4a0d2e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2983d00) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00000035c4a0c13f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fdd62011d20, parent=0x3befa10, th=th@entry=0x2983d00) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:87
#8  0x00000035c4a0c1cb in ThreadWeaver::Thread::run (this=0x2983d00) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:142
#9  0x00000035b147b5eb in QThreadPrivate::start (arg=0x2983d00) at thread/qthread_unix.cpp:307
#10 0x00000035a9407d14 in start_thread (arg=0x7fdd62012700) at pthread_create.c:309
#11 0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 9 (Thread 0x7fdd61811700 (LWP 25911)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00000035b147baeb in wait (time=18446744073709551615, this=0x3befb30) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2455520, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000035c4a0aa81 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x3befa10, th=0x2d1fed0) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00000035c4a0d2cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2d1fed0) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00000035c4a0c13f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fdd61810d20, parent=0x3befa10, th=th@entry=0x2d1fed0) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:87
#6  0x00000035c4a0c1cb in ThreadWeaver::Thread::run (this=0x2d1fed0) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:142
#7  0x00000035b147b5eb in QThreadPrivate::start (arg=0x2d1fed0) at thread/qthread_unix.cpp:307
#8  0x00000035a9407d14 in start_thread (arg=0x7fdd61811700) at pthread_create.c:309
#9  0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 8 (Thread 0x7fdd61010700 (LWP 25912)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00000035b147baeb in wait (time=18446744073709551615, this=0x3befb30) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2455520, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000035c4a0aa81 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x3befa10, th=0x2f2fa80) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00000035c4a0d2cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2f2fa80) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00000035c4a0d2e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2f2fa80) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00000035c4a0d2e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x2f2fa80) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00000035c4a0c13f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fdd6100fd20, parent=0x3befa10, th=th@entry=0x2f2fa80) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:87
#8  0x00000035c4a0c1cb in ThreadWeaver::Thread::run (this=0x2f2fa80) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:142
#9  0x00000035b147b5eb in QThreadPrivate::start (arg=0x2f2fa80) at thread/qthread_unix.cpp:307
#10 0x00000035a9407d14 in start_thread (arg=0x7fdd61010700) at pthread_create.c:309
#11 0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 7 (Thread 0x7fdd6080f700 (LWP 25913)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00000035b147baeb in wait (time=18446744073709551615, this=0x3befb30) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2455520, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000035c4a0aa81 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x3befa10, th=0x30faa70) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00000035c4a0d2cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x3beedd0, th=0x30faa70) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00000035c4a0c13f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fdd6080ed20, parent=0x3befa10, th=th@entry=0x30faa70) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:87
#6  0x00000035c4a0c1cb in ThreadWeaver::Thread::run (this=0x30faa70) at /usr/src/debug/kdelibs-4.9.1/threadweaver/Weaver/Thread.cpp:142
#7  0x00000035b147b5eb in QThreadPrivate::start (arg=0x30faa70) at thread/qthread_unix.cpp:307
#8  0x00000035a9407d14 in start_thread (arg=0x7fdd6080f700) at pthread_create.c:309
#9  0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 6 (Thread 0x7fdd5b190700 (LWP 25914)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00000035cc01677d in WTF::TCMalloc_PageHeap::scavengerThread (this=0x35cca00980) at wtf/FastMalloc.cpp:2495
#2  0x00000035cc016889 in WTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at wtf/FastMalloc.cpp:1618
#3  0x00000035a9407d14 in start_thread (arg=0x7fdd5b190700) at pthread_create.c:309
#4  0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 5 (Thread 0x7fdd5a88f700 (LWP 25915)):
#0  0x00000035a90e8bcf in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00000035ab447af4 in g_main_context_poll (n_fds=1, fds=0x7fdd480029c0, timeout=7137, context=0x7fdd480009a0, priority=<optimized out>) at gmain.c:3440
#2  g_main_context_iterate (context=context@entry=0x7fdd480009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3141
#3  0x00000035ab447c14 in g_main_context_iteration (context=0x7fdd480009a0, may_block=1) at gmain.c:3207
#4  0x00000035b15a4506 in QEventDispatcherGlib::processEvents (this=0x7fdd480008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00000035b157513f in QEventLoop::processEvents (this=this@entry=0x7fdd5a88ed20, flags=...) at kernel/qeventloop.cpp:149
#6  0x00000035b15753c8 in QEventLoop::exec (this=0x7fdd5a88ed20, flags=...) at kernel/qeventloop.cpp:204
#7  0x00000035b1478650 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00000035b147b5eb in QThreadPrivate::start (arg=0x2daf6c0) at thread/qthread_unix.cpp:307
#9  0x00000035a9407d14 in start_thread (arg=0x7fdd5a88f700) at pthread_create.c:309
#10 0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 4 (Thread 0x7fdd58df8700 (LWP 25959)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00000035cdd84ac7 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x35ce0919a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00000035cdd84af9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00000035a9407d14 in start_thread (arg=0x7fdd58df8700) at pthread_create.c:309
#4  0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 3 (Thread 0x7fdd277fe700 (LWP 26081)):
#0  0x00000035a90e8bcf in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00000035c2830f4f in ?? () from /lib64/libpulse.so.0
#2  0x00000035c28224cc in pa_mainloop_poll () from /lib64/libpulse.so.0
#3  0x00000035c2822b29 in pa_mainloop_iterate () from /lib64/libpulse.so.0
#4  0x00000035c2822be0 in pa_mainloop_run () from /lib64/libpulse.so.0
#5  0x00000035c2830eff in ?? () from /lib64/libpulse.so.0
#6  0x00000035c3643343 in ?? () from /lib64/libpulsecommon-1.1.so
#7  0x00000035a9407d14 in start_thread (arg=0x7fdd277fe700) at pthread_create.c:309
#8  0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7fdd36b6b700 (LWP 26082)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00000035a9409c8c in _L_lock_1024 () from /lib64/libpthread.so.0
#2  0x00000035a9409c35 in __pthread_mutex_lock (mutex=0x1d410a0) at pthread_mutex_lock.c:105
#3  0x00000035ab483981 in g_mutex_lock (mutex=<optimized out>) at gthread-posix.c:208
#4  0x00000035c6a28311 in gst_object_get_parent (object=0x1d415b0) at gstobject.c:897
#5  0x00000035c6a28456 in gst_object_dispatch_properties_changed (object=0x7fdd30006780, n_pspecs=1, pspecs=0x7fdd36b6aa28) at gstobject.c:553
#6  0x00000035ad015a13 in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x7fdd30006780) at gobject.c:1133
#7  g_object_notify_by_pspec (object=object@entry=0x7fdd30006780, pspec=<optimized out>) at gobject.c:1234
#8  0x00000035c6a58444 in gst_pad_set_caps (pad=0x7fdd30006780, caps=0x1ab3ac0) at gstpad.c:2745
#9  0x00000035c6a5d723 in gst_pad_pull_range (pad=0x7fdd30006780, offset=<optimized out>, size=size@entry=65536, buffer=0x37da018) at gstpad.c:5149
#10 0x00000035c940f970 in gst_base_parse_pull_range (parse=parse@entry=0x37d99f0, size=size@entry=65536, buffer=buffer@entry=0x7fdd36b6ab90) at gstbaseparse.c:2539
#11 0x00000035c9410b1f in gst_base_parse_scan_frame (parse=parse@entry=0x37d99f0, frame=frame@entry=0x7fdd36b6ac30, full=full@entry=1, klass=0x1aa6500, klass=0x1aa6500) at gstbaseparse.c:2678
#12 0x00000035c9416b27 in gst_base_parse_loop (pad=<optimized out>) at gstbaseparse.c:2821
#13 0x00000035c6a82d64 in gst_task_func (task=0x4d9dcc0) at gsttask.c:327
#14 0x00000035ab46ac92 in g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:309
#15 0x00000035ab46a495 in g_thread_proxy (data=0x3531000) at gthread.c:801
#16 0x00000035a9407d14 in start_thread (arg=0x7fdd36b6b700) at pthread_create.c:309
#17 0x00000035a90f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fdd83ea2880 (LWP 25894)):
[KCrash Handler]
#6  g_value_set_object (value=0x7fff7253d330, v_object=0x2) at gobject.c:3411
#7  0x00007fdd67dd0268 in gst_play_bin_get_property (object=0x1d415b0, prop_id=<optimized out>, value=0x7fff7253d330, pspec=<optimized out>) at gstplaybin2.c:2018
#8  0x00000035ad016fee in object_get_property (value=0x7fff7253d330, pspec=<optimized out>, object=0x1d415b0) at gobject.c:1289
#9  g_object_get_valist (object=object@entry=0x1d415b0, first_property_name=first_property_name@entry=0x7fdd76173d47 "source", var_args=var_args@entry=0x7fff7253d3d8) at gobject.c:2014
#10 0x00000035ad017477 in g_object_get (_object=0x1d415b0, first_property_name=0x7fdd76173d47 "source") at gobject.c:2104
#11 0x00007fdd76164465 in Phonon::Gstreamer::Pipeline::cb_setupSource (playbin=<optimized out>, param=<optimized out>, data=0x1d3c720) at /usr/src/debug/phonon-backend-gstreamer-4.6.2/gstreamer/pipeline.cpp:828
#12 0x00000035ad00f664 in g_closure_invoke (closure=0x1d462e0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fff7253d790, invocation_hint=invocation_hint@entry=0x7fff7253d730) at gclosure.c:777
#13 0x00000035ad0206d8 in signal_emit_unlocked_R (node=node@entry=0x1a022e0, detail=detail@entry=1726, instance=instance@entry=0x1d415b0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff7253d790) at gsignal.c:3551
#14 0x00000035ad02866d in g_signal_emit_valist (instance=0x1d415b0, signal_id=<optimized out>, detail=1726, var_args=var_args@entry=0x7fff7253d9e8) at gsignal.c:3300
#15 0x00000035ad0287c2 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3356
#16 0x00000035ad014025 in g_object_dispatch_properties_changed (object=0x1d415b0, n_pspecs=2, pspecs=0x0) at gobject.c:1041
#17 0x00000035c6a28364 in gst_object_dispatch_properties_changed (object=0x1d415b0, n_pspecs=1, pspecs=0x7fff7253db78) at gstobject.c:530
#18 0x00000035ad0158fb in g_object_notify_by_spec_internal (pspec=0x19fcb70, object=0x1d415b0) at gobject.c:1133
#19 g_object_notify (object=object@entry=0x1d415b0, property_name=property_name@entry=0x7fdd67df3c0b "source") at gobject.c:1175
#20 0x00007fdd67dcc7ff in notify_source_cb (uridecodebin=<optimized out>, pspec=<optimized out>, group=<optimized out>) at gstplaybin2.c:3445
#21 0x00000035ad00f664 in g_closure_invoke (closure=0x7fdd1801b4a0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fff7253dd90, invocation_hint=invocation_hint@entry=0x7fff7253dd30) at gclosure.c:777
#22 0x00000035ad0206d8 in signal_emit_unlocked_R (node=node@entry=0x1a022e0, detail=detail@entry=1726, instance=instance@entry=0x4a8c040, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff7253dd90) at gsignal.c:3551
#23 0x00000035ad02866d in g_signal_emit_valist (instance=0x4a8c040, signal_id=<optimized out>, detail=1726, var_args=var_args@entry=0x7fff7253dfe8) at gsignal.c:3300
#24 0x00000035ad0287c2 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3356
#25 0x00000035ad014025 in g_object_dispatch_properties_changed (object=0x4a8c040, n_pspecs=2, pspecs=0x0) at gobject.c:1041
#26 0x00000035c6a28364 in gst_object_dispatch_properties_changed (object=0x4a8c040, n_pspecs=1, pspecs=0x7fff7253e178) at gstobject.c:530
#27 0x00000035ad0158fb in g_object_notify_by_spec_internal (pspec=0x1d408f0, object=0x4a8c040) at gobject.c:1133
#28 g_object_notify (object=object@entry=0x4a8c040, property_name=property_name@entry=0x7fdd407aea49 "source") at gobject.c:1175
#29 0x00007fdd407aa7a3 in setup_source (decoder=0x4a8c040) at gsturidecodebin.c:2015
#30 gst_uri_decode_bin_change_state (element=0x4a8c040, transition=<optimized out>) at gsturidecodebin.c:2493
#31 0x00000035c6a41d6c in gst_element_change_state (element=element@entry=0x4a8c040, transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:2761
#32 0x00000035c6a426b8 in gst_element_set_state_func (element=0x4a8c040, state=GST_STATE_PAUSED) at gstelement.c:2717
#33 0x00000035c6a2f8a7 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=0, base_time=0, element=0x4a8c040, bin=0x1d415b0) at gstbin.c:2209
#34 gst_bin_change_state_func (element=0x1d415b0, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstbin.c:2518
#35 0x00000035c6a605bd in gst_pipeline_change_state (element=0x1d415b0, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstpipeline.c:482
#36 0x00007fdd67dce7f1 in gst_play_bin_change_state (element=0x1d415b0, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstplaybin2.c:3936
#37 0x00000035c6a41d6c in gst_element_change_state (element=element@entry=0x1d415b0, transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:2761
#38 0x00000035c6a426b8 in gst_element_set_state_func (element=0x1d415b0, state=GST_STATE_PLAYING) at gstelement.c:2717
#39 0x00007fdd76163da6 in Phonon::Gstreamer::Pipeline::setState (this=0x1d3c720, state=GST_STATE_PLAYING) at /usr/src/debug/phonon-backend-gstreamer-4.6.2/gstreamer/pipeline.cpp:242
#40 0x00007fdd7615c512 in Phonon::Gstreamer::MediaObject::requestState (this=this@entry=0x1d39de0, state=state@entry=Phonon::PlayingState) at /usr/src/debug/phonon-backend-gstreamer-4.6.2/gstreamer/mediaobject.cpp:839
#41 0x00007fdd7615c7e4 in Phonon::Gstreamer::MediaObject::play (this=0x1d39de0) at /usr/src/debug/phonon-backend-gstreamer-4.6.2/gstreamer/mediaobject.cpp:239
#42 0x00000035d01664c7 in EngineController::playUrl (this=this@entry=0x196b410, url=..., offset=offset@entry=0) at /usr/src/debug/amarok-2.6.0/src/EngineController.cpp:505
#43 0x00000035d0167e35 in EngineController::play (this=0x196b410, track=..., offset=0) at /usr/src/debug/amarok-2.6.0/src/EngineController.cpp:395
#44 0x00000035cfe1ec49 in Playlist::Actions::play (this=this@entry=0x21561c0, trackid=<optimized out>, now=now@entry=true) at /usr/src/debug/amarok-2.6.0/src/playlist/PlaylistActions.cpp:224
#45 0x00000035cfe20c05 in Playlist::Actions::play (this=0x21561c0) at /usr/src/debug/amarok-2.6.0/src/playlist/PlaylistActions.cpp:191
#46 0x00000035d01680b5 in EngineController::play (this=0x196b410) at /usr/src/debug/amarok-2.6.0/src/EngineController.cpp:350
#47 0x00000035d01682b5 in EngineController::playPause (this=0x196b410) at /usr/src/debug/amarok-2.6.0/src/EngineController.cpp:608
#48 0x00000035d016da53 in EngineController::qt_static_metacall (_o=0x196b410, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/amarok-2.6.0/x86_64-redhat-linux-gnu/src/EngineController.moc:175
#49 0x00000035b158cb9f in QMetaObject::activate (sender=0x38dd3f0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff7253ef40) at kernel/qobject.cpp:3547
#50 0x00000035d028cd8f in PlayPauseButton::toggled (this=<optimized out>, _t1=true) at /usr/src/debug/amarok-2.6.0/x86_64-redhat-linux-gnu/src/PlayPauseButton.moc:102
#51 0x00000035b158cb9f in QMetaObject::activate (sender=0x38dd3f0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#52 0x00000035d0286365 in IconButton::mouseReleaseEvent (this=0x38dd3f0, me=<optimized out>) at /usr/src/debug/amarok-2.6.0/src/widgets/IconButton.cpp:69
#53 0x00000035b5819b50 in QWidget::event (this=0x38dd3f0, event=0x7fff7253f8a0) at kernel/qwidget.cpp:8371
#54 0x00000035b57ca37c in QApplicationPrivate::notify_helper (this=this@entry=0x17e4430, receiver=receiver@entry=0x38dd3f0, e=e@entry=0x7fff7253f8a0) at kernel/qapplication.cpp:4551
#55 0x00000035b57cf05b in QApplication::notify (this=<optimized out>, receiver=0x38dd3f0, e=0x7fff7253f8a0) at kernel/qapplication.cpp:4094
#56 0x00000035b8046366 in KApplication::notify (this=0x7fff72542720, receiver=0x38dd3f0, event=0x7fff7253f8a0) at /usr/src/debug/kdelibs-4.9.1/kdeui/kernel/kapplication.cpp:311
#57 0x00000035b15763ee in QCoreApplication::notifyInternal (this=0x7fff72542720, receiver=0x38dd3f0, event=0x7fff7253f8a0) at kernel/qcoreapplication.cpp:915
#58 0x00000035b57cb1bb in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#59 QApplicationPrivate::sendMouseEvent (receiver=0x38dd3f0, event=0x7fff7253f8a0, alienWidget=0x38dd3f0, nativeWidget=0x2118680, buttonDown=0x35b629dd68, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3162
#60 0x00000035b5845894 in QETWidget::translateMouseEvent (this=this@entry=0x2118680, event=event@entry=0x7fff72540010) at kernel/qapplication_x11.cpp:4523
#61 0x00000035b5844621 in QApplication::x11ProcessEvent (this=0x7fff72542720, event=0x7fff72540010) at kernel/qapplication_x11.cpp:3646
#62 0x00000035b586a60c in x11EventSourceDispatch (s=s@entry=0x17e5370, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#63 0x00000035ab447825 in g_main_dispatch (context=0x17e4f40) at gmain.c:2539
#64 g_main_context_dispatch (context=context@entry=0x17e4f40) at gmain.c:3075
#65 0x00000035ab447b58 in g_main_context_iterate (context=context@entry=0x17e4f40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3146
#66 0x00000035ab447c14 in g_main_context_iteration (context=0x17e4f40, may_block=1) at gmain.c:3207
#67 0x00000035b15a4506 in QEventDispatcherGlib::processEvents (this=0x1682c60, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#68 0x00000035b586a2ee in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#69 0x00000035b157513f in QEventLoop::processEvents (this=this@entry=0x7fff725403e0, flags=...) at kernel/qeventloop.cpp:149
#70 0x00000035b15753c8 in QEventLoop::exec (this=0x7fff725403e0, flags=...) at kernel/qeventloop.cpp:204
#71 0x00000035b157a1b8 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#72 0x0000000000408dea in main (argc=1, argv=0x7fff72542888) at /usr/src/debug/amarok-2.6.0/src/main.cpp:306
Comment 32 Matěj Laitl 2012-09-30 20:48:00 UTC
(In reply to comment #31)
> After update to KDE 4.9.1, I tried to use Amarok and it stopped playback
> after the second song in playlist. When I hit play, it crashed with a
> SIGSEGV.

Mauren, this looks like an another bug - backtrace references phonon-gstreamer and gstreamer. This is most probably a phonon-gstreamer or gstreamer bug.

Please create a new bug report with phonon-engines-gstreamer product, mighty Trever will deal with it. Apart from the backtrace also paste the first section of the Amarok Diagnostics page.
Comment 33 Mauren Berti 2012-09-30 20:52:36 UTC
(In reply to comment #32)
> (In reply to comment #31)
> > After update to KDE 4.9.1, I tried to use Amarok and it stopped playback
> > after the second song in playlist. When I hit play, it crashed with a
> > SIGSEGV.
> 
> Mauren, this looks like an another bug - backtrace references
> phonon-gstreamer and gstreamer. This is most probably a phonon-gstreamer or
> gstreamer bug.
> 
> Please create a new bug report with phonon-engines-gstreamer product, mighty
> Trever will deal with it. Apart from the backtrace also paste the first
> section of the Amarok Diagnostics page.

I will do so. What do you mean by Amarok Diagnostics page?
Comment 34 Mauren Berti 2012-09-30 20:53:35 UTC
Nevermind, I just found out. I'm gonna fill another bug report.
Comment 35 Jaime Torres 2013-04-13 08:40:27 UTC
Unfortunately, it is still alive in 4.11 pre.

#2  0x00007fdb7895ec7a in FAMOpen () from /usr/lib64/libfam.so.0
#3  0x00007fdb7ff64762 in KDirWatchPrivate::KDirWatchPrivate (this=0x50305c0) at /g/kdegit/kdelibs/kdecore/io/kdirwatch.cpp:186
#4  0x00007fdb7ff64d42 in createPrivate () at /g/kdegit/kdelibs/kdecore/io/kdirwatch.cpp:83
#5  0x00007fdb7ff64db6 in KDirWatch::KDirWatch (this=0x479cf10, parent=<optimized out>)
    at /g/kdegit/kdelibs/kdecore/io/kdirwatch.cpp:1755
#6  0x00007fdb7ff64ee2 in operator-> (this=<optimized out>) at /g/kdegit/kdelibs/kdecore/io/kdirwatch.cpp:1737
#7  0x00007fdb8189e359 in KDirListerCache::KDirListerCache (this=0x4484710) at /g/kdegit/kdelibs/kio/kio/kdirlister.cpp:57
#8  0x00007fdb8189e580 in operator-> (this=<optimized out>) at /g/kdegit/kdelibs/kio/kio/kdirlister.cpp:47
#9  0x00007fdb818a0f11 in KDirLister::cachedItemForUrl (url=...) at /g/kdegit/kdelibs/kio/kio/kdirlister.cpp:2769
Comment 36 Andreas Hartmetz 2013-11-28 16:04:29 UTC
Note that FAM is the default backend for NFS directories and maybe other non-local filesystems. Inotify is the default for local directories. So it would be interesting to hear if those with the bug described here who do not have FAM configured explicitly are using NFS home directories or otherwise NFS mounts.
It is also possible that some misguided distributions patch KDE to make FAM the default, or that they do it via global config files in /etc/kde4, which is also possible.
Comment 37 Ctibor Brančík 2013-11-28 17:45:58 UTC
I use Gentoo. My collection is on NFS share mounted under /mnt.

After I have used workaround in comment #27 the problem is probably gone. I set method to Stat. I had to create DirWatch section in the config like this:

[DirWatch]
nfsPreferredMethod=Stat

It seems, that Gentoo does not set this to FAM by default anywhere. At least I haven't found it.
Comment 38 Ambroz Bizjak 2014-04-15 19:00:39 UTC
Created attachment 86119 [details]
Backtrace

I'm also seeing this in KDevelop 4.6.0 on NixOS at startup while loading projects and while exiting (if projects load). Backtrace is attached.
Comment 39 Matěj Laitl 2014-05-23 21:17:11 UTC
*** Bug 335258 has been marked as a duplicate of this bug. ***
Comment 40 Nicolas 2014-09-25 14:59:27 UTC
This seems to be a bug in gam_server.
Killing it and letting it restart makes the system usable again. See https://bugzilla.redhat.com/show_bug.cgi?id=917848 and probably https://bugzilla.redhat.com/show_bug.cgi?id=786170
Comment 41 Rex Dieter 2014-09-25 15:04:16 UTC
Yes, for reference here are 2 gamin (upstream) reports tracking the issue:
https://bugzilla.gnome.org/show_bug.cgi?id=667230
https://bugzilla.gnome.org/show_bug.cgi?id=669292

I'd recommend distros and interested parties watch there, and pull one of those proposed fixes into their gamin builds/packaging in the meantime.

This is not a kde bug, we may as well close it here.
Comment 42 Myriam Schweingruber 2016-04-25 17:51:36 UTC
*** Bug 353949 has been marked as a duplicate of this bug. ***
Comment 43 Myriam Schweingruber 2016-06-12 13:01:22 UTC
*** Bug 363105 has been marked as a duplicate of this bug. ***
Comment 44 Myriam Schweingruber 2016-06-27 08:00:14 UTC
*** Bug 324197 has been marked as a duplicate of this bug. ***