Bug 248621

Summary: Strigi decides to ignore existing database after reboot.
Product: [Unmaintained] nepomuk Reporter: Chuck <cfox04>
Component: generalAssignee: Sebastian Trueg <sebastian>
Status: RESOLVED FIXED    
Severity: normal CC: bigbrovar, blackr2d, foolecho, jonasrj20, kde, snvv101, trueg, uwe.helms
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Chuck 2010-08-21 20:29:04 UTC
Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

Recently upgraded to KDE 4.5 and finally decided to let Strigi and Nepomuk run.  After about 15 hours, Strigi finally finished indexing my files, and the search bar in Dolphin actually appeared to work instead of crashing constantly... huge improvement over the last 2 years of intermittently trying to use these things.
   
   Then I made the fatal mistake of rebooting my computer (yes it happens even in Linux, and this was to apply the kernel updates regarding the recent security bugs).   After rebooting, strigi decides that the existing 1.3 Gigabyte database that worked fine and was (as far as I can tell) cleanly closed out prior to a clean reboot is useless, and begins indexing every file again.  Strigi acknowledges the fact that there is a 1.3 Gigabyte index in the progress window, but apparently it doesn't trust the files from the previous boot and will not recognize any files that are already in the index.

   I double checked Dolphin and all searches that were working fine before now return nothing as the rest of Nepomuk also ignores the existing index data that it spent the better part of a day assembling.

   Looks like Nepomuk & Strigi are being turned off again.. maybe they will kinda sorta work for KDE 4.6.

Reproducible: Always

Steps to Reproduce:
1. Let strigi run (to completion).
2. Reboot
3. Strigi will intentionally ignore the existing index and start over from scratch.
Comment 1 Bobby 2010-10-21 07:28:57 UTC
I was searching through bguzila looking whether this has been filed before when I found yours. strigi would just for some reason decide to stop working even though its running and indexing in the background any query via dolphin returns a zero result
Comment 2 Bobby 2010-10-21 07:33:09 UTC
I was searching through bguzila looking whether this has been filed before when I found yours. strigi would just for some reason decide to stop working even though its running and indexing in the background any query via dolphin returns a zero result
Comment 3 Christian (Fuchs) 2010-10-29 19:36:31 UTC
Unfortunately I am able to confirm this on Gentoo x86_64, KDE 4.5.2. 

It happens not every time, but when it happens sometimes I am able to see the file count (in the window that appears when clicking on the systray) moving down until reaching zero. 

Seems to be a 4.5 regression. 

Virtuoso is 6.1.2, KDE is 4.5.2, soprano 2.5.2

Fuchs
Comment 4 snvv101 2010-11-23 18:22:53 UTC
This bug should closely related with https://bugs.kde.org/show_bug.cgi?id=226895
Comment 5 Jack 2010-12-05 15:10:56 UTC
Confirming on Gentoo X86 and KDE 4.5.4
Had to use zfs with timed snapshots for nepomuk virtuoso db.

It seems that's not a DB corruption as if that happens (strigi ignores old entries and starts to index again) and I have a DB from a snapshot just before the bug and restart whole nepomuk on it - there's no problem.

It seems pretty random.
Comment 6 Sebastian Trueg 2011-01-20 08:44:49 UTC
*** Bug 254468 has been marked as a duplicate of this bug. ***
Comment 7 Jonas R. Jensen 2011-11-12 09:28:58 UTC
Experiencing this bug on Arch Linux (kernel 3.1) with KDE 4.7.3 as well.
Even if Strigi had successfully ended initial indexing before reboot, and after reboot Nepomuk reports to have the files in the index (according to total number of files), Strigi (re)starts initial indexing again. Upon finishing indexing, unless I created some, no new files have been added to the index (total number of files unchanged). Indexing takes the same amount of time, 1st, 2nd, 3rd, ... time.
Also, even though Nepomuk is reporting to have files in it's index, searching in Dolphin yields no results before indexing finishes again.


I noticed these lines on the terminal when closing down my KDE-session:

startkde: Shutting down...
klauncher: Exiting on signal 1
startkde: Running shutdown scripts...
ProcessControl: Application '/usr/bin/nepomukservicestub' stopped unexpected (Process crashed)
Application '/usr/bin/nepomukservicestub nepomukfilewatch' crashed. No restart!
[...]
ProcessControl: Application '/usr/bin/nepomukservicestub' stopped unexpected (Process crashed)
Application '/usr/bin/nepomukservicestub nepomukstorage' crashed. No restart!

(These lines are there every time: I started looking for them)

Could (some part of) nepomuk crashing when KDE is ending the session be a part of the problem? Or is it normal for it to crash like this....?
Comment 8 FoolEcho 2011-11-12 12:21:56 UTC
I can confirm the behavior described by Jonas (I'm also under Archlinux and Kde 4.7.3 ^^) and bring some other elements for confirmation:
- in spite of nepomuk indexes, strigi reindexes from scratch not only at startup of Kde but each time strigi is manually stopped then launched during the session although the indexation was previously over (so I don't think about a problem with a nepomuk crash on shutdown: I've nothing related to that in my session log, by the way)
- the bug was not present in kdelibs in 4.7.2 and doesn't appear with downgrading.(In reply to comment #7)
Comment 9 Sebastian Trueg 2011-11-16 10:01:34 UTC
Do not confuse indexing with scanning for changes for which there simply is no technical solution at the moment.