Bug 223770 - Kdevelop crashed during scheduled project reparsing
Summary: Kdevelop crashed during scheduled project reparsing
Status: RESOLVED DUPLICATE of bug 206775
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-22 11:39 UTC by Vadym Krevs
Modified: 2010-01-22 18:30 UTC (History)
0 users

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 Vadym Krevs 2010-01-22 11:39:41 UTC
Application that crashed: kdevelop
Version of the application: 3.9.97 (using KDevPlatform 0.9.97)
KDE Version: 4.3.4 (KDE 4.3.4) "release 2"
Qt Version: 4.5.3
Operating System: Linux 2.6.31.8-0.1-default x86_64
Distribution: "openSUSE 11.2 (x86_64)"

What I was doing when the application crashed:
Kdevelop rebuilt from SVN this morning. Scheduled a project for reparsing. Closed and restarted Kdevelop (why is this necessary - cannot there be a button on the toolbar to kick off reparsing???). Kdevelop started reparsing. I left it alone and decided to get a cup of coffee. When I came back 10 min later, Kdevelop crashed. FYI, I'm running with 
MALLOC_CHECK_=3 so glibc will not try to workaround bad pointers.


 -- Backtrace:
Application: KDevelop (kdevelop), signal: Aborted
pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
261		movl	(%rsp), %edi
The current source language is "auto; currently asm".
[Current thread is 1 (Thread 0x7ffbe8fa7750 (LWP 28965))]

Thread 12 (Thread 0x7ffbd4d9c910 (LWP 28968)):
[KCrash Handler]
#5  0x00007ffbe41664e5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007ffbe41679b0 in abort () at abort.c:88
#7  0x00007ffbe41a166d in __libc_message (do_abort=2, fmt=
    0x7ffbd4d9ae70 ' ' <repeats 23 times>, "[vdso]\nffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0", ' ' <repeats 18 times>, "[vsyscall]\n00 r--p 00000000 08:06 5698", ' ' <repeats 23 times>, "/usr/lib/locale/en_GB.utf8/LC_ADDRES"...) at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#8  0x00007ffbe41a6c76 in malloc_printerr (action=3, str=0x7ffbe42539f7 "free(): invalid pointer", ptr=<value optimized out>) at malloc.c:6239
#9  0x00007ffbcbb5e197 in KDevelop::ItemRepository<rpp::pp_macro, MacroRepositoryItemRequest, true, true, 0u, 1048576u>::store() () from /builds/kdevelop4/lib64/libkdev4cppduchain.so
#10 0x00007ffbe28b930c in KDevelop::ItemRepositoryRegistry::store (this=0x632610) at /builds/src/kdevplatform/language/duchain/repositories/itemrepository.cpp:344
#11 0x00007ffbe27f73c5 in KDevelop::DUChainPrivate::doMoreCleanup (this=0x8e4a40, retries=<value optimized out>, needLockRepository=<value optimized out>)
    at /builds/src/kdevplatform/language/duchain/duchain.cpp:856
#12 0x00007ffbe27f7652 in KDevelop::DUChainPrivate::doMoreCleanup (this=0x8e4a40, retries=<value optimized out>, needLockRepository=<value optimized out>)
    at /builds/src/kdevplatform/language/duchain/duchain.cpp:881
#13 0x00007ffbe27f7d44 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x7f9fb0) at /builds/src/kdevplatform/language/duchain/duchain.cpp:294
#14 0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#15 0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#16 0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7ffbcf56e910 (LWP 28987)):
#0  0x00007ffbe41fc033 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffbdf3bc58c in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ffbdf3bc8d0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffbe5d783f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007ffbe5d4e712 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007ffbe5d4eae4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007ffbe5c6771b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe5d31d48 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#10 0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()
The current source language is "auto; currently c".

