Bug 409499 - Krunner returns empty item
Summary: Krunner returns empty item
Status: RESOLVED MOVED
Alias: None
Product: krunner
Classification: Plasma
Component: filesearch (show other bugs)
Version: 5.16.2
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
: 358774 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-04 17:35 UTC by elman
Modified: 2021-05-11 06:35 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
empty item in results (14.89 KB, image/png)
2019-07-04 17:35 UTC, elman
Details
empty item on neon (26.92 KB, image/png)
2019-07-25 13:46 UTC, elman
Details
empty item on arch (20.43 KB, image/png)
2020-12-15 11:58 UTC, elman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elman 2019-07-04 17:35:53 UTC
Created attachment 121323 [details]
empty item in results

SUMMARY
When I use krunner and search for certain string, empty / null item is among results. It is always reproducible on one of my computers, but others work fine. Sometimes this empty item is image, sometimes folder, sometimes video. However it is consistent with search strings. Eg. when I search for "spo", it is always image. When I search for "a", it is always archive, when I search for "b" it is always video.

If I disable plugin "Desktop Search", empty items do not appear in results.

When I click empty item, I get error Malformed URL.

I understand this is weird issue. Is there anything I could use to add more detailed information? Can I somehow call krunner query from console?

STEPS TO REPRODUCE
1. Open krunner (I have Win key to open krunner)
2. Search for string spo

OBSERVED RESULT
Empty item appears. See attachment.

EXPECTED RESULT
No empty item.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro
(available in About System)
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
Comment 1 elman 2019-07-04 17:37:18 UTC
Also I tried to clear baloo index, but that didn't help.
Comment 2 elman 2019-07-18 18:55:19 UTC
This seems to be somewhat fixed in Frameworks 5.60. I don't get so many empty items. However there are still some. Also I noticed that if I get empty result, now it's always folder, never file.
Comment 3 Igor Poboiko 2019-07-23 09:12:36 UTC
This can be related to bug 409257, which should be fixed in KF 5.60.
Can you try the most recent version?
Comment 4 elman 2019-07-24 17:15:38 UTC
I did try it in KF 5.60 and already posted results. Is there newer version of KF?
Comment 5 Igor Poboiko 2019-07-25 08:22:33 UTC
Whoops, sorry. KF 5.60 is the most recent version for now.
Have you tried clearing your index with 5.60? It should be fine.
Comment 6 elman 2019-07-25 13:45:48 UTC
I did try to clear index. I used 

balooctl disable
balooctl purge
balooctl enable

and I still get corrupted items.

Also just today I noticed that I have the same issue on another PC running Neon stable, fully updated (Plasma 5.16.3, KF 5.60.0, Qt 5.12.3) and clearing index didn't work as well. I will attach screenshot.

Or maybe I didn't clear it right? Or do I need to start logout and log back in?
Comment 7 elman 2019-07-25 13:46:30 UTC
Created attachment 121725 [details]
empty item on neon
Comment 8 Ismael Asensio 2019-08-27 14:59:05 UTC
*** Bug 358774 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Lohnau 2020-10-13 20:14:48 UTC
Is this still an issue on newer versions?
Comment 10 elman 2020-10-15 19:05:31 UTC
I tested on Plasma 5.19.5 and from time to time I see empty items. But it's nowhere near as common as before.
Comment 11 Alexander Lohnau 2020-10-15 19:10:00 UTC
Can you please try to focus the empty item and check what the subtext says?
Comment 12 elman 2020-10-16 00:14:59 UTC
Doesn't say anything. And when I click on the item it gives me error Malformed URL. One bad result is folder and the other one is video.

When I start krunner from shell, it doesn't print any error message, only warns about deprecated ToolButtonStyle.qml:196:13:
Comment 13 Bug Janitor Service 2020-10-16 18:08:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/26
Comment 14 elman 2020-12-15 11:57:56 UTC
After update to KF 5.77.0 I started getting empty results also on my second notebook. Don't know if it's coincidence or not. 

