[kdevelop] [Bug 359496] KDev hang with too many threads
https://bugs.kde.org/show_bug.cgi?id=359496 Sven Brauch changed: What|Removed |Added CC||m...@svenbrauch.de --- Comment #3 from Sven Brauch --- I'm not exactly sure about the circumstances leading to this crash, but one thing that is definitely very bad is that AdaptSignatureAction::execute() calls waitForUpdate from the foreground. That needs to be changed. Similarly, clang has a few places where it acquires a duchain lock in the foreground without a timeout. The parse job constructor is such a place. I think that is a very bad idea as well. -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 359496] KDev hang with too many threads
https://bugs.kde.org/show_bug.cgi?id=359496 Alexander Potashev changed: What|Removed |Added CC||aspotas...@gmail.com --- Comment #2 from Alexander Potashev --- I don't know if I'm qualified for this party, but KDevelop has hung up here as well: === (gdb) thread apply all bt Thread 14 (Thread 0x7f947a79a700 (LWP 21357)): #0 0x7f94de2e5bd0 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0 #1 0x7f94dddafbc4 in QTWTF::TCMalloc_PageHeap::scavengerThread() () at /lib64/libQt5Script.so.5 #2 0x7f94dddafc09 in () at /lib64/libQt5Script.so.5 #3 0x7f94de2e05ca in start_thread () at /lib64/libpthread.so.0 #4 0x7f94e51c4ead in clone () at /lib64/libc.so.6 Thread 13 (Thread 0x7f947bfff700 (LWP 21254)): #0 0x7f94e51b932d in poll () at /lib64/libc.so.6 #1 0x7f94db9fca46 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #2 0x7f94db9fcb5c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #3 0x7f94e5fbf24b in QEventDispatcherGlib::processEvents(QFlags) () at /lib64/libQt5Core.so.5 #4 0x7f94e5f6e5ea in QEventLoop::exec(QFlags) () at /lib64/libQt5Core.so.5 #5 0x7f94e5dcd343 in QThread::exec() () at /lib64/libQt5Core.so.5 #6 0x7f94e3310f95 in KDevelop::CompletionWorkerThread::run() () at /lib64/libKDevPlatformLanguage.so.10 #7 0x7f94e5dd199a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5 #8 0x7f94de2e05ca in start_thread () at /lib64/libpthread.so.0 #9 0x7f94e51c4ead in clone () at /lib64/libc.so.6 Thread 12 (Thread 0x7f9495ffb700 (LWP 21143)): #0 0x7f94e51b932d in poll () at /lib64/libc.so.6 #1 0x7f94db9fca46 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #2 0x7f94db9fcb5c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #3 0x7f94e5fbf22f in QEventDispatcherGlib::processEvents(QFlags) () at /lib64/libQt5Core.so.5 #4 0x7f94e5f6e5ea in QEventLoop::exec(QFlags) () at /lib64/libQt5Core.so.5 #5 0x7f94e5dcd343 in QThread::exec() () at /lib64/libQt5Core.so.5 #6 0x7f94e5dd199a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5 #7 0x7f94de2e05ca in start_thread () at /lib64/libpthread.so.0 #8 0x7f94e51c4ead in clone () at /lib64/libc.so.6 Thread 11 (Thread 0x7f94967fc700 (LWP 21033)): #0 0x7f94e518a82d in nanosleep () at /lib64/libc.so.6 #1 0x7f94e5e6db0d in qt_nanosleep(timespec) () at /lib64/libQt5Core.so.5 #2 0x7f94e5dd0de4 in QThread::usleep(unsigned long) () at /lib64/libQt5Core.so.5 #3 0x7f94e3256995 in KDevelop::DUChainLock::lockForWrite(unsigned int) () at /lib64/libKDevPlatformLanguage.so.10 #4 0x7f94e3256c3b in KDevelop::DUChainWriteLocker::lock() () at /lib64/libKDevPlatformLanguage.so.10 #5 0x7f94e3256bd4 in KDevelop::DUChainWriteLocker::DUChainWriteLocker(KDevelop::DUChainLock*, unsigned int) () at /lib64/libKDevPlatformLanguage.so.10 #6 0x7f94ab284267 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #7 0x7f94ab2840b1 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #8 0x7f94ab2840b1 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #9 0x7f94ab2840b1 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #10 0x7f94ab2840b1 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #11 0x7f94ab2840b1 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #12 0x7f94ab2840b1 in ClangHelpers::buildDUChain(void*, QMultiHash const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash&, ClangIndex*, std::function const&) () at /lib64/libKDevClangPrivate.so.25 #13 0x7f94ab508007 in ClangParseJob::run(QSharedPointer, ThreadWeaver::Thread*) () at /usr/lib64/qt5/plugins/kdevplatform/25/kdevclangsupport.so #14 0x7f94e216ebda in ThreadWeaver::IdDecorator::run(QSharedPointer, ThreadWeaver::Thread*) () at /lib64/libKF5ThreadWeaver.so.5 #15 0x7f94e216f1e8 in ThreadWeaver::Executor::run(QSharedPointer const&, ThreadWeaver::Thread*) () at /lib64/libKF5ThreadWeaver.so.5 ---T
[kdevelop] [Bug 359496] KDev hang with too many threads
https://bugs.kde.org/show_bug.cgi?id=359496 Milian Wolff changed: What|Removed |Added Status|UNCONFIRMED |CONFIRMED Ever confirmed|0 |1 --- Comment #1 from Milian Wolff --- pasting important part inline: Thread 33 (Thread 0x7f4027429700 (LWP 28197)): #0 0x0030008df3ad in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x00300300a2a2 in poll (__timeout=-1, __nfds=1, __fds=0x7f4027428d50) at /usr/include/bits/poll2.h:46 #2 _xcb_conn_wait (c=c@entry=0xfe86e0, cond=cond@entry=0xfe8720, vector=vector@entry=0x0, count=count@entry=0x0) at /var/tmp/portage/x11-libs/libxcb-1.11.1/work/libxcb-1.11.1/src/xcb_conn.c:459 #3 0x00300300be2f in xcb_wait_for_event (c=0xfe86e0) at /var/tmp/portage/x11-libs/libxcb-1.11.1/work/libxcb-1.11.1/src/xcb_in.c:693 #4 0x7f40278c7539 in QXcbEventReader::run (this=0xff2db0) at qxcbconnection.cpp:1229 #5 0x00300869ea73 in QThreadPrivate::start (arg=0xff2db0) at thread/qthread_unix.cpp:331 #6 0x003000c07324 in start_thread (arg=0x7f4027429700) at pthread_create.c:333 #7 0x0030008e81cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 32 (Thread 0x7f401eefe700 (LWP 28199)): #0 0x0030008b833d in nanosleep () at ../sysdeps/unix/syscall-template.S:81 #1 0x00300873974d in qt_nanosleep (amount=...) at tools/qelapsedtimer_unix.cpp:185 #2 0x00300869dfe4 in QThread::usleep (usecs=usecs@entry=500) at thread/qthread_unix.cpp:475 #3 0x7f4027d75cde in KDevelop::DUChainLock::lockForWrite(unsigned int) (this=0x7f40282a58a0 , timeout=0) at /home/pedro.ferreira/src/kdev/kdevplatform/language/duchain/duchainlock.cpp:155 #4 0x7f4027d75dcc in KDevelop::DUChainWriteLocker::lock() (this=0x7f401eefdda0) at /home/pedro.ferreira/src/kdev/kdevplatform/language/duchain/duchainlock.cpp:249 #5 0x7f4027d3254c in KDevelop::DUChainPrivate::doMoreCleanup(int, bool) (this=0x7f40282a5880 , retries=retries@entry=1, needLockRepository=needLockRepository@entry=true) at /home/pedro.ferreira/src/kdev/kdevplatform/language/duchain/duchain.cpp:699 #6 0x7f4027d352c1 in KDevelop::DUChainPrivate::CleanupThread::run() (this=0x414d460) at /home/pedro.ferreira/src/kdev/kdevplatform/language/duchain/duchain.cpp:289 #7 0x00300869ea73 in QThreadPrivate::start (arg=0x414d460) at thread/qthread_unix.cpp:331 #8 0x003000c07324 in start_thread (arg=0x7f401eefe700) at pthread_create.c:333 #9 0x0030008e81cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 ... way too many threadweaver threads waiting for jobs to be assigned Thread 14 (Thread 0x7f3fc194f700 (LWP 28221)): #0 0x0030008df3ad in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x003002048f34 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f3fbc0031b0, timeout=-1, context=0x7f3fbc000990) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:4103 #2 g_main_context_iterate (context=context@entry=0x7f3fbc000990, block=block@entry=1, dispatch=dispatch@entry=1, self=) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3803 #3 0x00300204903c in g_main_context_iteration (context=0x7f3fbc000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3869 #4 0x003004a7 in QEventDispatcherGlib::processEvents (this=0x7f3fbc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418 #5 0x00300883c69a in QEventLoop::exec (this=this@entry=0x7f3fc194ed90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #6 0x00300869a20c in QThread::exec (this=this@entry=0x4673200) at thread/qthread.cpp:503 #7 0x7f4027df10f6 in run (this=0x4673200) at /home/pedro.ferreira/src/kdev/kdevplatform/language/codecompletion/codecompletionmodel.cpp:89 #8 0x00300869ea73 in QThreadPrivate::start (arg=0x4673200) at thread/qthread_unix.cpp:331 #9 0x003000c07324 in start_thread (arg=0x7f3fc194f700) at pthread_create.c:333 #10 0x0030008e81cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 13 (Thread 0x7f3fc08ed700 (LWP 28292)): #0 0x0030008df3ad in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x003002048f34 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f3fb4002e70, timeout=-1, context=0x7f3fb4000990) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:4103 #2 g_main_context_iterate (context=context@entry=0x7f3fb4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3803 #3 0x00300204903c in g_main_context_iteration (context=0x7f3fb4000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.44.1-r1/work/glib-2.44.1/glib/gmain.c:3869 #4 0x003004a7 in QEventDispatcherGlib::processEvents (this=0x7f3fb40008c0, fl