Bug 214298 - preprocessor can run oom on certain constructs [rpp::Stream::operator<<]
Summary: preprocessor can run oom on certain constructs [rpp::Stream::operator<<]
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 314198 329699 336732 336963 339920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-12 19:51 UTC by Shriram
Modified: 2016-03-09 08:26 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
massif output (139.40 KB, application/x-gzip)
2009-11-13 23:22 UTC, Shriram
Details
more massif output (27.10 KB, application/x-gzip)
2009-11-14 00:05 UTC, Shriram
Details
New crash information added by DrKonqi (23.17 KB, text/plain)
2011-12-30 12:02 UTC, tim blechmann
Details
massif data (81.69 KB, application/x-lzma)
2011-12-30 16:07 UTC, tim blechmann
Details
(partial) massif file when parsing delay.c via duchainify (888.08 KB, application/octet-stream)
2011-12-30 17:28 UTC, Milian Wolff
Details
Backtrace when importing LLVM (15.86 KB, application/octet-stream)
2012-10-18 08:23 UTC, Job Noorman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shriram 2009-11-12 19:51:55 UTC
Application that crashed: kdevelop
Version of the application: 3.9.96 (using KDevPlatform 0.9.96)
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.3
Operating System: Linux 2.6.29.4-167.fc11.px3.x86_64 x86_64
Distribution: "Fedora release 11 (Leonidas)"

What I was doing when the application crashed:
Load a large project with about 10000 files and 6 million lines of code. Kdevelop takes up 14gigs (runs out of mem) and crashes.

#
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
#
19339 shriram   20   0 13.5g  11g  41m T  0.0 71.3  83:40.73 kdevelop
#
 

 -- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fe31baee820 (LWP 19339))]

Thread 13 (Thread 0x7fe301da8910 (LWP 19407)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe3187d256c in QReadWriteLock::lockForWrite() () from /usr/lib64/libQtCore.so.4
#3  0x00007fe315107f61 in KDevelop::DUChainPrivate::doMoreCleanup (this=0x3784800, retries=<value optimized out>, needLockRepository=<value optimized out>)
    at /home/shriram/kdevelop/kdevplatform/language/duchain/duchain.cpp:674
#4  0x00007fe315108f04 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x3792710) at /home/shriram/kdevelop/kdevplatform/language/duchain/duchain.cpp:288
#5  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#7  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7fe2fbfff910 (LWP 19408)):
#0  0x00007fe316d2cf73 in poll () from /lib64/libc.so.6
#1  0x00007fe31056209c in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007fe3105623e0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fe3188e3f8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fe3188ba4b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fe3188ba884 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fe3187d3f3b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fe31889db98 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#10 0x00007fe316d3625d in clone () from /lib64/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7fe2f374a910 (LWP 19412)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe319fc2af6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fe319fc4bfb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fe319fc321f in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fe319fc3658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#8  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7fe2f2348910 (LWP 19417)):
#0  0x00007fe316d2cf73 in poll () from /lib64/libc.so.6
#1  0x00007fe31056209c in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007fe3105623e0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fe3188e3f8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fe3188ba4b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fe3188ba884 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fe3187d3f3b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fe31889db98 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#10 0x00007fe316d3625d in clone () from /lib64/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fe2f1947910 (LWP 19420)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe319fc2af6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fe319fc4bfb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fe319fc321f in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fe319fc3658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#8  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fe2ce3c2910 (LWP 19704)):
#0  0x00007fe316d2cf73 in poll () from /lib64/libc.so.6
#1  0x00007fe31056209c in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007fe3105623e0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fe3188e3f8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fe3188ba4b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fe3188ba884 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fe3187d3f3b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#9  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fe2cd9c1910 (LWP 19705)):
#0  0x00007fe316d2cf73 in poll () from /lib64/libc.so.6
#1  0x00007fe31056209c in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007fe3105623e0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fe3188e3f8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fe3188ba4b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fe3188ba884 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fe3187d3f3b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#9  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fe2c89be910 (LWP 19706)):
#0  0x00007fe31856c57d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d6785 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007fe3187d68f0 in QThread::msleep(unsigned long) () from /usr/lib64/libQtCore.so.4
#3  0x00007fe2ceb83541 in UIBlockTester::UIBlockTesterThread::run (this=0x5e6eaf0) at /home/shriram/kdevelop/kdevelop/languages/cpp/cpplanguagesupport.cpp:647
#4  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#5  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#6  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fe2c7fbd910 (LWP 19707)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe3187d2ba7 in QReadWriteLock::lockForRead() () from /usr/lib64/libQtCore.so.4
#3  0x00007fe2ceb94deb in QReadLocker::relock (this=<value optimized out>) at /usr/include/QtCore/qreadwritelock.h:111
#4  QReadLocker (this=<value optimized out>) at /usr/include/QtCore/qreadwritelock.h:133
#5  CPPInternalParseJob::run (this=<value optimized out>) at /home/shriram/kdevelop/kdevelop/languages/cpp/cppparsejob.cpp:420
#6  0x00007fe319fc3efd in ?? () from /usr/lib64/libthreadweaver.so.4
#7  0x00007fe319fc41fe in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fe319fc5523 in ?? () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fe319fc31ef in ?? () from /usr/lib64/libthreadweaver.so.4
#10 0x00007fe319fc3658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#11 0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#12 0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#13 0x00007fe316d3625d in clone () from /lib64/libc.so.6
#14 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fe2a5eb3910 (LWP 19709)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe3187d2ba7 in QReadWriteLock::lockForRead() () from /usr/lib64/libQtCore.so.4
#3  0x00007fe2ceb94deb in QReadLocker::relock (this=<value optimized out>) at /usr/include/QtCore/qreadwritelock.h:111
#4  QReadLocker (this=<value optimized out>) at /usr/include/QtCore/qreadwritelock.h:133
#5  CPPInternalParseJob::run (this=<value optimized out>) at /home/shriram/kdevelop/kdevelop/languages/cpp/cppparsejob.cpp:420
#6  0x00007fe319fc3efd in ?? () from /usr/lib64/libthreadweaver.so.4
#7  0x00007fe319fc41fe in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fe319fc5523 in ?? () from /usr/lib64/libthreadweaver.so.4
#9  0x00007fe319fc31ef in ?? () from /usr/lib64/libthreadweaver.so.4
#10 0x00007fe319fc3658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#11 0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#12 0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#13 0x00007fe316d3625d in clone () from /lib64/libc.so.6
#14 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fe2c75bc910 (LWP 19710)):
[KCrash Handler]
#5  QVector<unsigned int>::realloc (this=0x7fe2c75b6c50, asize=579827905, aalloc=-493913916) at /usr/include/QtCore/qvector.h:471
#6  0x00007fe2ce93b344 in QVector<unsigned int>::append (this=0x7fe2c75b6c50, t=<value optimized out>) at /usr/include/QtCore/qvector.h:525
#7  0x00007fe2ce93aa74 in rpp::Stream::operator<< (this=0x7fe2c75b66d0, c=@0xffffffff8a3ff000) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-stream.cpp:216
#8  0x00007fe2ce93c730 in rpp::Stream::operator<< (c=<value optimized out>, this=<value optimized out>) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-stream.h:160
#9  rpp::pp_macro_expander::operator() (c=<value optimized out>, this=<value optimized out>) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:338
#10 0x00007fe2ce93d6f0 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b3ca0, input=@0x7fe2c75b3b40, output=@0x7fe2c75b66d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:245
#11 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b4790, input=@0x7fe2c75b4610, output=@0x7fe2c75b66d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#12 0x00007fe2ce93d6f0 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b5240, input=@0x7fe2c75b50e0, output=@0x7fe2c75b66d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:245
#13 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b5d10, input=@0x7fe2c75b5bb0, output=@0x7fe2c75b66d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#14 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b6800, input=@0x7fe2c75b6680, output=@0x7fe2c75b66d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#15 0x00007fe2ce93e0cb in rpp::pp_macro_expander::operator() (this=0x7fe2c75b72b0, input=@0x7fe2c75b7150, output=@0x7fe2c75ba870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:455
#16 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b7d80, input=@0x7fe2c75b7c20, output=@0x7fe2c75ba870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#17 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b8850, input=@0x7fe2c75b86f0, output=@0x7fe2c75ba870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#18 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b9320, input=@0x7fe2c75b91c0, output=@0x7fe2c75ba870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#19 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75b9df0, input=@0x7fe2c75b9c90, output=@0x7fe2c75ba870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#20 0x00007fe2ce93e952 in rpp::pp_macro_expander::operator() (this=0x7fe2c75ba9d8, input=@0x7fe2c75ba8c0, output=@0x7fe2c75ba870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#21 0x00007fe2ce94a4b7 in rpp::pp::operator() (this=0x7fe2c75ba9d0, input=@0x7fe2c75ba8c0, output=@0x7fe2c75ba870) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:260
#22 0x00007fe2ce94a8dd in rpp::pp::processFileInternal (this=0x7fe2c75ba9d0, fileName=<value optimized out>, fileContents=<value optimized out>, result=@0x7fe2c75bbbd0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:97
#23 0x00007fe2ce94a965 in rpp::pp::processFile (this=0x0, fileName=@0xffffffff8a3ff000, data=@0xffffffffffffffff) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:84
#24 0x00007fe2ceba0432 in PreprocessJob::run (this=0x5270f60) at /home/shriram/kdevelop/kdevelop/languages/cpp/preprocessjob.cpp:238
#25 0x00007fe319fc3efd in ?? () from /usr/lib64/libthreadweaver.so.4
#26 0x00007fe319fc41fe in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#27 0x00007fe319fc5523 in ?? () from /usr/lib64/libthreadweaver.so.4
#28 0x00007fe319fc31ef in ?? () from /usr/lib64/libthreadweaver.so.4
#29 0x00007fe319fc3658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#30 0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#31 0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#32 0x00007fe316d3625d in clone () from /lib64/libc.so.6
#33 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fe2c6bbb910 (LWP 19711)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe319fc2af6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fe319fc4bfb in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fe319fc4c14 in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fe319fc321f in ?? () from /usr/lib64/libthreadweaver.so.4
#6  0x00007fe319fc3658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#7  0x00007fe3187d6cf5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fe31856786a in start_thread () from /lib64/libpthread.so.0
#9  0x00007fe316d3625d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fe31baee820 (LWP 19339)):
#0  0x00007fe31856c2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fe3187d7dab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fe3187d6d94 in QThread::wait(unsigned long) () from /usr/lib64/libQtCore.so.4
#3  0x00007fe3150f9262 in KDevelop::DUChainPrivate::CleanupThread::stopThread (this=<value optimized out>) at /home/shriram/kdevelop/kdevplatform/language/duchain/duchain.cpp:271
#4  KDevelop::DUChainPrivate::~DUChainPrivate (this=<value optimized out>) at /home/shriram/kdevelop/kdevplatform/language/duchain/duchain.cpp:326
#5  0x00007fe3150ed877 in KDevelop::<anonymous struct>::destroy(void) () at /home/shriram/kdevelop/kdevplatform/language/duchain/duchain.cpp:1029
#6  0x00007fe316c8e7f2 in exit () from /lib64/libc.so.6
#7  0x00007fe317959678 in ?? () from /usr/lib64/libQtGui.so.4
#8  0x00007fe31902a1d8 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib64/libkdeui.so.5
#9  0x00007fe313459f64 in _XIOError () from /usr/lib64/libX11.so.6
#10 0x00007fe313461ad5 in ?? () from /usr/lib64/libX11.so.6
#11 0x00007fe3134623b5 in _XEventsQueued () from /usr/lib64/libX11.so.6
#12 0x00007fe31344ae93 in XEventsQueued () from /usr/lib64/libX11.so.6
#13 0x00007fe3179911ec in ?? () from /usr/lib64/libQtGui.so.4
#14 0x00007fe3105617ca in g_main_context_check () from /lib64/libglib-2.0.so.0
#15 0x00007fe310561fb0 in ?? () from /lib64/libglib-2.0.so.0
#16 0x00007fe3105623e0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#17 0x00007fe3188e3f8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#18 0x00007fe31799102e in ?? () from /usr/lib64/libQtGui.so.4
#19 0x00007fe3188ba4b2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#20 0x00007fe3188ba884 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#21 0x00007fe3188bca19 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#22 0x0000000000405af7 in main (argc=<value optimized out>, argv=<value optimized out>) at /home/shriram/kdevelop/kdevelop/app/main.cpp:193

Reported using DrKonqi
Comment 1 Andreas Pakulat 2009-11-12 22:50:07 UTC
Is this project available somewhere? Also 14G of memory is (IMHO) too much even for such a project, so this rather looks like there's a leak somewhere.
Comment 2 Shriram 2009-11-12 22:57:44 UTC
Unfortunately the project is not open-source. I'll could try repro'ing it with other projects. Will report back soon.
Comment 3 Andreas Pakulat 2009-11-13 08:46:36 UTC
Hmm, too bad. Maybe I can find an similarly large project within KDE. 

BTW: Please leave the Component entry as I set it, thanks.
Comment 4 David Nolden 2009-11-13 09:09:17 UTC
There's probably a semi-leak somewhere (Which means: The memory stays referenced, but is not really required).

The tool 'massif' helps finding such issues, the problem is that KDevelop runs slowly in it so it's hard to get meaningful results.

Can you go into your ~/.kdevduchain/0, type "du", and post the result?
Comment 5 Shriram 2009-11-13 20:00:12 UTC
(velvety) /home/shriram/.kdevduchain/0 (shriram) :
> du -sch *
2.7M    Code Model
0       Code Model_dynamic
5.2M    Comment Repository
0       Comment Repository_dynamic
4.0K    Counters
0       crash_counter
2.1M    Definition Map
0       Definition Map_dynamic
2.6M    Environment Information
0       Environment Information_dynamic
2.1M    Environment Lists
0       Environment Lists_dynamic
2.2M    file modification repository
0       file modification repository_dynamic
2.6M    file modification sets
0       file modification sets_dynamic
3.5M    Identifier Repository
0       Identifier Repository_dynamic
2.1M    Importer Map
0       Importer Map_dynamic
2.1M    include path repository
0       include path repository_dynamic
2.3M    Instantiation Information Repository
0       Instantiation Information Repository_dynamic
0       lock
5.2M    macro repository
4.0K    macro repository_dynamic
3.2M    macro sets
0       macro sets_dynamic
2.3M    Persistent Context Table
0       Persistent Context Table_dynamic
3.0M    Persistent Declaration Table
0       Persistent Declaration Table_dynamic
4.7M    Qualified Identifier Repository
0       Qualified Identifier Repository_dynamic
3.0M    Recursive Imports
0       Recursive Imports_dynamic
4.0M    String Index
0       String Index_dynamic
3.4M    string sets
0       string sets_dynamic
26M     topcontexts
5.4M    Type Repository
0       Type Repository_dynamic
2.1M    Use Map
0       Use Map_dynamic
0       version_61
91M     total
Comment 6 Shriram 2009-11-13 20:01:40 UTC
There's also a ~/.kdevduchain/1/... 
Here's the du-
(velvety) /home/shriram/.kdevduchain/1 (shriram) :
> du -sch *
5.2M    Code Model
4.0K    Code Model_dynamic
13M     Comment Repository
0       Comment Repository_dynamic
4.0K    Counters
0       crash_counter
2.7M    Definition Map
0       Definition Map_dynamic
4.1M    Environment Information
0       Environment Information_dynamic
2.3M    Environment Lists
0       Environment Lists_dynamic
2.2M    file modification repository
0       file modification repository_dynamic
5.6M    file modification sets
0       file modification sets_dynamic
8.1M    Identifier Repository
0       Identifier Repository_dynamic
2.4M    Importer Map
0       Importer Map_dynamic
2.1M    include path repository
0       include path repository_dynamic
2.7M    Instantiation Information Repository
0       Instantiation Information Repository_dynamic
0       lock
7.3M    macro repository
4.0K    macro repository_dynamic
5.6M    macro sets
0       macro sets_dynamic
2.6M    Persistent Context Table
0       Persistent Context Table_dynamic
6.7M    Persistent Declaration Table
4.0K    Persistent Declaration Table_dynamic
14M     Qualified Identifier Repository
0       Qualified Identifier Repository_dynamic
6.3M    Recursive Imports
4.0K    Recursive Imports_dynamic
15M     String Index
0       String Index_dynamic
6.9M    string sets
0       string sets_dynamic
109M    topcontexts
14M     Type Repository
0       Type Repository_dynamic
2.2M    Use Map
0       Use Map_dynamic
0       version_61
236M    total
Comment 7 Shriram 2009-11-13 20:47:17 UTC
Here's another crash that I keep running into. Not sure if its related.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fde3b5fe910 (LWP 29451)]
QVector<unsigned int>::realloc (this=0x7fde3b5f8c50, asize=579827905, aalloc=-493913916)
    at /usr/include/QtCore/qvector.h:471
471             x.d->sharable = true;
(gdb) bt 20
#0  QVector<unsigned int>::realloc (this=0x7fde3b5f8c50, asize=579827905, aalloc=-493913916)
    at /usr/include/QtCore/qvector.h:471
#1  0x00007fde5464c344 in QVector<unsigned int>::append (this=0x7fde3b5f8c50, t=<value optimized out>)
    at /usr/include/QtCore/qvector.h:525
#2  0x00007fde5464ba74 in rpp::Stream::operator<< (this=0x7fde3b5f86d0, c=@0xffffffff8a3ff000)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-stream.cpp:216
#3  0x00007fde5464d730 in rpp::Stream::operator<< (c=<value optimized out>, this=<value optimized out>)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-stream.h:160
#4  rpp::pp_macro_expander::operator() (c=<value optimized out>, this=<value optimized out>)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:338
#5  0x00007fde5464e6f0 in rpp::pp_macro_expander::operator() (this=0x7fde3b5f5ca0, input=@0x7fde3b5f5b40,
    output=@0x7fde3b5f86d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:245
#6  0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5f6790, input=@0x7fde3b5f6610,
    output=@0x7fde3b5f86d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#7  0x00007fde5464e6f0 in rpp::pp_macro_expander::operator() (this=0x7fde3b5f7240, input=@0x7fde3b5f70e0,
    output=@0x7fde3b5f86d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:245
#8  0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5f7d10, input=@0x7fde3b5f7bb0,
    output=@0x7fde3b5f86d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#9  0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5f8800, input=@0x7fde3b5f8680,
    output=@0x7fde3b5f86d0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#10 0x00007fde5464f0cb in rpp::pp_macro_expander::operator() (this=0x7fde3b5f92b0, input=@0x7fde3b5f9150,
    output=@0x7fde3b5fc870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:455
#11 0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5f9d80, input=@0x7fde3b5f9c20,
    output=@0x7fde3b5fc870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#12 0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5fa850, input=@0x7fde3b5fa6f0,
    output=@0x7fde3b5fc870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#13 0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5fb320, input=@0x7fde3b5fb1c0,
    output=@0x7fde3b5fc870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#14 0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5fbdf0, input=@0x7fde3b5fbc90,
    output=@0x7fde3b5fc870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#15 0x00007fde5464f952 in rpp::pp_macro_expander::operator() (this=0x7fde3b5fc9d8, input=@0x7fde3b5fc8c0,
    output=@0x7fde3b5fc870)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:546
#16 0x00007fde5465b4b7 in rpp::pp::operator() (this=0x7fde3b5fc9d0, input=@0x7fde3b5fc8c0,
    output=@0x7fde3b5fc870) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:260
#17 0x00007fde5465b8dd in rpp::pp::processFileInternal (this=0x7fde3b5fc9d0, fileName=<value optimized out>,
    fileContents=<value optimized out>, result=@0x7fde3b5fdbd0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:97
#18 0x00007fde5465b965 in rpp::pp::processFile (this=0x0, fileName=@0xffffffff8a3ff000,
    data=@0xffffffffffffffff) at /home/shriram/kdevelop/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:84
#19 0x00007fde548b1432 in PreprocessJob::run (this=0x30809e0)
    at /home/shriram/kdevelop/kdevelop/languages/cpp/preprocessjob.cpp:238
(More stack frames follow...)
Comment 8 Shriram 2009-11-13 23:22:23 UTC
Created attachment 38311 [details]
massif output

I ran kdevelop thru massif. It ran out of space after a while and froze my machine. Had to do a hard reset. But I managed to get couple of profile output files. Noe sure if they're useful. Attaching them here.
Comment 9 Shriram 2009-11-14 00:05:53 UTC
Created attachment 38312 [details]
more massif output
Comment 10 David Nolden 2009-11-15 13:23:06 UTC
Do you use the snippet-plugin? The last massif output indicates a problem in that plugin. Try disabling the snippet-plugin through the settings, and see whether it's better without it.
Comment 11 Milian Wolff 2009-11-15 13:46:46 UTC
Or better yet update kdevplatform (the snippets plugin), enable it's debug area in "kdebugdialog" and than reproduce the issue. Save the CLI output to a file and send it to us/me so we could try to track down the issue in the snippets plugin.

Just by looking at the code I could not find anything obvious :(
Comment 12 David Nolden 2009-11-15 17:22:36 UTC
SVN commit 1049648 by zwabel:

Greatly simplify the management of the macros owned by preprocess-environments.
This should also close some memory-leaks.

CCBUG: 214298

 M  +0 -1      cppduchain/cppduchain.cpp  
 M  +1 -1      cppduchain/cpppreprocessenvironment.cpp  
 M  +0 -2      parser/parsesession.cpp  
 M  +0 -1      parser/parsesession.h  
 M  +1 -12     parser/rpp/pp-engine.cpp  
 M  +9 -176    parser/rpp/pp-environment.cpp  
 M  +4 -41     parser/rpp/pp-environment.h  
 M  +0 -4      parser/rpp/tests/main.cpp  
 M  +0 -5      preprocessjob.cpp  
 M  +0 -8      tests/test_cppcodecompletion.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1049648
Comment 13 Shriram 2009-11-15 18:48:58 UTC
Awesome! That sounds promising. I'll give it a whirl.

On Sun, Nov 15, 2009 at 8:22 AM, David Nolden <
david.nolden.kde@art-master.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=214298
>
>
>
>
>
> --- Comment #12 from David Nolden <david nolden kde art-master de>
>  2009-11-15 17:22:36 ---
> SVN commit 1049648 by zwabel:
>
> Greatly simplify the management of the macros owned by
> preprocess-environments.
> This should also close some memory-leaks.
>
> CCBUG: 214298
>
>  M  +0 -1      cppduchain/cppduchain.cpp
>  M  +1 -1      cppduchain/cpppreprocessenvironment.cpp
>  M  +0 -2      parser/parsesession.cpp
>  M  +0 -1      parser/parsesession.h
>  M  +1 -12     parser/rpp/pp-engine.cpp
>  M  +9 -176    parser/rpp/pp-environment.cpp
>  M  +4 -41     parser/rpp/pp-environment.h
>  M  +0 -4      parser/rpp/tests/main.cpp
>  M  +0 -5      preprocessjob.cpp
>  M  +0 -8      tests/test_cppcodecompletion.cpp
>
>
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1049648
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
> You reported the bug.
>
Comment 14 David Nolden 2009-11-15 18:55:10 UTC
Yep try it out. But it only adresses the smaller issue visible in the first massif outputs. The main problem though seems to be the snippet support, which was not fixed yet. See the suggestions before.
Comment 15 Shriram 2009-11-15 19:01:54 UTC
Yeah. I'll try disabling the snippets plugin. Thanks!

-Shriram

On Sun, Nov 15, 2009 at 9:55 AM, David Nolden <
david.nolden.kde@art-master.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=214298
>
>
>
>
>
> --- Comment #14 from David Nolden <david nolden kde art-master de>
>  2009-11-15 18:55:10 ---
> Yep try it out. But it only adresses the smaller issue visible in the first
> massif outputs. The main problem though seems to be the snippet support,
> which
> was not fixed yet. See the suggestions before.
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
> You reported the bug.
>
Comment 16 Milian Wolff 2009-11-16 14:39:33 UTC
Shriram - disabling the plugin won't fix the bug. And since we cannot reproduce it so far, some more answers to the questions I posted above would help us a lot.
Comment 17 tim blechmann 2011-12-30 12:02:49 UTC
Created attachment 67243 [details]
New crash information added by DrKonqi

kdevelop (4.2.60) on KDE Platform 4.7.4 (4.7.4) using Qt 4.7.4

- What I was doing when the application crashed:

kdevelop consistently crashes when parsing the full source tree of the boost c++ libraries from trunk

-- Backtrace (Reduced):
#7  0x00007f4b830f46fb in QVector<unsigned int>::realloc (this=0x7f4b31d24c80, asize=310377811, aalloc=536870911) at /usr/include/qt4/QtCore/qvector.h:490
#8  0x00007f4b830f4912 in QVector<unsigned int>::append (this=0x7f4b31d24c80, t=<optimized out>) at /usr/include/qt4/QtCore/qvector.h:549
#9  0x00007f4b830f40bb in rpp::Stream::operator<< (this=0x7f4b31d24450, c=<optimized out>) at /home/tim/hd2t2/sources/kdevelop/languages/cpp/parser/rpp/pp-stream.cpp:211
#10 0x00007f4b830f4b1c in rpp::Stream::operator<< (this=<optimized out>, c=<optimized out>) at /home/tim/hd2t2/sources/kdevelop/languages/cpp/parser/rpp/pp-stream.h:164
#11 0x00007f4b830f65c9 in rpp::pp_macro_expander::operator() (this=0x7f4b31d24690, input=..., output=..., substitute=true, table=0x0) at /home/tim/hd2t2/sources/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:344
Comment 18 tim blechmann 2011-12-30 15:14:59 UTC
sources are:

boost-trunk from svn, r76171
https://svn.boost.org/svn/boost/trunk
Comment 19 tim blechmann 2011-12-30 16:07:48 UTC
Created attachment 67249 [details]
massif data

data obtained by running massif for about an hour
Comment 20 Milian Wolff 2011-12-30 16:53:52 UTC
kdevelop dies when parsing http://www.boost.org/doc/libs/1_36_0/libs/preprocessor/doc/examples/delay.c which is the reason for tim's issue. I'll try to massif that file and see what happens.
Comment 21 Milian Wolff 2011-12-30 17:27:22 UTC
still valid
Comment 22 Milian Wolff 2011-12-30 17:28:54 UTC
Created attachment 67254 [details]
(partial) massif file when parsing delay.c via duchainify
Comment 23 Job Noorman 2012-10-18 08:22:21 UTC
I'm getting a very similar crash when importing the LLVM sources. KDevelop crashes with a similar backtrace after eating all my available memory (8GB). I'll attach the backtrace.
Comment 24 Job Noorman 2012-10-18 08:23:08 UTC
Created attachment 74623 [details]
Backtrace when importing LLVM
Comment 25 Milian Wolff 2013-01-31 18:29:02 UTC
*** Bug 314198 has been marked as a duplicate of this bug. ***
Comment 26 Kevin Funk 2014-06-26 06:26:17 UTC
*** Bug 329699 has been marked as a duplicate of this bug. ***
Comment 27 Kevin Funk 2014-06-26 06:26:20 UTC
*** Bug 336732 has been marked as a duplicate of this bug. ***
Comment 28 Milian Wolff 2014-07-15 10:56:28 UTC
*** Bug 336963 has been marked as a duplicate of this bug. ***
Comment 29 Kevin Funk 2016-03-09 08:25:49 UTC
*** Bug 339920 has been marked as a duplicate of this bug. ***
Comment 30 Kevin Funk 2016-03-09 08:26:37 UTC
Hello!

We are working on a new clang-based C/C++ language plugin for KDevelop 5 which
supersedes the old C++ plugin in KDevelop 4. See e.g.:
https://www.kdevelop.org/news/first-beta-release-kdevelop-500-available

Due to a lack of manpower, we cannot fix bugs in the old C++ plugin. We rather
want to supply a good Clang based C++ experience for KDevelop 5 than wasting
our time on the legacy C++ support for KDevelop 4.

With the new clang-based C/C++ language plugin, the bug presented here does not
occur. In my testing. For these reasons, I'll close this bug. Please stay tuned
for KDevelop 5.

If you think this bug is applicable to Clang/KDevelop 5, please reopen the
report and add new information on how to reproduce the bug there.