Also noticed other problem - when I open Dolphin, "Modified Today" and "Modified Yesterday" return no items. Also 'baloosearch:/images/' returns no items.
Comment 15 elman 2020-12-15 11:58:24 UTC
Created attachment 134088 [details]
empty item on arch
Comment 16 elman 2020-12-15 12:12:57 UTC
I just purged and recreated baloo index. This helped me with Dolphin issue, but empty results remain.
Comment 17 Nate Graham 2020-12-15 22:29:46 UTC
This might be an issue in KRunner itself, since I see the empty item no matter what the search results are. For example even if I enter 5+5, I get the expected calculator result, but also the empty item.
Comment 18 Gianluca Pettinello 2020-12-19 12:04:19 UTC
Same for me
Comment 19 Nate Graham 2020-12-19 15:18:54 UTC
Interesting enough, for me the empty file is categorized in the "Audio" group.
Comment 20 tgnff242 2020-12-19 21:46:12 UTC
Temporarily, I can make it work if I disable baloo, kill baloorunner, purge the cache, then re-enable baloo (which needs to issue `balooctl enable` two times). It stops working after re-dis/enabling baloo, or after a reboot, though.

baloo_file seems to crash, and baloosearch returns (an accurate number of) empty results too, so it's not krunner-specific. Unfortunately, my distro doesn't provide packages with debug symbols to give you a useful backtrace, so hopefully a dev can reproduce it. Also, drkonqi doesn't detect the crash, systemd-coredump does.

