Somehow a bad entry ended up in the idfilename database, with key == parentId, name = "". Thus the while(id) loop never terminates. The key is valid (e.g. points to the device/inode of ~/Pictures), and was referenced by several children, i.e. the ~/Pictures/ contents. mdb_dump -n -p -s idfilename /home/stefan/.local/share/baloo/index_bak shows: /\00\00\00\1d\01\00\00 /\00\00\00\02\01\00\00Music /\00\00\00\1e\01\00\00 /\00\00\00\1e\01\00\00 Same for a non-corrupt database: /\00\00\00\1d\01\00\00 /\00\00\00\02\01\00\00Music /\00\00\00\1e\01\00\00 /\00\00\00\02\01\00\00Pictures The error is also visible it the idtree database, it lists itself as a subdoc: /\00\00\00\1e\01\00\00 /\00\00\00\1e\01\00\00/\00\00\00Q\0a\0c\00/\00\00\00i\0a\0c\00/\00\00\00\c9\0a\0c\00/\00\00\00\05?\10\00/\00\00\00YK\10\00/\00\00\00\faL\10\00/\00\00\00\c9M\10\00/\00\00\00YN\10\00/\00\00\00\d1T\10\00/\00\00\00\99\a2\18\00/\00\00\00\f2\c2o\00 Reproducible: Always Steps to Reproduce: Steps which lead to the corrupt database are unknown. Expected Results: The DocumentUrlDb::get() should ignore such a bad entry, best remove it.
*** This bug has been marked as a duplicate of bug 378754 ***