[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nepomuk
Subject:    [Nepomuk] apparent deadlock when suspending indexing
From:       Edward Toroshchin <edward.hades () gmail ! com>
Date:       2012-06-02 16:18:51
Message-ID: 20120602161851.GA28549 () phobos
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hey guys,

I've been poking around recently to find out, why nepomuk file indexing
service does not work. By "does not work" I mean it just hangs there,
not doing anything, not answering any dbus queries, and not even
shutting down when asked so by the Nepomuk server.

The reason is strange, because I can't understand how it could work for
anyone else in the released code (the version is 4.8.3).

So, where were I? Yeah, the reason. It turns out that the slot
Nepomuk::EventMonitor::slotIndexingSuspended does more than the comments
say, and what you'd normally think it does (note the past tense).

See nepomuk/services/fileindexer/eventmonitor.cpp:176:

if( suspended ) {
    //The indexing is already paused, this meerly sets the correct
    //state, and adjusts the timing.
    pauseIndexing( PausedCustom );
}
else {
    //Again, used to set the correct state, and adjust the timing.
    resumeIndexing();
}

Despite stating that "this merely sets the correct state" the
pauseIndexing and resumeIndexing methods actually ask the IndexScheduler
to pause and resume indexing respectively. This in turn makes
IndexScheduler emit a corresponding signal, which triggers the
slotIndexingSuspended slot.

Luckily (or unluckily) this does not lead to stack corruption, but
to a mere deadlock.

So my question is, do I understand everything correctly, or is it should
in fact be working, but fails on my box for unknown reason?

Sorry if this has already been discovered and fixed. If so, could you
please say in which commit, so I can backport the fix?

Thanks in advance, and have a nice weekend!

--=20
Edward "Hades" Toroshchin
dr_lepper on irc.freenode.org

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Nepomuk mailing list
Nepomuk@kde.org
https://mail.kde.org/mailman/listinfo/nepomuk


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic