https://bugs.kde.org/show_bug.cgi?id=468337

            Bug ID: 468337
           Summary: Baloo ignores corrupted DB
    Classification: Frameworks and Libraries
           Product: frameworks-baloo
           Version: 5.104.0
          Platform: NixOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Engine
          Assignee: baloo-bugs-n...@kde.org
          Reporter: m...@eliasprobst.eu
  Target Milestone: ---

SUMMARY
For reasons unknown, my Baloo DB got corrupted - but I had no clue until I
wondered why I got no results from Baloo and started to investigate using
Baloo's CLI tools.
At no point did Baloo's KCM or any of the Plasma tooling let me know, that
Baloo might have a problem with its DB.


STEPS TO REPRODUCE
1. Corrupt your DB (procedure unknown)
2. Index a file
3. Execute a query which should return the file

OBSERVED RESULT
- Baloo acts on the surface, as if nothing happened
- Baloo only hints at a problem, when manually executing "balooctl index
$PathToFile"

The following steps demonstrate the problem:
- Create a testfile:
  ```
  echo "This is my testfile. Unique term is: joo0theg8Vai2agh8wah" >
~/Documents/my-testfile.txt
  ```
- Query Baloo for the unique term in it (no results returned):
  ```
  baloosearch joo0theg8Vai2agh8wah
  Elapsed: 1.47841 msecs
  ```
- Ask Baloo explicitly to index the file (it sends mixed signals - on the one
hand it claims to have indexed the file, on the other hand a huge number of
errors):
  ```
  balooctl index ~/Documents/my-testfile.txt
  kf.baloo.engine: IdTreeDB::put MDB_CORRUPTED: Located page was wrong type
  kf.baloo.engine: IdFilenameDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: IdTreeDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: IdFilenameDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: IdTreeDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: IdFilenameDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: IdTreeDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: IdFilenameDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: DocumentDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: DocumentDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: DocumentTimeDB::put 25335805920738816 MDB_BAD_TXN:
Transaction must abort, has a child, or is invalid
  kf.baloo.engine: MTimeDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: DocumentDataDB::put MDB_BAD_TXN: Transaction must abort, has
a child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a
child, or is invalid
  kf.baloo.engine: Transaction::commit MDB_BAD_TXN: Transaction must abort, has
a child, or is invalid
  Indexing /home/eliasp/Documents/my-testfile.txt
  File(s) indexed
  ```
- Query Baloo again (still no results):
  ```
  baloosearch joo0theg8Vai2agh8wah
  Elapsed: 0.185144 msecs
  ```

EXPECTED RESULT
- Perfect: don't corrupt the DB in the first place
- Nice: fix/remove corrupted data in the DB automatically
- OK: let the user know (preferrably via the KCM _and_ a Plasma notification)
the DB got corrupted and ask, whether to remove/recreate it

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOS/nixpkgs unstable 19cf008bb1
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
LMDB 0.9.30

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to