Thread 10 (Thread 0x7ffbcabba910 (LWP 28989)):
#0  0x00007ffbe59f8d5c in __pthread_mutex_lock (mutex=0x33caf68) at pthread_mutex_lock.c:62
#1  0x00007ffbdf3bbcf1 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ffbdf3bc4a0 in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffbdf3bc8d0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007ffbe5d783f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007ffbe5d4e712 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007ffbe5d4eae4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe5c6771b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#8  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#10 0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7ffbca3b9910 (LWP 28990)):
#0  0x00007ffbdf3bbcf8 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#1  0x00007ffbdf3bc4a0 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ffbdf3bc8d0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffbe5d783f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007ffbe5d4e712 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007ffbe5d4eae4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007ffbe5c6771b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#9  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7ffbc9bb8910 (LWP 28991)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220
#1  0x00007ffbe5c69f15 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe5c6a080 in QThread::msleep(unsigned long) () from /usr/lib64/libQtCore.so.4
#3  0x00007ffbcc02e1e1 in UIBlockTester::UIBlockTesterThread::run (this=0x305be40) at /builds/src/kdevelop/languages/cpp/cpplanguagesupport.cpp:672
#4  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#5  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7ffbc8f62910 (LWP 28992)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c6b53b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe7466ab6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007ffbe7468beb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007ffbe7468c04 in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffbe74671ef in ?? () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffbe7467648 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#7  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#9  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()
The current source language is "auto; currently asm".

Thread 6 (Thread 0x7ffbc8761910 (LWP 28993)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c6b53b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe7466ab6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007ffbe7468beb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007ffbe74671ef in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffbe7467648 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#8  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7ffbc7f60910 (LWP 28994)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c6b53b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe7466ab6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007ffbe7468beb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007ffbe7468c04 in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffbe74671ef in ?? () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffbe7467648 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#7  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#9  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7ffbc775f910 (LWP 28996)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c6b53b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe7466ab6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007ffbe7468beb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007ffbe74671ef in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffbe7467648 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#8  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7ffbc6f5e910 (LWP 28997)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c6b53b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe7466ab6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007ffbe7468beb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007ffbe74671ef in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffbe7467648 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#8  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ffbc675d910 (LWP 29000)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c6b53b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe7466ab6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007ffbe7468beb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007ffbe74671ef in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007ffbe7467648 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007ffbe5c6a485 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007ffbe59f665d in start_thread (arg=<value optimized out>) at pthread_create.c:297
#8  0x00007ffbe420514d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffbe8fa7750 (LWP 28965)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffbe5c69cd3 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffbe5c65895 in QMutex::lock() () from /usr/lib64/libQtCore.so.4
#3  0x00007ffbe28b7a9a in relock (this=<value optimized out>) at /usr/include/QtCore/qmutex.h:120
#4  QMutexLocker (this=<value optimized out>) at /usr/include/QtCore/qmutex.h:102
#5  KDevelop::ItemRepositoryRegistry::unRegisterRepository (this=<value optimized out>) at /builds/src/kdevplatform/language/duchain/repositories/itemrepository.cpp:173
#6  0x00007ffbe27d55cf in KDevelop::ItemRepository<KDevelop::CodeModelRepositoryItem, KDevelop::CodeModelRequestItem, true, true, 0u, 1048576u>::~ItemRepository (this=0x3b223b0, 
    __in_chrg=<value optimized out>) at /builds/src/kdevplatform/language/duchain/repositories/itemrepository.h:1324
