Bug 263522 - deadlock during editing c++ code
Summary: deadlock during editing c++ code
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: VHI critical
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 10:22 UTC by Chaos A.D.
Modified: 2011-01-19 18:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chaos A.D. 2011-01-18 10:22:20 UTC
Version:           SVN (using KDE 4.5.1) 
OS:                Linux

It might be a regression after this commit: e8e7c386a7a11919a18c64f80b3ca62e2490b5ff, since such hangs was extremely rare for me, and usually KDevelop hangs not during text editing or autocompletion.

There is the state of all threads:

(gdb) thread apply all bt

Thread 12 (Thread 0xadfa3b70 (LWP 9326)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb61129c7 in wait (this=0xa7cac40, mutex=0xa7cac38, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xa7cac40, mutex=0xa7cac38, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb610cadb in QReadWriteLock::lockForWrite (this=0xa58b6bc) at thread/qreadwritelock.cpp:293
#5  0xb4d7107f in KDevelop::DUChainPrivate::doMoreCleanup(int, bool) () from /usr/local/lib/libkdevplatformlanguage.so.4
#6  0xb4d71337 in KDevelop::DUChainPrivate::CleanupThread::run() () from /usr/local/lib/libkdevplatformlanguage.so.4
#7  0xb6111df9 in QThreadPrivate::start (arg=0x9a31588) at thread/qthread_unix.cpp:266
#8  0xb609bcc9 in start_thread (arg=0xadfa3b70) at pthread_create.c:304
#9  0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 11 (Thread 0xac6f8b70 (LWP 9329)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb53b3371 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb61eebb8 in QProcessManager::run (this=0xb6347888) at io/qprocess_unix.cpp:245
#3  0xb6111df9 in QThreadPrivate::start (arg=0xb6347888) at thread/qthread_unix.cpp:266
#4  0xb609bcc9 in start_thread (arg=0xac6f8b70) at pthread_create.c:304
#5  0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xaac8fb70 (LWP 9372)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb53abdf6 in __poll (fds=0xb5442ff4, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb48aaa1b in g_poll () from /lib/libglib-2.0.so.0
#3  0xb489d43c in ?? () from /lib/libglib-2.0.so.0
#4  0xb489d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0xb6242565 in QEventDispatcherGlib::processEvents (this=0x9f46c98, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#6  0xb6212609 in QEventLoop::processEvents (this=0xaac8f290, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#7  0xb6212a8a in QEventLoop::exec (this=0xaac8f290, flags=...) at kernel/qeventloop.cpp:201
#8  0xb610eb7e in QThread::exec (this=0x9f42868) at thread/qthread.cpp:490
#9  0xb61f135b in QInotifyFileSystemWatcherEngine::run (this=0x9f42868) at io/qfilesystemwatcher_inotify.cpp:248
#10 0xb6111df9 in QThreadPrivate::start (arg=0x9f42868) at thread/qthread_unix.cpp:266
#11 0xb609bcc9 in start_thread (arg=0xaac8fb70) at pthread_create.c:304
---Type <return> to continue, or q <return> to quit---
#12 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xab490b70 (LWP 9425)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb515e877 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0xb525d1a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#3  0xb515e8c1 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0xb525d1a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0xb609bcc9 in start_thread (arg=0xab490b70) at pthread_create.c:304
#5  0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 8 (Thread 0xa64ffb70 (LWP 9427)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb42213a5 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0xb4221481 in ?? () from /usr/lib/libQtWebKit.so.4
#4  0xb609bcc9 in start_thread (arg=0xa64ffb70) at pthread_create.c:304
#5  0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 7 (Thread 0xa5114b70 (LWP 9444)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb6110ef2 in QMutexPrivate::wait (this=0x9946bf8, timeout=-1) at thread/qmutex_unix.cpp:84
#3  0xb610c5ea in QMutex::lock (this=0xb75603c8) at thread/qmutex.cpp:204
#4  0xb754ffa1 in KDevelop::ForegroundLock::relock() () from /usr/local/lib/libkdevplatforminterfaces.so.4
#5  0xb75501b6 in KDevelop::ForegroundLock::ForegroundLock(bool) () from /usr/local/lib/libkdevplatforminterfaces.so.4
#6  0xb4e78648 in KDevelop::CodeCompletionWorker::computeCompletions(KDevelop::DUChainPointer<KDevelop::DUContext>, KTextEditor::Cursor const&, KTextEditor::View*) ()
   from /usr/local/lib/libkdevplatformlanguage.so.4
#7  0xb4e78eb5 in KDevelop::CodeCompletionWorker::qt_metacall(QMetaObject::Call, int, void**) () from /usr/local/lib/libkdevplatformlanguage.so.4
#8  0xa559c542 in Cpp::CodeCompletionWorker::qt_metacall(QMetaObject::Call, int, void**) () from /usr/local/lib/kde4/kdevcpplanguagesupport.so
#9  0xb62198ca in QMetaObject::metacall (object=0xa7ca1a0, cl=128, idx=-1688500888, argv=0xe3a9c38) at kernel/qmetaobject.cpp:237
#10 0xb6224df6 in QMetaCallEvent::placeMetaCall (this=0xd546c38, object=0xa7ca1a0) at kernel/qobject.cpp:534
#11 0xb62266a2 in QObject::event (this=0xa7ca1a0, e=0x3) at kernel/qobject.cpp:1219
#12 0xb56f8fdc in QApplicationPrivate::notify_helper (this=0x99621f0, receiver=0xa7ca1a0, e=0xd546c38) at kernel/qapplication.cpp:4396
#13 0xb56ff04e in QApplication::notify (this=0xbfbc34f8, receiver=0xa7ca1a0, e=0xd546c38) at kernel/qapplication.cpp:3798
---Type <return> to continue, or q <return> to quit---
#14 0xb659b68a in KApplication::notify (this=0xbfbc34f8, receiver=0xa7ca1a0, event=0xd546c38) at ../../kdeui/kernel/kapplication.cpp:310
#15 0x0804bc3c in KDevelopApplication::notify(QObject*, QEvent*) ()
#16 0xb6213b3b in QCoreApplication::notifyInternal (this=0xbfbc34f8, receiver=0xa7ca1a0, event=0xd546c38) at kernel/qcoreapplication.cpp:732
#17 0xb6216d8b in sendEvent (receiver=0x0, event_type=0, data=0xa7b4018) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#18 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xa7b4018) at kernel/qcoreapplication.cpp:1373
#19 0xb6216f4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#20 0xb6242a74 in sendPostedEvents (s=0xa7c3c20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#21 postEventSourceDispatch (s=0xa7c3c20) at kernel/qeventdispatcher_glib.cpp:277
#22 0xb4899855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#23 0xb489d668 in ?? () from /lib/libglib-2.0.so.0
#24 0xb489d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#25 0xb6242565 in QEventDispatcherGlib::processEvents (this=0xa7c1b88, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#26 0xb6212609 in QEventLoop::processEvents (this=0xa51142c0, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#27 0xb6212a8a in QEventLoop::exec (this=0xa51142c0, flags=...) at kernel/qeventloop.cpp:201
#28 0xb610eb7e in QThread::exec (this=0xa7b22e8) at thread/qthread.cpp:490
#29 0xb4e7d088 in KDevelop::CompletionWorkerThread::run() () from /usr/local/lib/libkdevplatformlanguage.so.4
#30 0xb6111df9 in QThreadPrivate::start (arg=0xa7b22e8) at thread/qthread_unix.cpp:266
#31 0xb609bcc9 in start_thread (arg=0xa5114b70) at pthread_create.c:304
#32 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 6 (Thread 0xa4913b70 (LWP 9445)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb53abdf6 in __poll (fds=0xb5442ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb48aaa1b in g_poll () from /lib/libglib-2.0.so.0
#3  0xb489d43c in ?? () from /lib/libglib-2.0.so.0
#4  0xb489d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0xb6242565 in QEventDispatcherGlib::processEvents (this=0xa7c8c28, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#6  0xb6212609 in QEventLoop::processEvents (this=0xa49132c0, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#7  0xb6212a8a in QEventLoop::exec (this=0xa49132c0, flags=...) at kernel/qeventloop.cpp:201
#8  0xb610eb7e in QThread::exec (this=0xabd0bc70) at thread/qthread.cpp:490
#9  0xb4e7d088 in KDevelop::CompletionWorkerThread::run() () from /usr/local/lib/libkdevplatformlanguage.so.4
#10 0xb6111df9 in QThreadPrivate::start (arg=0xabd0bc70) at thread/qthread_unix.cpp:266
#11 0xb609bcc9 in start_thread (arg=0xa4913b70) at pthread_create.c:304
#12 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
---Type <return> to continue, or q <return> to quit---

Thread 5 (Thread 0xa32ceb70 (LWP 9450)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb61129c7 in wait (this=0x9c886f8, mutex=0x9c9fd88, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0x9c886f8, mutex=0x9c9fd88, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb7119030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x9c886e0, th=0xa945b60) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb711c7dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x9c6e7c0, th=0xa945b60) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb711855b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x9c886e0, th=0xa945b60) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb711c8d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x9c6e7c0, th=0xa945b60) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb7119533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x9c886e0, th=0xa945b60, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb711c8f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x9c6e7c0, th=0xa945b60) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#10 0xb7119533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x9c886e0, th=0xa945b60, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#11 0xb711c8f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x9c6e7c0, th=0xa945b60) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#12 0xb7119533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x9c886e0, th=0xa945b60, previous=0xb275508) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#13 0xb711a95e in ThreadWeaver::ThreadRunHelper::run (this=0xa32ce2f4, parent=0x9c886e0, th=0xa945b60) at ../../../threadweaver/Weaver/Thread.cpp:87
#14 0xb711b07b in ThreadWeaver::Thread::run (this=0xa945b60) at ../../../threadweaver/Weaver/Thread.cpp:142
#15 0xb6111df9 in QThreadPrivate::start (arg=0xa945b60) at thread/qthread_unix.cpp:266
#16 0xb609bcc9 in start_thread (arg=0xa32ceb70) at pthread_create.c:304
#17 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xa2acdb70 (LWP 9451)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a0884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xb611294f in wait (this=0xb75603d4, mutex=0xb75603cc, time=30) at thread/qwaitcondition_unix.cpp:86
#3  QWaitCondition::wait (this=0xb75603d4, mutex=0xb75603cc, time=30) at thread/qwaitcondition_unix.cpp:160
#4  0xb75500c4 in KDevelop::ForegroundLock::relock() () from /usr/local/lib/libkdevplatforminterfaces.so.4
#5  0xb75501b6 in KDevelop::ForegroundLock::ForegroundLock(bool) () from /usr/local/lib/libkdevplatforminterfaces.so.4
#6  0xb4d422ae in KDevelop::ParseJob::readContents() () from /usr/local/lib/libkdevplatformlanguage.so.4
#7  0xa557d88b in PreprocessJob::readContents() () from /usr/local/lib/kde4/kdevcpplanguagesupport.so
#8  0xa5580ab8 in PreprocessJob::run() () from /usr/local/lib/kde4/kdevcpplanguagesupport.so
#9  0xb711b904 in ThreadWeaver::JobRunHelper::runTheJob (this=0xa2acd1fc, th=0xa948240, job=0xbc29118) at ../../../threadweaver/Weaver/Job.cpp:106
#10 0xb711bc61 in ThreadWeaver::Job::execute (this=0xbc29118, th=0xa948240) at ../../../threadweaver/Weaver/Job.cpp:135
#11 0xb711d633 in ThreadWeaver::JobCollectionJobRunner::execute (this=0xe2c8058, t=0xa948240) at ../../../threadweaver/Weaver/JobCollection.cpp:82
---Type <return> to continue, or q <return> to quit---
#12 0xb711e03e in ThreadWeaver::JobCollection::execute (this=0xbfe7888, t=0xa948240) at ../../../threadweaver/Weaver/JobCollection.cpp:228
#13 0xb711a92a in ThreadWeaver::ThreadRunHelper::run (this=0xa2acd2f4, parent=0x9c886e0, th=0xa948240) at ../../../threadweaver/Weaver/Thread.cpp:95
#14 0xb711b07b in ThreadWeaver::Thread::run (this=0xa948240) at ../../../threadweaver/Weaver/Thread.cpp:142
#15 0xb6111df9 in QThreadPrivate::start (arg=0xa948240) at thread/qthread_unix.cpp:266
#16 0xb609bcc9 in start_thread (arg=0xa2acdb70) at pthread_create.c:304
#17 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xacef9b70 (LWP 9585)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb61129c7 in wait (this=0xa4b5fc8, mutex=0xa4ed6e8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xa4b5fc8, mutex=0xa4ed6e8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb7119030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xa4b5fb0, th=0xc1e4b30) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb711c7dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xa001f18, th=0xc1e4b30) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb711855b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xa4b5fb0, th=0xc1e4b30) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb711c8d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa001f18, th=0xc1e4b30) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb7119533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa4b5fb0, th=0xc1e4b30, previous=0xc1efa60) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb711a95e in ThreadWeaver::ThreadRunHelper::run (this=0xacef92f4, parent=0xa4b5fb0, th=0xc1e4b30) at ../../../threadweaver/Weaver/Thread.cpp:87
#10 0xb711b07b in ThreadWeaver::Thread::run (this=0xc1e4b30) at ../../../threadweaver/Weaver/Thread.cpp:142
#11 0xb6111df9 in QThreadPrivate::start (arg=0xc1e4b30) at thread/qthread_unix.cpp:266
#12 0xb609bcc9 in start_thread (arg=0xacef9b70) at pthread_create.c:304
#13 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0x9b4ffb70 (LWP 9586)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a04dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb61129c7 in wait (this=0xa4b5fc8, mutex=0xa4ed6e8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xa4b5fc8, mutex=0xa4ed6e8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb7119030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xa4b5fb0, th=0xbecd9a0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb711c7dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xa001f18, th=0xbecd9a0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb711855b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xa4b5fb0, th=0xbecd9a0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb711c8d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa001f18, th=0xbecd9a0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb7119533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa4b5fb0, th=0xbecd9a0, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb711a95e in ThreadWeaver::ThreadRunHelper::run (this=0x9b4ff2f4, parent=0xa4b5fb0, th=0xbecd9a0) at ../../../threadweaver/Weaver/Thread.cpp:87
---Type <return> to continue, or q <return> to quit---
#10 0xb711b07b in ThreadWeaver::Thread::run (this=0xbecd9a0) at ../../../threadweaver/Weaver/Thread.cpp:142
#11 0xb6111df9 in QThreadPrivate::start (arg=0xbecd9a0) at thread/qthread_unix.cpp:266
#12 0xb609bcc9 in start_thread (arg=0x9b4ffb70) at pthread_create.c:304
#13 0xb53ba69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb2f30710 (LWP 9317)):
#0  0xb7802424 in __kernel_vsyscall ()
#1  0xb60a3169 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0xb609e5cb in _L_lock_748 () from /lib/libpthread.so.0
#3  0xb609e3f1 in __pthread_mutex_lock (mutex=0xb75603b0) at pthread_mutex_lock.c:61
#4  0xb754f93d in (anonymous namespace)::lockForegroundMutexInternal() () from /usr/local/lib/libkdevplatforminterfaces.so.4
#5  0xb755018d in KDevelop::ForegroundLock::relock() () from /usr/local/lib/libkdevplatforminterfaces.so.4
#6  0xb75501b6 in KDevelop::ForegroundLock::ForegroundLock(bool) () from /usr/local/lib/libkdevplatforminterfaces.so.4
#7  0x0804bc23 in KDevelopApplication::notify(QObject*, QEvent*) ()
#8  0xb6213b3b in QCoreApplication::notifyInternal (this=0xbfbc34f8, receiver=0xa5a67c08, event=0x9eb48398) at kernel/qcoreapplication.cpp:732
#9  0xb6216d8b in sendEvent (receiver=0x0, event_type=0, data=0x9945f30) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#10 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9945f30) at kernel/qcoreapplication.cpp:1373
#11 0xb6216f4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#12 0xb6242a74 in sendPostedEvents (s=0x9964710) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#13 postEventSourceDispatch (s=0x9964710) at kernel/qeventdispatcher_glib.cpp:277
#14 0xb4899855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#15 0xb489d668 in ?? () from /lib/libglib-2.0.so.0
#16 0xb489d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#17 0xb6242565 in QEventDispatcherGlib::processEvents (this=0x99459e0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#18 0xb57babe5 in QGuiEventDispatcherGlib::processEvents (this=0x99459e0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#19 0xb6212609 in QEventLoop::processEvents (this=0xbfbc3294, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#20 0xb6212a8a in QEventLoop::exec (this=0xbfbc3294, flags=...) at kernel/qeventloop.cpp:201
#21 0xb621700f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#22 0xb56f7e07 in QApplication::exec () at kernel/qapplication.cpp:3672
#23 0x08053285 in main ()



Reproducible: Didn't try
Comment 1 Milian Wolff 2011-01-18 12:49:54 UTC
David: Seems like your hunch was correct and that changeset created a new deadlock possibility. Can you fix it? Thanks
Comment 2 David Nolden 2011-01-18 14:22:34 UTC
Is this reproducible? Please compile kdevelop and kdevplatform in debug mode, so that the backtraces have line-numbers attached, and then re-post it.
Comment 3 Chaos A.D. 2011-01-19 12:16:51 UTC
Yeah! At last, it hangs again!

(gdb) thread apply all bt

Thread 14 (Thread 0xae09bb70 (LWP 6332)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b89c7 in wait (this=0x95892b0, mutex=0x95892a8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0x95892b0, mutex=0x95892a8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb60b2adb in QReadWriteLock::lockForWrite (this=0x955be94) at thread/qreadwritelock.cpp:293
#5  0xb4d2df5a in KDevelop::DUChainPrivate::doMoreCleanup(int, bool) () from /usr/local/lib/libkdevplatformlanguage.so.4
#6  0xb4d2ed0f in KDevelop::DUChainPrivate::CleanupThread::run() () from /usr/local/lib/libkdevplatformlanguage.so.4
#7  0xb60b7df9 in QThreadPrivate::start (arg=0x92b6020) at thread/qthread_unix.cpp:266
#8  0xb6041cc9 in start_thread (arg=0xae09bb70) at pthread_create.c:304
#9  0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 13 (Thread 0xac7c9b70 (LWP 6335)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb5359371 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb6194bb8 in QProcessManager::run (this=0xb62ed888) at io/qprocess_unix.cpp:245
#3  0xb60b7df9 in QThreadPrivate::start (arg=0xb62ed888) at thread/qthread_unix.cpp:266
#4  0xb6041cc9 in start_thread (arg=0xac7c9b70) at pthread_create.c:304
#5  0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 12 (Thread 0xaae3bb70 (LWP 6379)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb5351df6 in __poll (fds=0xb53e8ff4, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb485aa1b in g_poll () from /lib/libglib-2.0.so.0
#3  0xb484d43c in ?? () from /lib/libglib-2.0.so.0
#4  0xb484d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0xb61e8565 in QEventDispatcherGlib::processEvents (this=0x9537968, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#6  0xb61b8609 in QEventLoop::processEvents (this=0xaae3b290, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#7  0xb61b8a8a in QEventLoop::exec (this=0xaae3b290, flags=...) at kernel/qeventloop.cpp:201
#8  0xb60b4b7e in QThread::exec (this=0x9539de8) at thread/qthread.cpp:490
#9  0xb619735b in QInotifyFileSystemWatcherEngine::run (this=0x9539de8) at io/qfilesystemwatcher_inotify.cpp:248
#10 0xb60b7df9 in QThreadPrivate::start (arg=0x9539de8) at thread/qthread_unix.cpp:266
#11 0xb6041cc9 in start_thread (arg=0xaae3bb70) at pthread_create.c:304
---Type <return> to continue, or q <return> to quit---
#12 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 11 (Thread 0xab63cb70 (LWP 6385)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b6ef2 in QMutexPrivate::wait (this=0x8e77bf8, timeout=-1) at thread/qmutex_unix.cpp:84
#3  0xb60b25ea in QMutex::lock (this=0xb752d3e0) at thread/qmutex.cpp:204
#4  0xb7519b71 in QMutexLocker::QMutexLocker (this=0xab63b8dc, m=0xb752d3e0) at /usr/include/qt4/QtCore/qmutex.h:102
#5  0xb75198dd in KDevelop::ForegroundLock::relock (this=0xab63ba3e) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:152
#6  0xb7519926 in KDevelop::ForegroundLock::ForegroundLock (this=0xab63ba3e, lock=true) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:141
#7  0xb4e0f5b9 in KDevelop::CodeCompletionWorker::computeCompletions (this=0x9570670, context=..., position=..., view=0xb25c360)
    at /home/chaos/projects/kdevelop/kdevplatform/language/codecompletion/codecompletionworker.cpp:97
#8  0xb4e0fb92 in KDevelop::CodeCompletionWorker::qt_metacall (this=0x9570670, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbd6a828)
    at /home/chaos/projects/kdevelop/kdevplatform/build/language/codecompletionworker.moc:84
#9  0xa909e982 in Cpp::CodeCompletionWorker::qt_metacall (this=0x9570670, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbd6a828)
    at /home/chaos/projects/kdevelop/kdevelop/build/languages/cpp/worker.moc:66
#10 0xb61bf8ca in QMetaObject::metacall (object=0x9570670, cl=128, idx=5, argv=0xbd6a828) at kernel/qmetaobject.cpp:237
#11 0xb61cadf6 in QMetaCallEvent::placeMetaCall (this=0xaf85de0, object=0x9570670) at kernel/qobject.cpp:534
#12 0xb61cc6a2 in QObject::event (this=0x9570670, e=0x13) at kernel/qobject.cpp:1219
#13 0xb569efdc in QApplicationPrivate::notify_helper (this=0x8e931f0, receiver=0x9570670, e=0xaf85de0) at kernel/qapplication.cpp:4396
#14 0xb56a504e in QApplication::notify (this=0xbfb3d5dc, receiver=0x9570670, e=0xaf85de0) at kernel/qapplication.cpp:3798
#15 0xb654168a in KApplication::notify (this=0xbfb3d5dc, receiver=0x9570670, event=0xaf85de0) at ../../kdeui/kernel/kapplication.cpp:310
#16 0x0804c0cc in KDevelopApplication::notify (this=0xbfb3d5dc, receiver=0x9570670, event=0xaf85de0) at /home/chaos/projects/kdevelop/kdevelop/app/main.cpp:90
#17 0xb61b9b3b in QCoreApplication::notifyInternal (this=0xbfb3d5dc, receiver=0x9570670, event=0xaf85de0) at kernel/qcoreapplication.cpp:732
#18 0xb61bcd8b in sendEvent (receiver=0x0, event_type=0, data=0x9563a50) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9563a50) at kernel/qcoreapplication.cpp:1373
#20 0xb61bcf4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#21 0xb61e8a74 in sendPostedEvents (s=0xad7088b0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#22 postEventSourceDispatch (s=0xad7088b0) at kernel/qeventdispatcher_glib.cpp:277
#23 0xb4849855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#24 0xb484d668 in ?? () from /lib/libglib-2.0.so.0
#25 0xb484d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#26 0xb61e8565 in QEventDispatcherGlib::processEvents (this=0x9570ba8, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#27 0xb61b8609 in QEventLoop::processEvents (this=0xab63c2a0, flags=) at kernel/qeventloop.cpp:149
---Type <return> to continue, or q <return> to quit---DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.

#28 0xb61b8a8a in QEventLoop::exec (this=0xab63c2a0, flags=...) at kernel/qeventloop.cpp:201
#29 0xb60b4b7e in QThread::exec (this=0x9283f18) at thread/qthread.cpp:490
#30 0xb4e13fe1 in KDevelop::CompletionWorkerThread::run (this=0x9283f18) at /home/chaos/projects/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#31 0xb60b7df9 in QThreadPrivate::start (arg=0x9283f18) at thread/qthread_unix.cpp:266
#32 0xb6041cc9 in start_thread (arg=0xab63cb70) at pthread_create.c:304
#33 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xa8edeb70 (LWP 6386)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb5351df6 in __poll (fds=0xb53e8ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb485aa1b in g_poll () from /lib/libglib-2.0.so.0
#3  0xb484d43c in ?? () from /lib/libglib-2.0.so.0
#4  0xb484d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0xb61e8565 in QEventDispatcherGlib::processEvents (this=0x9419910, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#6  0xb61b8609 in QEventLoop::processEvents (this=0xa8ede2a0, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#7  0xb61b8a8a in QEventLoop::exec (this=0xa8ede2a0, flags=...) at kernel/qeventloop.cpp:201
#8  0xb60b4b7e in QThread::exec (this=0x956e818) at thread/qthread.cpp:490
#9  0xb4e13fe1 in KDevelop::CompletionWorkerThread::run (this=0x956e818) at /home/chaos/projects/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#10 0xb60b7df9 in QThreadPrivate::start (arg=0x956e818) at thread/qthread_unix.cpp:266
#11 0xb6041cc9 in start_thread (arg=0xa8edeb70) at pthread_create.c:304
#12 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xa76ffb70 (LWP 6403)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb5104877 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0xb52031a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#3  0xb51048c1 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0xb52031a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0xb6041cc9 in start_thread (arg=0xa76ffb70) at pthread_create.c:304
#5  0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 8 (Thread 0xa43ffb70 (LWP 6480)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb41d13a5 in ?? () from /usr/lib/libQtWebKit.so.4
---Type <return> to continue, or q <return> to quit---
#3  0xb41d1481 in ?? () from /usr/lib/libQtWebKit.so.4
#4  0xb6041cc9 in start_thread (arg=0xa43ffb70) at pthread_create.c:304
#5  0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 7 (Thread 0xa3648b70 (LWP 6534)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60491ce in __lll_timedlock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:203
#2  0xb6045352 in _L_timedlock_117 () from /lib/libpthread.so.0
#3  0xb6044bb2 in pthread_mutex_timedlock (mutex=0xb752d3c8, abstime=0xa36477e8) at pthread_mutex_timedlock.c:80
#4  0xb7519d8e in SimplePThreadMutex::tryLock (this=0xb752d3c8, interval=10) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:68
#5  0xb7518eaa in (anonymous namespace)::tryLockForegroundMutexInternal (interval=10) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:114
#6  0xb7519852 in KDevelop::ForegroundLock::relock (this=0xa3647a7f) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:154
#7  0xb7519926 in KDevelop::ForegroundLock::ForegroundLock (this=0xa3647a7f, lock=true) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:141
#8  0xb4cff783 in KDevelop::ParseJob::translateDUChainToRevision (this=0xa18a5f8, context=0xb5240c8) at /home/chaos/projects/kdevelop/kdevplatform/language/backgroundparser/parsejob.cpp:370
#9  0xa907b5b6 in CPPInternalParseJob::run (this=0x975d450) at /home/chaos/projects/kdevelop/kdevelop/languages/cpp/cppparsejob.cpp:436
#10 0xb70d6904 in ThreadWeaver::JobRunHelper::runTheJob (this=0xa364823c, th=0x9c07ab8, job=0x975d450) at ../../../threadweaver/Weaver/Job.cpp:106
#11 0xb70d6c61 in ThreadWeaver::Job::execute (this=0x975d450, th=0x9c07ab8) at ../../../threadweaver/Weaver/Job.cpp:135
#12 0xb70d8633 in ThreadWeaver::JobCollectionJobRunner::execute (this=0xc1b6c40, t=0x9c07ab8) at ../../../threadweaver/Weaver/JobCollection.cpp:82
#13 0xb70d592a in ThreadWeaver::ThreadRunHelper::run (this=0xa36482f4, parent=0x91bc850, th=0x9c07ab8) at ../../../threadweaver/Weaver/Thread.cpp:95
#14 0xb70d607b in ThreadWeaver::Thread::run (this=0x9c07ab8) at ../../../threadweaver/Weaver/Thread.cpp:142
#15 0xb60b7df9 in QThreadPrivate::start (arg=0x9c07ab8) at thread/qthread_unix.cpp:266
#16 0xb6041cc9 in start_thread (arg=0xa3648b70) at pthread_create.c:304
#17 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 6 (Thread 0xa2e47b70 (LWP 6535)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b89c7 in wait (this=0x91bc868, mutex=0x9122cc0, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0x91bc868, mutex=0x9122cc0, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb70d4030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x91bc850, th=0x9e30508) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb70d77dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x91a3c60, th=0x9e30508) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb70d355b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x91bc850, th=0x9e30508) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb70d78d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x91a3c60, th=0x9e30508) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x91bc850, th=0x9e30508, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
---Type <return> to continue, or q <return> to quit---
#9  0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x91a3c60, th=0x9e30508) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#10 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x91bc850, th=0x9e30508, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#11 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x91a3c60, th=0x9e30508) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#12 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x91bc850, th=0x9e30508, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#13 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0x91a3c60, th=0x9e30508) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#14 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0x91bc850, th=0x9e30508, previous=0xb6db190) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#15 0xb70d595e in ThreadWeaver::ThreadRunHelper::run (this=0xa2e472f4, parent=0x91bc850, th=0x9e30508) at ../../../threadweaver/Weaver/Thread.cpp:87
#16 0xb70d607b in ThreadWeaver::Thread::run (this=0x9e30508) at ../../../threadweaver/Weaver/Thread.cpp:142
#17 0xb60b7df9 in QThreadPrivate::start (arg=0x9e30508) at thread/qthread_unix.cpp:266
#18 0xb6041cc9 in start_thread (arg=0xa2e47b70) at pthread_create.c:304
#19 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xacfcab70 (LWP 7001)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b89c7 in wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb70d4030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5ba4f0, th=0xb67b688) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb70d77dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xb3f6a58, th=0xb67b688) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb70d355b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xb5ba4f0, th=0xb67b688) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb70d78d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0xb67b688) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0xb67b688, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0xb67b688) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#10 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0xb67b688, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#11 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0xb67b688) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#12 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0xb67b688, previous=0xc1ba870) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#13 0xb70d595e in ThreadWeaver::ThreadRunHelper::run (this=0xacfca2f4, parent=0xb5ba4f0, th=0xb67b688) at ../../../threadweaver/Weaver/Thread.cpp:87
#14 0xb70d607b in ThreadWeaver::Thread::run (this=0xb67b688) at ../../../threadweaver/Weaver/Thread.cpp:142
#15 0xb60b7df9 in QThreadPrivate::start (arg=0xb67b688) at thread/qthread_unix.cpp:266
#16 0xb6041cc9 in start_thread (arg=0xacfcab70) at pthread_create.c:304
#17 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0x993ffb70 (LWP 7002)):
#0  0xb77cf424 in __kernel_vsyscall ()
---Type <return> to continue, or q <return> to quit---
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b89c7 in wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb70d4030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5ba4f0, th=0x9d0fe2b0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb70d77dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xb3f6a58, th=0x9d0fe2b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb70d355b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xb5ba4f0, th=0x9d0fe2b0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb70d78d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9d0fe2b0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9d0fe2b0, previous=0xa7dac90) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb70d595e in ThreadWeaver::ThreadRunHelper::run (this=0x993ff2f4, parent=0xb5ba4f0, th=0x9d0fe2b0) at ../../../threadweaver/Weaver/Thread.cpp:87
#10 0xb70d607b in ThreadWeaver::Thread::run (this=0x9d0fe2b0) at ../../../threadweaver/Weaver/Thread.cpp:142
#11 0xb60b7df9 in QThreadPrivate::start (arg=0x9d0fe2b0) at thread/qthread_unix.cpp:266
#12 0xb6041cc9 in start_thread (arg=0x993ffb70) at pthread_create.c:304
#13 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0x987eeb70 (LWP 7294)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b89c7 in wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb70d4030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5ba4f0, th=0x9e23998) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb70d77dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb70d355b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xb5ba4f0, th=0x9e23998) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb70d78d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#10 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#11 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#12 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#13 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#14 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#15 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#16 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#17 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#18 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
---Type <return> to continue, or q <return> to quit---
#19 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#20 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#21 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#22 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#23 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#24 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#25 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#26 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#27 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#28 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#29 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#30 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#31 0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9e23998) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#32 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9e23998, previous=0xa801f88) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#33 0xb70d595e in ThreadWeaver::ThreadRunHelper::run (this=0x987ee2f4, parent=0xb5ba4f0, th=0x9e23998) at ../../../threadweaver/Weaver/Thread.cpp:87
#34 0xb70d607b in ThreadWeaver::Thread::run (this=0x9e23998) at ../../../threadweaver/Weaver/Thread.cpp:142
#35 0xb60b7df9 in QThreadPrivate::start (arg=0x9e23998) at thread/qthread_unix.cpp:266
#36 0xb6041cc9 in start_thread (arg=0x987eeb70) at pthread_create.c:304
#37 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0x97fedb70 (LWP 7295)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb60464dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb60b89c7 in wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xb5ba508, mutex=0xa7698b8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0xb70d4030 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5ba4f0, th=0x9b9bbe18) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#5  0xb70d77dc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xb3f6a58, th=0x9b9bbe18) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#6  0xb70d355b in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xb5ba4f0, th=0x9b9bbe18) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#7  0xb70d78d2 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9b9bbe18) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#8  0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9b9bbe18, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb70d78f1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xb3f6a58, th=0x9b9bbe18) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#10 0xb70d4533 in ThreadWeaver::WeaverImpl::applyForWork (this=0xb5ba4f0, th=0x9b9bbe18, previous=0xadd9218) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#11 0xb70d595e in ThreadWeaver::ThreadRunHelper::run (this=0x97fed2f4, parent=0xb5ba4f0, th=0x9b9bbe18) at ../../../threadweaver/Weaver/Thread.cpp:87
#12 0xb70d607b in ThreadWeaver::Thread::run (this=0x9b9bbe18) at ../../../threadweaver/Weaver/Thread.cpp:142
---Type <return> to continue, or q <return> to quit---
#13 0xb60b7df9 in QThreadPrivate::start (arg=0x9b9bbe18) at thread/qthread_unix.cpp:266
#14 0xb6041cc9 in start_thread (arg=0x97fedb70) at pthread_create.c:304
#15 0xb536069e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb2ee0710 (LWP 6329)):
#0  0xb77cf424 in __kernel_vsyscall ()
#1  0xb6049169 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0xb60445cb in _L_lock_748 () from /lib/libpthread.so.0
#3  0xb60443f1 in __pthread_mutex_lock (mutex=0xb752d3c8) at pthread_mutex_lock.c:61
#4  0xb7519c8d in SimplePThreadMutex::lock (this=0xb752d3c8) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:46
#5  0xb7518d5e in (anonymous namespace)::lockForegroundMutexInternal () at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:100
#6  0xb75195c9 in KDevelop::ForegroundLock::relock (this=0xbfb3d00f) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:150
#7  0xb7519926 in KDevelop::ForegroundLock::ForegroundLock (this=0xbfb3d00f, lock=true) at /home/chaos/projects/kdevelop/kdevplatform/interfaces/foregroundlock.cpp:141
#8  0x0804c0b3 in KDevelopApplication::notify (this=0xbfb3d5dc, receiver=0xb818720, event=0x9b8d130) at /home/chaos/projects/kdevelop/kdevelop/app/main.cpp:89
#9  0xb61b9b3b in QCoreApplication::notifyInternal (this=0xbfb3d5dc, receiver=0xb818720, event=0x9b8d130) at kernel/qcoreapplication.cpp:732
#10 0xb61bcd8b in sendEvent (receiver=0x0, event_type=0, data=0x8e76f30) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#11 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8e76f30) at kernel/qcoreapplication.cpp:1373
#12 0xb61bcf4d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#13 0xb61e8a74 in sendPostedEvents (s=0x8e95710) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#14 postEventSourceDispatch (s=0x8e95710) at kernel/qeventdispatcher_glib.cpp:277
#15 0xb4849855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#16 0xb484d668 in ?? () from /lib/libglib-2.0.so.0
#17 0xb484d848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#18 0xb61e8565 in QEventDispatcherGlib::processEvents (this=0x8e769e0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#19 0xb5760be5 in QGuiEventDispatcherGlib::processEvents (this=0x8e769e0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#20 0xb61b8609 in QEventLoop::processEvents (this=0xbfb3d384, flags=) at kernel/qeventloop.cpp:149
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
#21 0xb61b8a8a in QEventLoop::exec (this=0xbfb3d384, flags=...) at kernel/qeventloop.cpp:201
#22 0xb61bd00f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#23 0xb569de07 in QApplication::exec () at kernel/qapplication.cpp:3672
#24 0x080516c8 in main (argc=<value optimized out>, argv=) at /home/chaos/projects/kdevelop/kdevelop/app/main.cpp:468
Cannot access memory at address 0x84
Comment 4 David Nolden 2011-01-19 18:53:27 UTC
commit 4e60528e14dbee73c9a99ace06a04351778e29e5
branch master
Author: David Nolden <david.nolden.kde@art-master.de>
Date:   Wed Jan 19 18:51:38 2011 +0100

    Don't acquire the foreground lock twice recursively, once is enough.
    CCBUG: 263522

diff --git a/language/codecompletion/codecompletionworker.cpp b/language/codecompletion/codecompletionworker.cpp
index 3b9b3ab..ea6e1ad 100644
--- a/language/codecompletion/codecompletionworker.cpp
+++ b/language/codecompletion/codecompletionworker.cpp
@@ -94,7 +94,6 @@ void CodeCompletionWorker::computeCompletions(KDevelop::DUContextPointer context
   KTextEditor::Range range;
   QString text;
   {
-    ForegroundLock lockForeground;
     QMutexLocker lock(m_mutex);
     DUChainReadLocker lockDUChain;
Comment 5 David Nolden 2011-01-19 18:53:27 UTC
commit 807bf1edb84a6cbe5214c1746cbb12040c18c4c8
branch master
Author: David Nolden <david.nolden.kde@art-master.de>
Date:   Wed Jan 19 18:48:49 2011 +0100

    Don't try entering the "release+trylock" loop if we already hold the foreground lock. Else, we might get a deadlock if acquire it recursively.
    BUG: 263522

diff --git a/interfaces/foregroundlock.cpp b/interfaces/foregroundlock.cpp
index 3409b7b..0cdfbef 100644
--- a/interfaces/foregroundlock.cpp
+++ b/interfaces/foregroundlock.cpp
@@ -145,7 +145,9 @@ void KDevelop::ForegroundLock::relock()
 {
     Q_ASSERT(!m_locked);
     
-    if(!QApplication::instance() || QThread::currentThread() == QApplication::instance()->thread())
+    if(!QApplication::instance() || // Initialization isn't complete yet
+        QThread::currentThread() == QApplication::instance()->thread() || // We're the main thread (deadlock might happen if we'd enter the trylock loop)
+        holderThread == QThread::currentThread())  // We already have the foreground lock (deadlock might happen if we'd enter the trylock loop)
     {
         lockForegroundMutexInternal();
     }else{