Bug 271763 - Kdevelop crash when parsing big PHP project
Summary: Kdevelop crash when parsing big PHP project
Status: RESOLVED DUPLICATE of bug 269369
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 13:37 UTC by Daniel Kozák
Modified: 2011-04-27 21:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Kozák 2011-04-26 13:37:52 UTC
Application: kdevelop (4.2.2)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-8-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed:
I import PHP project and then Kdevelop start parsing. It always crash on 5%

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
	in ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
[Current thread is 1 (Thread 0x7fe29f38f780 (LWP 8830))]

Thread 8 (Thread 0x7fe28e109700 (LWP 8832)):
#0  0x00007fe29b95ed9d in __pthread_mutex_unlock_usercnt (mutex=0x16aeb58) at pthread_mutex_unlock.c:52
#1  __pthread_mutex_unlock (mutex=0x16aeb58) at pthread_mutex_unlock.c:290
#2  0x00007fe29775d6a3 in g_main_context_acquire () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe29775ef21 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fe29775f9f2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fe28ea68c44 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007fe2977863e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007fe29b95ad8c in start_thread (arg=0x7fe28e109700) at pthread_create.c:304
#8  0x00007fe29c5d204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fe27559d700 (LWP 8836)):
#0  0x00007fe29c5ca143 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fe29d95f501 in QProcessManager::run (this=0x7fe29dcb1f60) at io/qprocess_unix.cpp:245
#2  0x00007fe29d897175 in QThreadPrivate::start (arg=0x7fe29dcb1f60) at thread/qthread_unix.cpp:320
#3  0x00007fe29b95ad8c in start_thread (arg=0x7fe27559d700) at pthread_create.c:304
#4  0x00007fe29c5d204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fe274d9c700 (LWP 8838)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fe29d89782b in wait (this=<value optimized out>, mutex=0x326e7b0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x326e7b0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fe2952970b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x326ad50, th=0x32a38c0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fe295299723 in ThreadWeaver::WorkingHardState::applyForWork (this=0x3239250, th=0x32a38c0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fe29529853f in ThreadWeaver::ThreadRunHelper::run (this=0x7fe274d9be20, parent=0x326ad50, th=0x32a38c0) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007fe2952985cb in ThreadWeaver::Thread::run (this=0x32a38c0) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007fe29d897175 in QThreadPrivate::start (arg=0x32a38c0) at thread/qthread_unix.cpp:320
#8  0x00007fe29b95ad8c in start_thread (arg=0x7fe274d9c700) at pthread_create.c:304
#9  0x00007fe29c5d204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fe26dd65700 (LWP 8843)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007fe26dd64b10 in ?? ()
#2  0x00007fff1e3ff7b2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0x7fe26b680700 (LWP 8911)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fe294a42832 in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007fe29b95ad8c in start_thread (arg=0x7fe26b680700) at pthread_create.c:304
#3  0x00007fe29c5d204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fe269bb5700 (LWP 8915)):
[KCrash Handler]
#6  KDevelop::Declaration::indexedType (this=0x0) at ../../language/duchain/declaration.cpp:305
#7  0x00007fe299efeb3a in KDevelop::isPublicBaseClassInternal (self=0x0, base=0x7fe28181f110, topContext=0x7fe282938540, baseConversionLevels=0x0, depth=0, checked=0x0) at ../../language/duchain/classdeclaration.cpp:111
#8  0x00007fe26e21dff2 in Php::TypeBuilder::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpduchain.so
#9  0x00007fe26e20c796 in Php::DeclarationBuilder::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpduchain.so
#10 0x00007fe26dfc6f96 in Php::DefaultVisitor::visitTopStatement(Php::TopStatementAst*) () from /usr/lib/libkdev4phpparser.so
#11 0x00007fe26dfc635d in Php::DefaultVisitor::visitInnerStatementList(Php::InnerStatementListAst*) () from /usr/lib/libkdev4phpparser.so
#12 0x00007fe26dfc6a7a in Php::DefaultVisitor::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpparser.so
#13 0x00007fe26e21dac0 in Php::TypeBuilder::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpduchain.so
#14 0x00007fe26e20c796 in Php::DeclarationBuilder::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpduchain.so
#15 0x00007fe26dfc6a96 in Php::DefaultVisitor::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpparser.so
#16 0x00007fe26e21dac0 in Php::TypeBuilder::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpduchain.so
#17 0x00007fe26e20c796 in Php::DeclarationBuilder::visitStatement(Php::StatementAst*) () from /usr/lib/libkdev4phpduchain.so
#18 0x00007fe26dfc6f96 in Php::DefaultVisitor::visitTopStatement(Php::TopStatementAst*) () from /usr/lib/libkdev4phpparser.so
#19 0x00007fe26dfc635d in Php::DefaultVisitor::visitInnerStatementList(Php::InnerStatementListAst*) () from /usr/lib/libkdev4phpparser.so
#20 0x00007fe26e213f5e in Php::ContextBuilder::visitClassStatement(Php::ClassStatementAst*) () from /usr/lib/libkdev4phpduchain.so
#21 0x00007fe26e21cb52 in Php::TypeBuilder::visitClassStatement(Php::ClassStatementAst*) () from /usr/lib/libkdev4phpduchain.so
#22 0x00007fe26e20d59a in Php::DeclarationBuilder::visitClassStatement(Php::ClassStatementAst*) () from /usr/lib/libkdev4phpduchain.so
#23 0x00007fe26dfc595d in Php::DefaultVisitor::visitClassBody(Php::ClassBodyAst*) () from /usr/lib/libkdev4phpparser.so
#24 0x00007fe26e214b02 in Php::ContextBuilder::visitClassDeclarationStatement(Php::ClassDeclarationStatementAst*) () from /usr/lib/libkdev4phpduchain.so
#25 0x00007fe26e20a92b in Php::DeclarationBuilder::visitClassDeclarationStatement(Php::ClassDeclarationStatementAst*) () from /usr/lib/libkdev4phpduchain.so
#26 0x00007fe26dfc6fb0 in Php::DefaultVisitor::visitTopStatement(Php::TopStatementAst*) () from /usr/lib/libkdev4phpparser.so
#27 0x00007fe26e20861e in Php::DeclarationBuilder::visitOuterTopStatement(Php::OuterTopStatementAst*) () from /usr/lib/libkdev4phpduchain.so
#28 0x00007fe26dfc6a4d in Php::DefaultVisitor::visitStart(Php::StartAst*) () from /usr/lib/libkdev4phpparser.so
#29 0x00007fe26e214fbf in Php::ContextBuilder::startVisiting(Php::AstNode*) () from /usr/lib/libkdev4phpduchain.so
#30 0x00007fe26e20fad9 in Php::DeclarationBuilder::supportBuild(Php::AstNode*, KDevelop::DUContext*) () from /usr/lib/libkdev4phpduchain.so
#31 0x00007fe26e20a401 in Php::DeclarationBuilder::build(KDevelop::IndexedString const&, Php::AstNode*, KDevelop::ReferencedTopDUContext) () from /usr/lib/libkdev4phpduchain.so
#32 0x00007fe26e47d150 in ?? () from /usr/lib/kde4/kdevphplanguagesupport.so
#33 0x00007fe295298c21 in ThreadWeaver::JobRunHelper::runTheJob (this=0x7fe269bb4da0, th=0x382a550, job=0x7a8d600) at ../../../threadweaver/Weaver/Job.cpp:106
#34 0x00007fe295298d4c in ThreadWeaver::Job::execute (this=0x7a8d600, th=0x382a550) at ../../../threadweaver/Weaver/Job.cpp:135
#35 0x00007fe29529850f in ThreadWeaver::ThreadRunHelper::run (this=0x7fe269bb4e20, parent=0x1ac5340, th=0x382a550) at ../../../threadweaver/Weaver/Thread.cpp:95
#36 0x00007fe2952985cb in ThreadWeaver::Thread::run (this=0x382a550) at ../../../threadweaver/Weaver/Thread.cpp:142
#37 0x00007fe29d897175 in QThreadPrivate::start (arg=0x382a550) at thread/qthread_unix.cpp:320
#38 0x00007fe29b95ad8c in start_thread (arg=0x7fe269bb5700) at pthread_create.c:304
#39 0x00007fe29c5d204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#40 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fe2693b4700 (LWP 8941)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fe29d89782b in wait (this=<value optimized out>, mutex=0x1a0cd30, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1a0cd30, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fe2952970b4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1ac5340, th=0x7902090) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fe295299723 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1a71b00, th=0x7902090) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fe29529973c in ThreadWeaver::WorkingHardState::applyForWork (this=0x1a71b00, th=0x7902090) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007fe29529853f in ThreadWeaver::ThreadRunHelper::run (this=0x7fe2693b3e20, parent=0x1ac5340, th=0x7902090) at ../../../threadweaver/Weaver/Thread.cpp:87
#7  0x00007fe2952985cb in ThreadWeaver::Thread::run (this=0x7902090) at ../../../threadweaver/Weaver/Thread.cpp:142
#8  0x00007fe29d897175 in QThreadPrivate::start (arg=0x7902090) at thread/qthread_unix.cpp:320
#9  0x00007fe29b95ad8c in start_thread (arg=0x7fe2693b4700) at pthread_create.c:304
#10 0x00007fe29c5d204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fe29f38f780 (LWP 8830)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fe29d89782b in wait (this=<value optimized out>, mutex=0x165ce00, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x165ce00, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fe29d896910 in QThread::wait (this=<value optimized out>, time=18446744073709551615) at thread/qthread_unix.cpp:722
#4  0x00007fe29d95ef10 in QProcessManager::~QProcessManager (this=0x7fe29dcb1f60, __in_chrg=<value optimized out>) at io/qprocess_unix.cpp:208
#5  0x00007fe29c525961 in __run_exit_handlers (status=1) at exit.c:78
#6  exit (status=1) at exit.c:100
#7  0x00007fe28ca55066 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#8  0x00007fe29e164638 in KApplication::xioErrhandler (this=0x7fff1e259c00, dpy=0x166f080) at ../../kdeui/kernel/kapplication.cpp:419
#9  0x00007fe298becdee in _XIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#10 0x00007fe298bea62d in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#11 0x00007fe298bdaf1f in XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#12 0x00007fe29cde6c4c in x11EventSourceCheck (s=0x165cbf0) at kernel/qguieventdispatcher_glib.cpp:85
#13 0x00007fe29775e854 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007fe29775f122 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007fe29775f639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007fe29d9a93ef in QEventDispatcherGlib::processEvents (this=0x1602340, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#17 0x00007fe29cde6dfe in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#18 0x00007fe29d97d882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#19 0x00007fe29d97dabc in QEventLoop::exec (this=0x7fff1e2598f0, flags=...) at kernel/qeventloop.cpp:201
#20 0x00007fe29d981ecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#21 0x000000000040b989 in _start ()

Possible duplicates by query: bug 228596.

Reported using DrKonqi
Comment 1 jay 2011-04-26 14:07:56 UTC
I don't know how ubuntu packages are compiled (in respect to debugging info in console), but try to start kdevelop from terminal.
You should see a LOT of debugging info.

If that is true, go to settings and set background parser to 1 thread (so we can see on which file it crashed).

Then open that project and when the crash occurs you should see something like here :
https://bugs.kde.org/show_bug.cgi?id=271278
(the block containing KCrash: Application 'quanta' crashing...  - for you : kdevelop crashing)



Kdevelop is not crashing on big project, but on certain file.


Then post the lines you see before "KCrash: Application 'kdevelop' crashing...", and the respective file on which it crashed.
Comment 2 Daniel Kozák 2011-04-26 14:29:21 UTC
(In reply to comment #1)
> I don't know how ubuntu packages are compiled (in respect to debugging info in
> console), but try to start kdevelop from terminal.
> You should see a LOT of debugging info.
> 
> If that is true, go to settings and set background parser to 1 thread (so we
> can see on which file it crashed).
> 
> Then open that project and when the crash occurs you should see something like
> here :
> https://bugs.kde.org/show_bug.cgi?id=271278
> (the block containing KCrash: Application 'quanta' crashing...  - for you :
> kdevelop crashing)
> 
> 
> 
> Kdevelop is not crashing on big project, but on certain file.
> 
> 
> Then post the lines you see before "KCrash: Application 'kdevelop'
> crashing...", and the respective file on which it crashed.

Here is it:

WARNING: deleting stale lockfile /home/kozak/.kde/share/apps/kdevelop/sessions//{131428c9-2709-4898-af8e-54b618fb4412}/lock
WARNING: deleting stale lockfile /home/kozak/.kdevduchain/{131428c9-2709-4898-af8e-54b618fb4412}/0/lock
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: QMYSQL3 QMYSQL
kdevelop(10655)/kdevelop (qthelp support) QtHelpProviderAbstract::QtHelpProviderAbstract: Couldn't setup QtHelp Collection file 
kdevelop(10655)/kdecore (KLibrary) findLibraryInternal: plugins should not have a 'lib' prefix: "libkonsolepart.so"
kdevelop(10655)/kdevplatform (shell) KDevelop::SessionControllerPrivate::performRecovery: Starting recovery from  "/home/kozak/.kde/share/apps/kdevelop/sessions/{131428c9-2709-4898-af8e-54b618fb4412}/recovery/current" 
** WARNING: "=& new foo() is deprecated" 
** WARNING: "=& new foo() is deprecated" 
** WARNING: "=& new foo() is deprecated" 
** WARNING: "=& new foo() is deprecated" 
<unknown>: Fatal IO error 9 (Chybný popisovač souboru) on X server :0.0.
FunctionDeclarationData::m_defaultParameters There were items left on destruction: 261
FunctionTypeData::m_arguments There were items left on destruction: 1
ClassFunctionDeclarationData::m_defaultParameters There were items left on destruction: 4820
ClassDeclarationData::baseClasses There were items left on destruction: 337
DUContextData::m_uses There were items left on destruction: 11356
TopDUContextData::m_usedDeclarationIds There were items left on destruction: 970
DUContextData::m_importedContexts There were items left on destruction: 6119
kdevelop(10655) Konsole::SessionManager::~SessionManager: Konsole SessionManager destroyed with sessions still alive 
DUContextData::m_localDeclarations There were items left on destruction: 6188
DUContextData::m_importers There were items left on destruction: 5276
DUContextData::m_childContexts There were items left on destruction: 11369

** (<unknown>:10655): WARNING **: Serious fd usage error 16

** (<unknown>:10655): WARNING **: Serious fd usage error 14
Comment 3 jay 2011-04-26 15:03:27 UTC
damn...
ubuntu packages don't have debugging info enabled.
Maybe it can be enabled in some config, but i have no idea how.

Crash info shows only that its a php file parsing crash (if I understand it correctly) - Thread 3
Comment 4 Daniel Kozák 2011-04-26 15:31:39 UTC
(In reply to comment #3)
> damn...
> ubuntu packages don't have debugging info enabled.
> Maybe it can be enabled in some config, but i have no idea how.

Nevermind, I try to compile it from scratch with debug enabled
Comment 5 Daniel Kozák 2011-04-26 15:55:00 UTC
So there is a output with debug info:

...
KDevelop::BackgroundParserPrivate::parseDocumentsInternal: creating parse-job KUrl("file:///var/www/html/system/web/auto-gps.eu/local/temp/graph_653082_1296056783.png") new count of active parse-jobs: 1
kdevelop(1433)/kdevplatform (language) KDevelop::BackgroundParserPrivate::createParseJob: found no languages for url KUrl("file:///var/www/html/system/web/auto-gps.eu/local/temp/graph_653082_1296056783.png")
kdevelop(1433)/kdevplatform (language) KDevelop::BackgroundParserPrivate::parseDocumentsInternal: creating parse-job KUrl("file:///var/www/html/system/web/auto-gps.eu/local/mvc/model/export/Generator/ExportGeneratorCsvWork.php") new count of active parse-jobs: 1
kdevelop(1433)/kdevplatform (language) KDevelop::BackgroundParserPrivate::parseDocumentsInternal: creating parse-job KUrl("file:///var/www/html/system/web/auto-gps.eu/local/mvc/model/export/Generator/ExportGeneratorCsvWork.php") new count of active parse-jobs: 1
<unknown>: Fatal IO error 9 (Chybný popisovač souboru) on X server :0.0.
...
Comment 6 Milian Wolff 2011-04-27 21:40:30 UTC
should be fixed for 4.2.3, can you try to compile that one (i.e. php 1.2 or master branch from git)? if it still crashes, tell me.

*** This bug has been marked as a duplicate of bug 269369 ***