#7  0x00007ffbe27d2021 in ~CodeModelPrivate (this=<value optimized out>, __in_chrg=<value optimized out>) at /builds/src/kdevplatform/language/duchain/codemodel.cpp:154
#8  KDevelop::CodeModel::~CodeModel (this=<value optimized out>, __in_chrg=<value optimized out>) at /builds/src/kdevplatform/language/duchain/codemodel.cpp:169
#9  0x00007ffbe4169065 in __run_exit_handlers (status=1, listp=0x7ffbe44894a8, run_list_atexit=true) at exit.c:78
#10 0x00007ffbe41690b5 in exit (status=6496268) at exit.c:100
#11 0x00007ffbe4e02628 in ?? () from /usr/lib64/libQtGui.so.4
#12 0x00007ffbe64b8908 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib64/libkdeui.so.5
#13 0x00007ffbe117e2be in _XIOError () from /usr/lib64/libX11.so.6
#14 0x00007ffbe1185c95 in ?? () from /usr/lib64/libX11.so.6
#15 0x00007ffbe1186547 in _XEventsQueued () from /usr/lib64/libX11.so.6
#16 0x00007ffbe116f24b in XEventsQueued () from /usr/lib64/libX11.so.6
#17 0x00007ffbe4e3a547 in ?? () from /usr/lib64/libQtGui.so.4
#18 0x00007ffbdf3bbfca in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#19 0x00007ffbdf3bc3a1 in ?? () from /usr/lib64/libglib-2.0.so.0
#20 0x00007ffbdf3bc8d0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#21 0x00007ffbe5d783f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#22 0x00007ffbe4e3a31e in ?? () from /usr/lib64/libQtGui.so.4
#23 0x00007ffbe5d4e712 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#24 0x00007ffbe5d4eae4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#25 0x00007ffbe5d50c99 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#26 0x00000000004061e7 in main (argc=<value optimized out>, argv=<value optimized out>) at /builds/src/kdevelop/app/main.cpp:209

Reported using DrKonqi
Comment 1 Andreas Pakulat 2010-01-22 14:42:53 UTC
(In reply to comment #0)
> What I was doing when the application crashed:
> Kdevelop rebuilt from SVN this morning. Scheduled a project for reparsing.
> Closed and restarted Kdevelop (why is this necessary - cannot there be a button
> on the toolbar to kick off reparsing???). Kdevelop started reparsing. I left it
> alone and decided to get a cup of coffee. When I came back 10 min later,
> Kdevelop crashed. FYI, I'm running with 
> MALLOC_CHECK_=3 so glibc will not try to workaround bad pointers.

Instead it'll simply crash because of a race condition in exactly that error-checking code. See the original report for a link to the sourceware bugreport and ask your distro to fix their libc packages.

*** This bug has been marked as a duplicate of bug 206775 ***
Comment 2 Vadym Krevs 2010-01-22 16:16:16 UTC
glibc-2.10.1-10.4.x86_64 shipped with opensuse 11.2 already contains the fix from the sourceware bugreport as it was an opensuse developer who implemented it. Yet kdevelop still crashes (and is the only KDE 4.x application that crashes regularly).
Comment 3 Andreas Pakulat 2010-01-22 17:41:29 UTC
(In reply to comment #2)
> glibc-2.10.1-10.4.x86_64 shipped with opensuse 11.2 already contains the fix

Where/How can I see that? I've tried to find a changelog of the patches that SuSE applied to this package, but the ones I found didn't mention the related
upstream bug.

> from the sourceware bugreport as it was an opensuse developer who implemented
> it. Yet kdevelop still crashes (and is the only KDE 4.x application that
> crashes regularly).

In the upstream libc it was comitted for 2.11.1, so SuSE would need to have backported it and as I said I can't find a trace of that.

That said one of the kdev developers also hits the crash, even when unsetting MALLOC_CHECK_ variable. He said that his libc is 2.11.1 and the source is equal to upstream, he tries to track down where exactly it crashes inside libc for him.

And on a last note: If it were a bug in KDevelop which the malloc-check uncovers, you wouldn't see the abort from inside the malloc_printerr as far as I understood the libc code.
Comment 4 Vadym Krevs 2010-01-22 18:30:09 UTC
If you unpack the glibc source rpm for opensuse 11.2 (ftp://ftp5.gwdg.de/pub/opensuse/source/distribution/11.2/repo/oss/suse/src/glibc-2.10.1-10.4.src.rpm), you will find the glibc-2.10-mcheck-free-race.diff patch which is identical to the one in glibc's bugzilla.