Bug 407972

Summary: baloo_file doesn't recover from baloo_file_extractor crash
Product: [Frameworks and Libraries] frameworks-baloo Reporter: skierpage <info>
Component: Baloo File DaemonAssignee: baloo-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: nate, stefan.bruens
Priority: NOR    
Version First Reported In: 5.57.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description skierpage 2019-05-26 22:35:53 UTC
SUMMARY
I have a file that triggers a crash in baloo_file_extractor in KDE Frameworks 5.57 and below (bug 404565). After this, baloo_file doesn't recover. It remains stuck, never indexing another file until I kill it or balooctl disable then balooctl enable. Meanwhile balooctl status reports nothing wrong.

STEPS TO REPRODUCE
1. Run balooctl monitor &
1. Trigger the crash (bug 405017 comment 4 points to a file that triggers it).
2. Let DrKonqi close the process.
3. Run balooctl status
4. Run ps
5. Try to recover

OBSERVED RESULT
After the baloo_file_extractor program exits, the baloo_file process continues to run. But it never updates more files and can't spawn another baloo_file_extractor.
$ balooctl status
    Baloo File Indexer is running
    Indexer state: Indexing file content
    Indexed 27987 / 29422 files
    Current size of index is 324.04 MiB

$ ps alx -w -w | grep baloo
  F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
  0  1000  1556     1  39  19 268871752 11968 x64_sy SNl ?        0:04 /usr/bin/baloo_file
  0  1000  2086  1391  20   0 268916308 18376 x64_sy Ssl ?        0:06 /usr/libexec/baloorunner
  ...

Note: baloo_file_extractor has crashed.

$ balooctl monitor
  Press ctrl+c to stop monitoring
  File indexer is running
  Indexing file content
  Indexing: /path/to/problem/file/PANO_20190217_130422.vr.jpg

EXPECTED RESULT
baloo_file should recover from baloo_file_extractor crashing. balooctl status should report there's a problem.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.57.0
Qt Version: 

ADDITIONAL INFORMATION
balooctl stop then balooctl start has no effect. You have to kill the baloo_file process, then balooctl start.
Comment 1 skierpage 2019-05-26 22:44:50 UTC
(In reply to skierpage from comment #0)

> $ balooctl monitor
>   Press ctrl+c to stop monitoring
>   File indexer is running
>   Indexing file content
>   Indexing: /path/to/problem/file/PANO_20190217_130422.vr.jpg

I thought Baloo was OK with file _130422.vr.jpg, while _130355.vr.jpg caused the crash. Perhaps `balooctl monitor` reports this is the next file to index but baloo_file_extractor has crashed so it never starts on this file.  Or maybe this panorama also caused a crash. Fedora 30 KDE spin has updated me to 5.58 so it's hard for me to reproduce.
Comment 2 Stefan BrĂ¼ns 2020-03-20 20:09:51 UTC
Files which failed to index are shown with:

$> balooctl failed

"balooctl status" reports the number of failed files:
Files failed to index: 0

Fixed in KF 5.59, 5.60