Problems running kdevelop in valgrind/callgrind

Andreas Pakulat apaku at gmx.de
Sun Aug 31 17:29:40 UTC 2008


On 31.08.08 18:17:48, David Nolden wrote:
> Am Sonntag, 31. August 2008 16:34:13 schrieb Andreas Pakulat:
> > Hi,
> >
> > wanted to run callgrind on kdevelop to check whats making cmake project
> > opening slow. But it seems to be impossible as kdevelop crashes as
> > soon as I open a project with valgrind/callgrind running on it.
> >
> > The backtrace I get from the callgrind process indicates a problem with
> > the DUChain usage in CMake, this also fits with the reproduceable crash
> > when editing a CMakeLists.txt file and saving it inside kdevelop4 (also
> > crashes in the duchain and the backtrace seems to be pretty similar to
> > the one I have)
> 
> I went through the cmake support code again, and fixed all the places I found 
> where the duchain was used in clearly unsafe ways(Pure pointers were stored). 
> It should work now.

Thanks. 

Now I can do some basic valgrinding, but one problem persists. When I
let kdevelop load a project during startup valgrind still crashes with:

Callgrind: threads.c:246 (vgCallgrind_post_signal): Assertion 'tid == vgCallgrind_current_tid' failed.
==5276==    at 0x3801C7BD: report_and_quit (m_libcassert.c:140)
==5276==    by 0x3801CAAE: vgPlain_assert_fail (m_libcassert.c:200)
==5276==    by 0x380198C4: vgCallgrind_post_signal (threads.c:246)
==5276==    by 0x380752F5: vgPlain_sigframe_destroy (sigframe-x86-linux.c:695)
==5276==    by 0x380794F3: vgSysWrap_x86_linux_sys_sigreturn_before (syswrap-x86-linux.c:970)
==5276==    by 0x3803B2E0: vgPlain_client_syscall (syswrap-main.c:850)
==5276==    by 0x38038448: handle_syscall (scheduler.c:790)
==5276==    by 0x380393DE: vgPlain_scheduler (scheduler.c:984)
==5276==    by 0x3804DFA8: run_a_thread_NORETURN (syswrap-linux.c:89)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==5276==    at 0x58FA0B7: (within /lib/libc-2.7.so)
==5276==    by 0x4A060B1: QProcessPrivate::waitForFinished(int) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x49CC392: QProcess::waitForFinished(int) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x7FBDCEF: CMakeProjectVisitor::visit(ExecuteProcessAst const*) (cmakeprojectvisitor.cpp:1032)
==5276==    by 0x7FB0C67: ExecuteProcessAst::accept(CMakeAstVisitor*) const (cmakeast.h:271)
==5276==    by 0x7FC36BB: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> const&, int) (cmakeprojectvisitor.cpp:1739)
==5276==    by 0x7FC443C: CMakeProjectVisitor::visit(IfAst const*) (cmakeprojectvisitor.cpp:885)
==5276==    by 0x7FB0E67: IfAst::accept(CMakeAstVisitor*) const (cmakeast.h:444)
==5276==    by 0x7FC36BB: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> const&, int) (cmakeprojectvisitor.cpp:1739)
==5276==    by 0x7FC4753: CMakeProjectVisitor::visit(IfAst const*) (cmakeprojectvisitor.cpp:928)
==5276==    by 0x7FB0E67: IfAst::accept(CMakeAstVisitor*) const (cmakeast.h:444)
==5276==    by 0x7FC36BB: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> const&, int) (cmakeprojectvisitor.cpp:1739)
==5276==    by 0x7FC443C: CMakeProjectVisitor::visit(IfAst const*) (cmakeprojectvisitor.cpp:885)
==5276==    by 0x7FB0E67: IfAst::accept(CMakeAstVisitor*) const (cmakeast.h:444)
==5276==    by 0x7FC36BB: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> const&, int) (cmakeprojectvisitor.cpp:1739)
==5276==    by 0x7FC63FC: CMakeProjectVisitor::visit(FindPackageAst const*) (cmakeprojectvisitor.cpp:461)
==5276==    by 0x7FB0D07: FindPackageAst::accept(CMakeAstVisitor*) const (cmakeast.h:349)
==5276==    by 0x7FC36BB: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> const&, int) (cmakeprojectvisitor.cpp:1739)
==5276==    by 0x7F65526: CMakeProjectManager::parse(KDevelop::ProjectFolderItem*) (cmakemanager.cpp:360)
==5276==    by 0x59CE7CF: KDevelop::ImportProjectJobPrivate::parseItem() (importprojectjob.cpp:53)
==5276==    by 0x59CDB17: KDevelop::ImportProjectJob::qt_metacall(QMetaObject::Call, int, void**) (importprojectjob.moc:65)
==5276==    by 0x4A3AD3C: QMetaObject::activate(QObject*, int, int, void**) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A3B1CA: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A789F0: QTimer::timeout() (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A44E93: QTimer::timerEvent(QTimerEvent*) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A39031: QObject::event(QEvent*) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4D95060: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /home/andreas/qt-copy/lib/libQtGui.so.4.4.1)
==5276==    by 0x4D95375: QApplication::notify(QObject*, QEvent*) (in /home/andreas/qt-copy/lib/libQtGui.so.4.4.1)
==5276==    by 0x46E8700: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==5276==    by 0x4A26686: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A2A208: QCoreApplication::sendEvent(QObject*, QEvent*) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A5772E: QTimerInfoList::activateTimers() (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A577F1: QEventDispatcherUNIX::activateTimers() (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A583D1: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4E38AE3: QEventDispatcherX11::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /home/andreas/qt-copy/lib/libQtGui.so.4.4.1)
==5276==    by 0x4A236A7: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A238E4: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4A26E82: QCoreApplication::exec() (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4D94D79: QApplication::exec() (in /home/andreas/qt-copy/lib/libQtGui.so.4.4.1)
==5276==    by 0x804E05C: main (main.cpp:209)

Thread 2: status = VgTs_WaitSys
==5276==    at 0x58FA0B7: (within /lib/libc-2.7.so)
==5276==    by 0x4937506: QThreadPrivate::start(void*) (in /home/andreas/qt-copy/lib/libQtCore.so.4.4.1)
==5276==    by 0x4ADCF3A: start_thread (in /lib/libpthread-2.7.so)
==5276==    by 0x5900C9D: clone (in /lib/libc-2.7.so)


Any ideas from the valgrind experts?

Andreas

-- 
You will pass away very quickly.




More information about the KDevelop-devel mailing list