Summary: | deadlock during editing c++ code | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Chaos A.D. <chaos-ad> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | david.nolden.kde |
Priority: | VHI | ||
Version: | git master | ||
Target Milestone: | 4.2.0 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Chaos A.D.
2011-01-18 10:22:20 UTC
David: Seems like your hunch was correct and that changeset created a new deadlock possibility. Can you fix it? Thanks Is this reproducible? Please compile kdevelop and kdevplatform in debug mode, so that the backtraces have line-numbers attached, and then re-post it. 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 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; 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{ |