[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Foreground Lock attempt hanging during code completion
From:       Olivier JG <olivier.jg () gmail ! com>
Date:       2011-08-07 6:56:56
Message-ID: 4E3E3738.2080907 () gmail ! com
[Download RAW message or body]

A while back I pushed some modified case completion to master, after a
bit of discussion on the Review Board about how to go about locking.
Unfortunately I've run into this deadlock three times now, although I'm
quite sure that I'm "doing it right" with regards to locking in code
completion.
I've attached a BT, David maybe could you see what went wrong here?
-Olivier JG

["hangingforegroundtrimmed" (text/plain)]

Thread 16 (Thread 0x7fe3be770700 (LWP 18684)):
#0  0x00007fe3dfac9e3b in pthread_cond_timedwait@@GLIBC_2.3.2 () from \
/lib/libpthread.so.0 #1  0x00007fe3dfd4f50e in QWaitCondition::wait(QMutex*, unsigned \
long) () from /usr/lib/libQtCore.so.4 #2  0x00007fe3e3bcbf0d in \
KDevelop::ForegroundLock::relock (this=0x7fe3be76d38f) at \
platform/interfaces/foregroundlock.cpp:186 #3  0x00007fe3e3bcbc18 in \
KDevelop::ForegroundLock::ForegroundLock (this=0x7fe3be76d38f, lock=true) at \
platform/interfaces/foregroundlock.cpp:142 #4  0x00007fe3b5a7dbaa in \
Cpp::switchExpressionType (caseContext=...) at \
kdevelop/languages/cpp/codecompletion/context.cpp:129 #5  0x00007fe3b5a86b6e in \
Cpp::CodeCompletionContext::completionItems (this=0x9cd12e0, shouldAbort=@0x32a9460, \
fullCompletion=true) at kdevelop/languages/cpp/codecompletion/context.cpp:1383 #6  \
0x00007fe3b5a89876 in Cpp::CodeCompletionContext::completionItems \
(this=0x7fe3a8e0f130, shouldAbort=@0x32a9460, fullCompletion=true) at \
kdevelop/languages/cpp/codecompletion/context.cpp:1635 #7  0x00007fe3dc786121 in \
KDevelop::CodeCompletionWorker::computeCompletions (this=0x32a9440, context=..., \
position=..., followingText=..., contextRange=..., contextText=...) at \
platform/language/codecompletion/codecompletionworker.cpp:164 #8  0x00007fe3b5a7d6f0 \
in Cpp::CodeCompletionWorker::computeCompletions (this=0x32a9440, context=..., \
position=..., followingText=..., _contextRange=..., _contextText=...) at \
kdevelop/languages/cpp/codecompletion/worker.cpp:91 #9  0x00007fe3dc785cf3 in \
KDevelop::CodeCompletionWorker::computeCompletions (this=0x32a9440, context=..., \
position=..., view=0x5701170) at \
platform/language/codecompletion/codecompletionworker.cpp:128 #10 0x00007fe3dc786626 \
in KDevelop::CodeCompletionWorker::qt_metacall (this=0x32a9440, \
_c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x3e61090) at \
platform/debugbuild/language/codecompletionworker.moc:84 #11 0x00007fe3b5a7d830 in \
Cpp::CodeCompletionWorker::qt_metacall (this=0x32a9440, \
_c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x3e61090) at \
kdevelop/debugbuild/languages/cpp/worker.moc:66 #12 0x00007fe3dfe4c39e in \
QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4 #13 0x00007fe3deff6174 in \
QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 \
#14 0x00007fe3deffafe1 in QApplication::notify(QObject*, QEvent*) () from \
/usr/lib/libQtGui.so.4 #15 0x00007fe3e0621e06 in KApplication::notify(QObject*, \
QEvent*) () from /usr/lib/libkdeui.so.5 #16 0x00007fe3dfe35bbc in \
QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 \
#17 0x00007fe3dfe38f2f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, \
QThreadData*) () from /usr/lib/libQtCore.so.4 #18 0x00007fe3dfe60413 in ?? () from \
/usr/lib/libQtCore.so.4 #19 0x00007fe3d91f329d in g_main_context_dispatch () from \
/usr/lib/libglib-2.0.so.0 #20 0x00007fe3d91f3a78 in ?? () from \
/usr/lib/libglib-2.0.so.0 #21 0x00007fe3d91f3d09 in g_main_context_iteration () from \
/usr/lib/libglib-2.0.so.0 #22 0x00007fe3dfe60876 in \
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from \
/usr/lib/libQtCore.so.4 #23 0x00007fe3dfe34db2 in \
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from \
/usr/lib/libQtCore.so.4 #24 0x00007fe3dfe34fb7 in \
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from \
/usr/lib/libQtCore.so.4 #25 0x00007fe3dfd4c69f in QThread::exec() () from \
/usr/lib/libQtCore.so.4 #26 0x00007fe3dc78b557 in \
KDevelop::CompletionWorkerThread::run (this=0x33259b0) at \
platform/language/codecompletion/codecompletionmodel.cpp:84 #27 0x00007fe3dfd4f0f5 in \
?? () from /usr/lib/libQtCore.so.4 #28 0x00007fe3dfac5d60 in start_thread () from \
/lib/libpthread.so.0 #29 0x00007fe3de1b8e2d in clone () from /lib/libc.so.6
#30 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fe3a67fc700 (LWP 19010)):
#0  0x00007fe3de18a39d in nanosleep () from /lib/libc.so.6
#1  0x00007fe3de1b3384 in usleep () from /lib/libc.so.6
#2  0x00007fe3dc6d37c8 in KDevelop::DUChainLock::lockForWrite (this=0x27ff388, \
timeout=0) at platform/language/duchain/duchainlock.cpp:201 #3  0x00007fe3dc6d3af8 in \
KDevelop::DUChainWriteLocker::lock (this=0x7fe3a67fa8d0) at \
platform/language/duchain/duchainlock.cpp:299 #4  0x00007fe3dc6d3a6f in \
KDevelop::DUChainWriteLocker::DUChainWriteLocker (this=0x7fe3a67fa8d0, \
duChainLock=0x0, timeout=0) at platform/language/duchain/duchainlock.cpp:284 #5  \
0x00007fe3dc649021 in KDevelop::ParseJob::translateDUChainToRevision (this=0x94c00e0, \
context=0x8cad6f0) at platform/language/backgroundparser/parsejob.cpp:390 #6  \
0x00007fe3b5a5551b in CPPInternalParseJob::run (this=0x9c37730) at \
kdevelop/languages/cpp/cppparsejob.cpp:437 #7  0x00007fe3e28bbd71 in ?? () from \
/usr/lib/libthreadweaver.so.4 #8  0x00007fe3e28bbe9c in \
ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from \
/usr/lib/libthreadweaver.so.4 #9  0x00007fe3e28bcee3 in ?? () from \
/usr/lib/libthreadweaver.so.4 #10 0x00007fe3e28bb57f in ?? () from \
/usr/lib/libthreadweaver.so.4 #11 0x00007fe3e28bb63b in ThreadWeaver::Thread::run() \
() from /usr/lib/libthreadweaver.so.4 #12 0x00007fe3dfd4f0f5 in ?? () from \
/usr/lib/libQtCore.so.4 #13 0x00007fe3dfac5d60 in start_thread () from \
/lib/libpthread.so.0 #14 0x00007fe3de1b8e2d in clone () from /lib/libc.so.6
#15 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fe3e4488760 (LWP 18676)):
#0  0x00007fe3dfacc49c in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x00007fe3dfac7e65 in _L_lock_487 () from /lib/libpthread.so.0
#2  0x00007fe3dfac7cba in pthread_mutex_lock () from /lib/libpthread.so.0
#3  0x00007fe3e3bccaa2 in SimplePThreadMutex::lock (this=0x7fe3e3deb540) at \
platform/interfaces/foregroundlock.cpp:47 #4  0x00007fe3e3bcba67 in (anonymous \
namespace)::lockForegroundMutexInternal () at \
platform/interfaces/foregroundlock.cpp:101 #5  0x00007fe3e3bcc202 in \
KDevelop::TemporarilyReleaseForegroundLock::~TemporarilyReleaseForegroundLock \
(this=0x7fff01479490, __in_chrg=<value optimized out>) at \
platform/interfaces/foregroundlock.cpp:241 #6  0x00007fe3e3bcc053 in \
KDevelop::ForegroundLock::ForegroundReleaser::doInternal (this=0x7fe3e3deb5c0) at \
platform/interfaces/foregroundlock.cpp:168 #7  0x00007fe3e3bcc658 in \
KDevelop::DoInForeground::doInternalSlot (this=0x7fe3e3deb5c0) at \
platform/interfaces/foregroundlock.cpp:279 #8  0x00007fe3e3bcb41f in \
KDevelop::DoInForeground::qt_metacall (this=0x7fe3e3deb5c0, \
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fe3a0945f40) at \
platform/debugbuild/interfaces/moc_foregroundlock.cpp:72 #9  0x00007fe3dfe4c39e in \
QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4 #10 0x00007fe3deff6174 in \
QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 \
#11 0x00007fe3deffafe1 in QApplication::notify(QObject*, QEvent*) () from \
/usr/lib/libQtGui.so.4 #12 0x00007fe3e0621e06 in KApplication::notify(QObject*, \
QEvent*) () from /usr/lib/libkdeui.so.5 #13 0x00007fe3dfe35bbc in \
QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 \
#14 0x00007fe3dfe38f2f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, \
QThreadData*) () from /usr/lib/libQtCore.so.4 #15 0x00007fe3dfe60413 in ?? () from \
/usr/lib/libQtCore.so.4 #16 0x00007fe3d91f329d in g_main_context_dispatch () from \
/usr/lib/libglib-2.0.so.0 #17 0x00007fe3d91f3a78 in ?? () from \
/usr/lib/libglib-2.0.so.0 #18 0x00007fe3d91f3d09 in g_main_context_iteration () from \
/usr/lib/libglib-2.0.so.0 #19 0x00007fe3dfe60876 in \
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from \
/usr/lib/libQtCore.so.4 #20 0x00007fe3df0991be in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007fe3dfe34db2 in \
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from \
/usr/lib/libQtCore.so.4 #22 0x00007fe3dfe34fb7 in \
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from \
/usr/lib/libQtCore.so.4 #23 0x00007fe3dfe391ab in QCoreApplication::exec() () from \
/usr/lib/libQtCore.so.4 #24 0x000000000040b875 in main (argc=1, argv=0x7fff0147be08) \
at kdevelop/app/main.cpp:474



-- 
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic