|
From: Milian W. <ma...@mi...> - 2010-04-15 11:45:41
|
Hey all! When I try to profile the whole startup of KDevelop using callgrind, I and at least one of the other developers, get a reproducible segfault. This does not occur in memcheck or massif, so I fear it shows a bug in callgrind itself. How does one debug that? gdb -> valgrind -> app? That segfaults even earlier and gives a totally useless backtrace without any debug info... Hints? -- Milian Wolff ma...@mi... http://milianw.de |
|
From: Alexander P. <gl...@go...> - 2010-04-15 11:55:25
|
Maybe --trace-syscall=yes may help to figure out the problem? HTH, ALex On Thu, Apr 15, 2010 at 3:45 PM, Milian Wolff <ma...@mi...> wrote: > Hey all! > > When I try to profile the whole startup of KDevelop using callgrind, I and at > least one of the other developers, get a reproducible segfault. This does not > occur in memcheck or massif, so I fear it shows a bug in callgrind itself. > > How does one debug that? gdb -> valgrind -> app? > > That segfaults even earlier and gives a totally useless backtrace without any > debug info... > > Hints? > -- > Milian Wolff > ma...@mi... > http://milianw.de > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > -- Alexander Potapenko Software Engineer Google Moscow |
|
From: Milian W. <ma...@mi...> - 2010-04-15 12:12:44
|
On Thursday 15 April 2010 13:55:16 Alexander Potapenko wrote: > On Thu, Apr 15, 2010 at 3:45 PM, Milian Wolff <ma...@mi...> wrote: > > Hey all! > > > > When I try to profile the whole startup of KDevelop using callgrind, I > > and at least one of the other developers, get a reproducible segfault. > > This does not occur in memcheck or massif, so I fear it shows a bug in > > callgrind itself. > > > > How does one debug that? gdb -> valgrind -> app? > > > > That segfaults even earlier and gives a totally useless backtrace without > > any debug info... > > > > Hints? > > Maybe --trace-syscall=yes may help to figure out the problem? Here are the last few lines: http://pastebin.com/gWdCrZtH Do you need all of it? Personally, it doesn't help me at all. -- Milian Wolff ma...@mi... http://milianw.de |
|
From: Milian W. <ma...@mi...> - 2010-04-15 12:32:46
|
On Thursday 15 April 2010 14:14:32 Josef Weidendorfer wrote: > Hi Milian, > > On Thursday 15 April 2010, Milian Wolff wrote: > > When I try to profile the whole startup of KDevelop using callgrind, I > > and at least one of the other developers, get a reproducible segfault. > > This does not occur in memcheck or massif, so I fear it shows a bug in > > callgrind itself. > > Best is to file a bug report. Even if I have no debug information at all? no backtrace, no useful debug out put ;-) That's why I thought I'd ask here first. > > How does one debug that? gdb -> valgrind -> app? > > In Valgrind sources, there is info about this in README_DEVELOPERS in the > toplevel directory. In addition to the info there, when starting the > tool executable in the debugger directly, one still also should provide > the "--tool=..." parameter in my experience. Hmm... should be added there. > > > That segfaults even earlier and gives a totally useless backtrace without > > any debug info... > > With callgrind, it could help to have the debug output produced by > --ct-verbose=... before the segfault. Do I need a newer callgrind/valgrind version for that? This option is not known in Valgrind 3.5.0 and I can't find anything in man valgrind either? Do you mean plain --verbose ? -- Milian Wolff ma...@mi... http://milianw.de |
|
Re: [Valgrind-users] How to debug segfault that only occurrs
whenrunning in valgrind with callgrind?
From: WAROQUIERS P. <phi...@eu...> - 2010-04-15 13:13:53
|
itself. > >How does one debug that? gdb -> valgrind -> app? > >That segfaults even earlier and gives a totally useless >backtrace without any >debug info... > >Hints? >From my recent experience debugging valgrind (I am busy working on having gdb able to properly debug a process which is running under valgrind): Valgrind uses SIGSEGV for some internal house keeping. So, when you debug valgrind, you have some "normal" SIGSEGV and some "abnormal SIGSEGV" indicating a real problem in valgrind. What I have seen is that the "normal" SIGSEGV have a not understandable backtrace. Just "continue" till you arrive on the SIGSEGV which is really interesting you: this one should have a proper backtrace showing correctly the valgrind code which triggers the unexpected SIGSEGV. Philippe ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |
|
From: Milian W. <ma...@mi...> - 2010-07-16 09:13:45
|
On Thursday, 15. April 2010 13:45:32 Milian Wolff wrote: > Hey all! > > When I try to profile the whole startup of KDevelop using callgrind, I and > at least one of the other developers, get a reproducible segfault. This > does not occur in memcheck or massif, so I fear it shows a bug in > callgrind itself. > > How does one debug that? gdb -> valgrind -> app? > > That segfaults even earlier and gives a totally useless backtrace without > any debug info... On debian squeeze I get a nicer debug info: $ valgrind --tool=callgrind --instr-atstart=no kdevelop -s profile ==12999== Callgrind, a call-graph generating cache profiler ==12999== Copyright (C) 2002-2009, and GNU GPL'd, by Josef Weidendorfer et al. ==12999== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info ==12999== Command: kdevelop -s profile ==12999== ==12999== For interactive control, run 'callgrind_control -h'. Calling appendChild() on a null node does nothing. Calling appendChild() on a null node does nothing. Calling appendChild() on a null node does nothing. Calling appendChild() on a null node does nothing. Calling appendChild() on a null node does nothing. (none) Callgrind: threads.c:246 (vgCallgrind_post_signal): Assertion 'tid == vgCallgrind_current_tid' failed. ==12999== at 0x3801D7DD: report_and_quit (m_libcassert.c:145) ==12999== by 0x3801DA8E: vgPlain_assert_fail (m_libcassert.c:217) ==12999== by 0x3801AF3C: vgCallgrind_post_signal (threads.c:246) ==12999== by 0x3805A745: vgPlain_sigframe_destroy (sigframe-x86- linux.c:723) ==12999== by 0x3808BF69: vgSysWrap_x86_linux_sys_sigreturn_before (syswrap- x86-linux.c:989) ==12999== by 0x3805BBEA: vgPlain_client_syscall (syswrap-main.c:1392) ==12999== by 0x38058142: handle_syscall (scheduler.c:872) ==12999== by 0x38059280: vgPlain_scheduler (scheduler.c:1068) ==12999== by 0x38085CB8: run_a_thread_NORETURN (syswrap-linux.c:91) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==12999== at 0x6341291: ??? (syscall-template.S:82) ==12999== by 0x550967D: select_msecs(int, fd_set*, fd_set*, int) (qprocess_unix.cpp:888) ==12999== by 0x550A75D: QProcessPrivate::waitForFinished(int) (qprocess_unix.cpp:1104) ==12999== by 0x54C6A8D: QProcess::waitForFinished(int) (qprocess.cpp:1698) ==12999== by 0xB2FCFA2: qtDocsLocation(QString const&) (qthelpplugin.cpp:52) ==12999== by 0xB2FE33D: QtHelpPlugin::QtHelpPlugin(QObject*, QList<QVariant> const&) (qthelpplugin.cpp:84) ==12999== by 0xB300BC8: QObject* KPluginFactory::createInstance<QtHelpPlugin, QObject>(QWidget*, QObject*, QList<QVariant> const&) (kpluginfactory.h:461) ==12999== by 0x424D7ED: KPluginFactory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) (kpluginfactory.cpp:191) ==12999== by 0x432AD8A: KDevelop::IPlugin* KPluginFactory::create<KDevelop::IPlugin>(QWidget*, QObject*, QString const&, QList<QVariant> const&) (kpluginfactory.h:515) ==12999== by 0x432A8A1: KDevelop::IPlugin* KService::createInstance<KDevelop::IPlugin>(QWidget*, QObject*, QList<QVariant> const&, QString*) const (kservice.h:517) ==12999== by 0x4329F38: KDevelop::IPlugin* KServiceTypeTrader::createInstanceFromQuery<KDevelop::IPlugin>(QString const&, QWidget*, QObject*, QString const&, QList<QVariant> const&, QString*) (kservicetypetrader.h:184) ==12999== by 0x4329210: KDevelop::IPlugin* KServiceTypeTrader::createInstanceFromQuery<KDevelop::IPlugin>(QString const&, QString const&, QObject*, QList<QVariant> const&, QString*) (kservicetypetrader.h:157) ==12999== by 0x43259BC: KDevelop::PluginController::loadPluginInternal(QString const&) (plugincontroller.cpp:436) ==12999== by 0x432697B: KDevelop::PluginController::allPluginsForExtension(QString const&, QStringList const&) (plugincontroller.cpp:577) ==12999== by 0x4379F18: KDevelop::DocumentationController::documentationProviders() const (documentationcontroller.cpp:124) ==12999== by 0x437C64D: ProvidersModel::ProvidersModel(QObject*) (documentationview.cpp:42) ==12999== by 0x437BA3E: DocumentationView::DocumentationView(QWidget*) (documentationview.cpp:98) ==12999== by 0x437A543: DocumentationViewFactory::create(QWidget*) (documentationcontroller.cpp:47) ==12999== by 0x43325B8: KDevelop::UiToolViewFactory::create(Sublime::ToolDocument*, QWidget*) (uicontroller.cpp:150) ==12999== by 0x69E7C64: Sublime::ToolDocument::createViewWidget(QWidget*) (tooldocument.cpp:60) ==12999== by 0x69E8120: Sublime::View::createWidget(QWidget*) (view.cpp:90) ==12999== by 0x69E809D: Sublime::View::widget(QWidget*) (view.cpp:82) ==12999== by 0x69ED846: Sublime::IdealMainWidget::addView(Qt::DockWidgetArea, Sublime::View*) (ideal.cpp:622) ==12999== by 0x69E0695: Sublime::MainWindowPrivate::IdealToolViewCreator::operator()(Sublime::View*, Sublime::Position) (mainwindow_p.cpp:190) ==12999== by 0x69E5496: void Sublime::Area::walkToolViews<Sublime::MainWindowPrivate::IdealToolViewCreator>(Sublime::MainWindowPrivate::IdealToolViewCreator&, QFlags<Sublime::Position>) (areawalkers.h:59) ==12999== by 0x69E26B5: Sublime::MainWindowPrivate::toolViewAdded(Sublime::View*, Sublime::Position) (mainwindow_p.cpp:542) ==12999== by 0x69DB798: Sublime::MainWindow::qt_metacall(QMetaObject::Call, int, void**) (mainwindow.moc:126) ==12999== by 0x431C3F4: KDevelop::MainWindow::qt_metacall(QMetaObject::Call, int, void**) (mainwindow.moc:90) ==12999== by 0x5535809: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:237) ==12999== by 0x55441DA: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3295) ==12999== by 0x69CAB1A: Sublime::Area::toolViewAdded(Sublime::View*, Sublime::Position) (area.moc:136) ==12999== by 0x69C9008: Sublime::Area::addToolView(Sublime::View*, Sublime::Position) (area.cpp:239) ==12999== by 0x4330DC4: KDevelop::UiController::addToolViewToArea(KDevelop::IToolViewFactory*, Sublime::ToolDocument*, Sublime::Area*) (uicontroller.cpp:593) ==12999== by 0x432F4B1: KDevelop::UiController::addToolView(QString const&, KDevelop::IToolViewFactory*) (uicontroller.cpp:323) ==12999== by 0x43799AC: KDevelop::DocumentationController::initialize() (documentationcontroller.cpp:67) ==12999== by 0x432C6B0: KDevelop::CorePrivate::initialize(KDevelop::Core::Setup, QString const&) (core.cpp:212) ==12999== by 0x432CC21: KDevelop::Core::initialize(KSplashScreen*, KDevelop::Core::Setup, QString const&) (core.cpp:241) ==12999== by 0x804F8F3: main (main.cpp:269) Thread 2: status = VgTs_WaitSys ==12999== at 0x6D0D482: pthread_cond_timedwait@@GLIBC_2.3.2 (pthread_cond_timedwait.S:180) ==12999== by 0x37888D7F: ??? Thread 3: status = VgTs_WaitSys ==12999== at 0x63391DB: ??? (syscall-template.S:82) ==12999== by 0xC5416D6: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC5429F6: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xB30CB75: QSQLiteDriver::open(QString const&, QString const&, QString const&, QString const&, int, QString const&) (qsql_sqlite.cpp:533) ==12999== by 0xC3E4690: QSqlDatabase::open() (qsqldatabase.cpp:842) ==12999== by 0xB34ED99: QHelpDBReader::init() (qhelpdbreader.cpp:94) ==12999== by 0xB355924: QHelpContentProvider::run() (qhelpcontentwidget.cpp:268) ==12999== by 0x5433FAD: QThreadPrivate::start(void*) (qthread_unix.cpp:248) ==12999== by 0x6D08954: start_thread (pthread_create.c:300) ==12999== by 0x634810D: clone (clone.S:130) Thread 4: status = VgTs_Yielding ==12999== at 0x63391DB: ??? (syscall-template.S:82) ==12999== by 0xC52575C: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC525863: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC525FDE: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC526041: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC52B587: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC5755A3: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC55C0B7: sqlite3_step (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC562DE9: sqlite3_exec (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC563A3B: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC563C30: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC564039: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC568012: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC56824D: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC50C2BF: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC50E60A: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC547257: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC556B5F: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC55960B: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC55B508: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC55B6E5: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xC55B80A: ??? (in /usr/lib/libsqlite3.so.0.8.6) ==12999== by 0xB30D332: QSQLiteResult::prepare(QString const&) (qsql_sqlite.cpp:327) ==12999== by 0xB30A628: QSQLiteResult::reset(QString const&) (qsql_sqlite.cpp:311) ==12999== by 0xC3E339F: QSqlQuery::exec(QString const&) (qsqlquery.cpp:374) ==12999== by 0xB34F261: QHelpDBReader::indicesForFilter(QStringList const&) const (qhelpdbreader.cpp:270) ==12999== by 0xB358D2B: QHelpIndexProvider::run() (qhelpindexwidget.cpp:178) ==12999== by 0x5433FAD: QThreadPrivate::start(void*) (qthread_unix.cpp:248) ==12999== by 0x6D08954: start_thread (pthread_create.c:300) ==12999== by 0x634810D: clone (clone.S:130) Thread 5: status = VgTs_WaitSys ==12999== at 0x63391DB: ??? (syscall-template.S:82) ==12999== by 0x5433FAD: QThreadPrivate::start(void*) (qthread_unix.cpp:248) ==12999== by 0x6D08954: start_thread (pthread_create.c:300) ==12999== by 0x634810D: clone (clone.S:130) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks. ~~~~~~ Can someone do anything with that? -- Milian Wolff ma...@mi... http://milianw.de |