Also, it might be important to add that downgrading the baloo package to 5.76 isn't enough to "fix" the issue.
Comment 21 Kishore Gopalakrishnan 2020-12-20 08:56:56 UTC
(In reply to tgnff242 from comment #20)
> Temporarily, I can make it work if I disable baloo, kill baloorunner, purge
> the cache, then re-enable baloo (which needs to issue `balooctl enable` two
> times). It stops working after re-dis/enabling baloo, or after a reboot,
> though.
> 
> baloo_file seems to crash, and baloosearch returns (an accurate number of)
> empty results too, so it's not krunner-specific. Unfortunately, my distro
> doesn't provide packages with debug symbols to give you a useful backtrace,
> so hopefully a dev can reproduce it. Also, drkonqi doesn't detect the crash,
> systemd-coredump does.
> 
> Also, it might be important to add that downgrading the baloo package to
> 5.76 isn't enough to "fix" the issue.

I also have the same issue. Here is the backtrace from my crash of baloo_file:

```
#0  0x00007f257d8a6396 in ?? () from /usr/lib/liblmdb.so
#1  0x00007f257d8a8efe in ?? () from /usr/lib/liblmdb.so
#2  0x00007f257d8a9644 in ?? () from /usr/lib/liblmdb.so
#3  0x00007f257d8a9c50 in mdb_get () from /usr/lib/liblmdb.so
#4  0x00007f257ed802a5 in Baloo::IdFilenameDB::get (this=this@entry=0x7f257845c700, docId=<optimized out>, docId@entry=50665500102950405)
    at /usr/src/debug/baloo-5.77.0/src/engine/idfilenamedb.cpp:83
#5  0x00007f257ed7a2fc in Baloo::DocumentUrlDB::get (this=this@entry=0x7f257845c780, docId=docId@entry=50665500102950405)
    at /usr/src/debug/baloo-5.77.0/src/engine/documenturldb.cpp:171
#6  0x00007f257ed8b085 in Baloo::Transaction::documentUrl (this=<optimized out>, id=50665500102950405)
    at /usr/src/debug/baloo-5.77.0/src/engine/transaction.cpp:102
#7  0x00005645d02bf8e4 in operator() (id=<optimized out>, __closure=<optimized out>) at /usr/src/debug/baloo-5.77.0/src/file/indexcleaner.cpp:40
#8  std::__invoke_impl<bool, Baloo::IndexCleaner::run()::<lambda(quint64)>&, long long unsigned int> (__f=...) at /usr/include/c++/10.2.0/bits/invoke.h:60
#9  std::__invoke_r<bool, Baloo::IndexCleaner::run()::<lambda(quint64)>&, long long unsigned int> (__fn=...) at /usr/include/c++/10.2.0/bits/invoke.h:141
#10 std::_Function_handler<bool(long long unsigned int), Baloo::IndexCleaner::run()::<lambda(quint64)> >::_M_invoke(const std::_Any_data &, unsigned long long &&) (__functor=..., __args#0=<optimized out>) at /usr/include/c++/10.2.0/bits/std_function.h:291
#11 0x00007f257ed924ff in std::function<bool (unsigned long long)>::operator()(unsigned long long) const (__args#0=50665500102950405, this=0x7f2578c5a9c0)
    at /usr/include/c++/10.2.0/bits/std_function.h:622
#12 Baloo::WriteTransaction::removeRecursively(unsigned long long, std::function<bool (unsigned long long)> const&) (this=0x7ee570004e30, 
    parentId=50665500102950405, shouldDelete=...) at /usr/src/debug/baloo-5.77.0/src/engine/writetransaction.cpp:159
#13 0x00007f257ed92557 in Baloo::WriteTransaction::removeRecursively(unsigned long long, std::function<bool (unsigned long long)> const&) (
    this=0x7ee570004e30, parentId=50665500102950405, shouldDelete=...) at /usr/src/debug/baloo-5.77.0/src/engine/writetransaction.cpp:166
#14 0x00007f257ed92557 in Baloo::WriteTransaction::removeRecursively(unsigned long long, std::function<bool (unsigned long long)> const&) (
    this=0x7ee570004e30, parentId=50665500102950405, shouldDelete=...) at /usr/src/debug/baloo-5.77.0/src/engine/writetransaction.cpp:166
#15 0x00007f257ed92557 in Baloo::WriteTransaction::removeRecursively(unsigned long long, std::function<bool (unsigned long long)> const&) (
    this=0x7ee570004e30, parentId=50665500102950405, shouldDelete=...) at /usr/src/debug/baloo-5.77.0/src/engine/writetransaction.cpp:166
```

The crash reporter didn't launch, but I found multiple crashes like this listed in the output of 'coredumpctl list'. I have compiled baloo with debug symbols, but please let me know if I should install debug symbols for any other package. The last line (#15) kept on getting repeated in gdb for some reason; not sure if this is important.
Comment 22 floppy5.25 2020-12-22 20:25:31 UTC
Another me too comment (meaning baloo_file dups core at startup and baloosearch shows empty lines)
Some additional troubleshooting:
balooctl disable
balooctl purge
balooctl enable
After a while it seems that index is rebuilt correctly and baloosearch results are accurate but it does not survive a reboot.
I tried the above but with an additional:
balooctl disable 
_before rebooting_ and the baloosearch results survive the reboot (of course the indexer is not running. As soon as I:
balooctl enable
the following message appears:
61924499171376643 "/home/username/" renaming "username" to ""
where username is my username, and baloosearch goes back to displaying empty lines and crashing.
So it seems, and this might be speculation on my part, that a enabling baloo after a reboot corrupts the index.
Comment 23 floppy5.25 2020-12-28 22:52:11 UTC
Could this bug:
https://bugs.kde.org/show_bug.cgi?id=430610
be a duplicate of this one?
Comment 24 Nate Graham 2020-12-29 17:01:18 UTC
Hmm, this has stopped happening for me. :/
Comment 25 floppy5.25 2020-12-30 22:22:07 UTC
Still happening for me.
Downgrading to baloo 5.76 (from 5.77) fixes the issue as mentioned in the bug linked above.
Comment 26 Stefan Brüns 2020-12-30 23:33:33 UTC
This has become a bag of unrelated issues. It is no longer possible to say what any new comment refers to.

Closing this. Please open a new report for *each* remaining issue.
Comment 27 Nate Graham 2021-01-05 17:17:37 UTC
Here's one: Bug 430891.