[Kde-pim] nepomukqueryservice crash

Vishesh Handa me at vhanda.in
Mon Jul 9 12:23:31 BST 2012


> ---------- Forwarded message ----------
> From: David Faure <faure at kde.org>
> To: nepomuk at kde.org
> Cc: kde-pim at kde.org
> Date: Fri, 6 Jul 2012 12:44:30 +0000
> Subject: [Kde-pim] nepomukqueryservice crash
> I found the reason for the kmail composer window being disabled forever, in
> some cases.
>
> 2) the crash itself should be fixed ;)
>
> A valgrind log of `nepomukservicestub nepomukqueryservice` gives this:
>
> "/d/kde/inst/kde4.9/bin/nepomukservicestub(19732)" Soprano: "Failed to
> write to fd -1 (Bad file descriptor)"
> "/d/kde/inst/kde4.9/bin/nepomukservicestub(19732)" Soprano: "Failed to
> write unsigned int32."
> "/d/kde/inst/kde4.9/bin/nepomukservicestub(19732)" Soprano: "Timeout (5)":
> "Command timed out."
> ==19732== Thread 3:
> ==19732== Invalid read of size 8
> ==19732==    at 0xC5AB6DA:
> QPointer<Soprano::Client::ClientConnection>::operator->() const
> (qpointer.h:74)
> ==19732==    by 0xC5AA70A:
> Soprano::Client::ClientModel::executeQuery(QString const&,
> Soprano::Query::QueryLanguage, QString const&) const (clientmodel.cpp:106)
> ==19732==    by 0x68E9319: Nepomuk2::MainModel::executeQuery(QString
> const&, Soprano::Query::QueryLanguage, QString const&) const
> (nepomukmainmodel.cpp:182)
> ==19732==    by 0x12BDDEED: Nepomuk2::Query::SearchRunnable::run()
> (searchrunnable.cpp:89)
> ==19732==    by 0x4ECA2FC: QThreadPoolThread::run() (qthreadpool.cpp:107)
> ==19732==    by 0x4EDAF27: QThreadPrivate::start(void*)
> (qthread_unix.cpp:307)
> ==19732==    by 0x53CCF04: start_thread (in /lib64/libpthread-2.14.1.so)
> ==19732==    by 0x86CD10C: clone (in /lib64/libc-2.14.1.so)
> ==19732==  Address 0x117af938 is 72 bytes inside a block of size 80 free'd
> ==19732==    at 0x4C28706: operator delete(void*) (vg_replace_malloc.c:457)
> ==19732==    by 0xC5AA2ED: Soprano::Client::ClientModel::~ClientModel()
> (clientmodel.cpp:58)
> ==19732==    by 0x68E8BAB: (anonymous
> namespace)::GlobalModelContainer::init(bool) (nepomukmainmodel.cpp:82)
> ==19732==    by 0x68E8E58: (anonymous
> namespace)::GlobalModelContainer::model() (nepomukmainmodel.cpp:100)
> ==19732==    by 0x68E932D: Nepomuk2::MainModel::executeQuery(QString
> const&, Soprano::Query::QueryLanguage, QString const&) const
> (nepomukmainmodel.cpp:183)
> ==19732==    by 0x12BDDEED: Nepomuk2::Query::SearchRunnable::run()
> (searchrunnable.cpp:89)
> ==19732==    by 0x4ECA2FC: QThreadPoolThread::run() (qthreadpool.cpp:107)
> ==19732==    by 0x4EDAF27: QThreadPrivate::start(void*)
> (qthread_unix.cpp:307)
> ==19732==    by 0x53CCF04: start_thread (in /lib64/libpthread-2.14.1.so)
> ==19732==    by 0x86CD10C: clone (in /lib64/libc-2.14.1.so)
> ==19732==
>
> Obviously the "delete localSocketModel" in nepomukmainmodel.cpp:82 is the
> problem,
> I assume because it's used in another thread at the same time.
> Or maybe the underlying soprano connection is used later on in the same
> thread; valgrind isn't really clear.
>
> The -1 file descriptor is weird too, does anyone know the reason for that?
>

I'm not sure about the '-1'.

I don't think it's a threading problem cause m_initMutex is locked before
deleting it, and before accessing it. So two threads cannot be accessing it
at the same time. Then again, you understand threading a lot better than I
do.


@Sebastian: Could you please take a look?



-- 
Vishesh Handa
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list