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
[email protected]
http://milianw.de

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to