Bug 405317 - Cannot find file just created in home directory
Summary: Cannot find file just created in home directory
Status: RESOLVED DUPLICATE of bug 431664
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.56.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-10 16:03 UTC by dagobertram
Modified: 2021-07-03 08:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
home directory on the left with all the files just created; file not found via search on the right (319.12 KB, image/png)
2019-03-10 16:03 UTC, dagobertram
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dagobertram 2019-03-10 16:03:45 UTC
Created attachment 118689 [details]
home directory on the left with all the files just created; file not found via search on the right

SUMMARY
Sometimes I cannot find files, which are clearly shown inside the directory I am searching in.

Before I sometimes was able to find the file though, if I previously deactivated file search in System Settings.

STEPS TO REPRODUCE
1. open home directory and create files called "test (1)", "test (2)", "test (3)" and so on
2. try to search for "test (2)" via CTRL+F (baloo active)
3. deactivate file search in System Settings
4. again: try to search for "test (2)" via CTRL+F

OBSERVED RESULT
there is no entry shown (this time neither with 2. nor 4. unfortunately)

EXPECTED RESULT
I find the file "test (2)"

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2019-03-17 16:11:01 UTC
If you run `balooshow <name of file>` in a terminal window, does it appear there?
Comment 2 dagobertram 2019-03-17 19:14:17 UTC
(In reply to Nate Graham from comment #1)
> If you run `balooshow <name of file>` in a terminal window, does it appear
> there?

Just tried it. I entered 'balooshow "test (2)"'. Unfortunately it does not find it.
Comment 3 Nate Graham 2019-03-17 21:31:57 UTC
If you give it the full path, do you get something like this?

$ balooshow '/home/nate/test (2)' 
No index information found

If you then run `balooctl index <path to file>  does `balooshow` then see it, and does it then show up in Dolphin's search results?
Comment 4 dagobertram 2019-03-18 17:09:01 UTC
(In reply to Nate Graham from comment #3)
> If you give it the full path, do you get something like this?
> 
> $ balooshow '/home/nate/test (2)' 
> No index information found
>
> If you then run `balooctl index <path to file>  does `balooshow` then see
> it, and does it then show up in Dolphin's search results?

Yes and yes!
Comment 5 Nate Graham 2019-03-18 17:42:26 UTC
Ok, so for some reason it didn't notice the newly-created file. What was the exact path to the file? Just ~/test (etc)?
Comment 6 dagobertram 2019-03-18 17:53:22 UTC
(In reply to Nate Graham from comment #5)
> Ok, so for some reason it didn't notice the newly-created file. What was the
> exact path to the file? Just ~/test (etc)?

Yes and I can reproduce it on my machine.
Comment 7 Nate Graham 2019-03-18 22:30:01 UTC
Thanks. I can confirm the same behavior with Frameworks 5.56 on my own machine. :(
Comment 8 Stefan Brüns 2019-03-18 22:38:21 UTC
1. Does this only affect files with parentheses?
2. Can you run 'balooctl monitor' and then create the file?
Comment 9 Nate Graham 2019-03-18 22:43:13 UTC
(In reply to Stefan Brüns from comment #8)
> 1. Does this only affect files with parentheses?
Not for me. I was able to reproduce with empty files created from within Dolphin with any conceivable name.

> 2. Can you run 'balooctl monitor' and then create the file?
Yep, did that. It was idle the whole time. :(
Comment 10 Stefan Brüns 2019-03-19 03:26:21 UTC
Hm can not really reproduce here - as soon as I touch a file, it is updated.

Can you attach strace to the running baloo_file process ("strace -p <PID>") and check if you get any output and/or errors when you touch a file?
Comment 11 Nate Graham 2019-03-19 09:39:18 UTC
$ ps -e | grep -i baloo
  922 ?        00:00:58 baloo_file
 4623 ?        00:00:06 baloorunner

$ sudo strace -p 922
strace: Process 922 attached
restart_syscall(<... resuming interrupted poll ...>

No output at all when I create the file. :(
Comment 12 Stefan Brüns 2019-03-20 01:51:40 UTC
Git commit db6c2b3eaa0c697d67f18a57aafdaf746a9c52fd by Stefan Brüns.
Committed on 20/03/2019 at 01:51.
Pushed by bruns into branch 'push'.

Fix regression when opening DB in read-write mode

Commit eb68430ae5f4 ("Baloo engine: treat every non-success code as a
failure") introduced a regression, afterwards any attempt to open the
DB in read-write mode would fail, as the abort/close/return ended up
in an unconditional scope.

M  +2    -2    src/engine/database.cpp

https://commits.kde.org/baloo/db6c2b3eaa0c697d67f18a57aafdaf746a9c52fd
Comment 13 Stefan Brüns 2019-03-20 01:53:45 UTC
Git commit 57b9e32ff6c815e48826f92b24db22659ab34782 by Stefan Brüns.
Committed on 20/03/2019 at 01:53.
Pushed by bruns into branch 'master'.

Fix regression when opening DB in read-write mode

Commit eb68430ae5f4 ("Baloo engine: treat every non-success code as a
failure") introduced a regression, afterwards any attempt to open the
DB in read-write mode would fail, as the abort/close/return ended up
in an unconditional scope.

M  +2    -2    src/engine/database.cpp

https://commits.kde.org/baloo/57b9e32ff6c815e48826f92b24db22659ab34782
Comment 14 Nate Graham 2019-03-20 22:26:06 UTC
Thanks, hopefully that helps. :)
Comment 15 Stefan Brüns 2019-03-20 23:53:25 UTC
(In reply to Nate Graham from comment #14)
> Thanks, hopefully that helps. :)

@ngraham -

Can you verify if it cures the problem for you - the problematic change was introduced only after 5.56, so it was never part of a release - but you are running current GIT?

The original reporter likely has a different problem, as he is using 5.55.

@dagobertram - can you try the steps I asked for earlier?
Comment 16 dagobertram 2019-03-21 18:54:16 UTC
First of all: Sorry for my late response. I was really busy this week.

@NateGraham: I also have Frameworks 5.56 installed. One email told me that you changed that entry back to version 5.55 on March the 17th. I am running KDE Neon User Edition and update regularly.

@StefanBrüns:
> 1. Does this only affect files with parentheses?
No. I can reproduce it with "file1", "file2" and "file3" for example.

> 2. Can you run 'balooctl monitor' and then create the file?
For me baloo was inactive the whole time.

> Can you attach strace to the running baloo_file process ("strace -p <PID>") and check if you get any output and/or errors when you touch a file?
$ ps -e | grep -i baloo
 1305 ?        00:00:28 baloo_file
21478 ?        00:00:00 baloorunner

I am not really sure, how this actually works but I tried:

$ sudo strace -p 1305
strace: Process 1305 attached
restart_syscall(<... resuming interrupted poll ...>

Then I created some files via Dolphin and after a while got this output:
) = 1
read(3, "\1\0\0\0\0\0\0\0", 16)         = 8
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLPRI}], 4, -1) = 1 ([{fd=3, revents=POLLIN}])
read(3, "\1\0\0\0\0\0\0\0", 16)         = 8
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLPRI}], 4, -1^Cstrace: Process 1305 detached
 <detached ...>

Greetings
Comment 17 Stefan Brüns 2019-03-22 02:56:11 UTC
There should be some reads from the inotify fd ...

What do you get for
$> cat /proc/<baloo_file_pid>/fd

Also try:
$> killall baloo_file
$> strace -einotify_add_watch baloo_file
Comment 18 dagobertram 2019-03-24 19:12:30 UTC
(In reply to Stefan Brüns from comment #17)
> There should be some reads from the inotify fd ...
> 
> What do you get for
> $> cat /proc/<baloo_file_pid>/fd

$ cat /proc/1268/fd
cat: /proc/1268/fd: Ist ein Verzeichnis (-> is a directory)

> Also try:
> $> killall baloo_file
> $> strace -einotify_add_watch baloo_file

There was so much output, that I can not post it here ...
But I will post some interesting lines (maybe):
not exists:  "/home/user/Dropbox/ANCA/Songs/JoAnn Transposed Songs/Joy to the World! (801)/181222.jpg"
not exists:  "/home/user/Dropbox/ANCA/Songs/JoAnn Transposed Songs/Joy to the World! (801)/Quittung.jpg"
not exists:  "/home/user/Dropbox/ANCA/Songs/JoAnn Transposed Songs/Joy to the World! (801)/181119.jpg"
not exists:  "/home/user/Dropbox/ANCA/Songs/JoAnn Transposed Songs/Joy to the World! (801)/181205.jpg"
mimetype should not be indexed:  "/home/user/Android/Sdk/tools/lib/monitor-x86/readme" "text/x-readme"
mimetype should not be indexed:  "/home/user/Android/Sdk/tools/lib/monitor-x86_64/readme" "text/x-readme"
Comment 19 dagobertram 2019-03-24 19:13:51 UTC
PS: Shouldn't we change KDE Frameworks back to version 5.56, because that's what I use? Don't know, why that was changed.
Comment 20 Bug Janitor Service 2019-04-08 04:33:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 21 Christoph Feck 2019-04-16 19:32:00 UTC
New information was added in comment #18; changing status for inspection.
Comment 22 Stefan Brüns 2019-04-16 23:14:55 UTC
> $> cat /proc/<baloo_file_pid>/fd

That should have been "ls /proc/<baloo_file-pid>/fd"

Separate the strace output from the baloo_file output by using:

$> strace -einotify_add_watch -o baloo_file_strace.txt baloo_file
Comment 23 dagobertram 2019-04-19 15:53:34 UTC
(In reply to Stefan Brüns from comment #22)
> > $> cat /proc/<baloo_file_pid>/fd
> 
> That should have been "ls /proc/<baloo_file-pid>/fd"
> 
> Separate the strace output from the baloo_file output by using:
> 
> $> strace -einotify_add_watch -o baloo_file_strace.txt baloo_file

I don't really know, what I am doing right now but I try to do it anyway:
~$ ps -e | grep -i baloo
 1302 ?        00:00:10 baloo_file
 1813 ?        00:00:00 baloorunner

~$ ls /proc/1302/fd
0  1  10  11  12  15  17  18  2  3  4  5  6  7  8  9

~$ killall baloo_file
~$ strace -einotify_add_watch -o baloo_file_strace.txt baloo_file
KCatalog being used without a Q*Application instance. Some translations won't work
Comment 24 Bug Janitor Service 2019-05-04 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 25 dagobertram 2019-05-09 15:43:09 UTC
(In reply to dagobertram from comment #23)
> (In reply to Stefan Brüns from comment #22)
> > > $> cat /proc/<baloo_file_pid>/fd
> > 
> > That should have been "ls /proc/<baloo_file-pid>/fd"
> > 
> > Separate the strace output from the baloo_file output by using:
> > 
> > $> strace -einotify_add_watch -o baloo_file_strace.txt baloo_file
> 
> I don't really know, what I am doing right now but I try to do it anyway:
> ~$ ps -e | grep -i baloo
>  1302 ?        00:00:10 baloo_file
>  1813 ?        00:00:00 baloorunner
> 
> ~$ ls /proc/1302/fd
> 0  1  10  11  12  15  17  18  2  3  4  5  6  7  8  9
> 
> ~$ killall baloo_file
> ~$ strace -einotify_add_watch -o baloo_file_strace.txt baloo_file
> KCatalog being used without a Q*Application instance. Some translations
> won't work

I did try to give more information. Can someone check this please?
Comment 26 Christoph Feck 2019-05-11 08:48:17 UTC
New information was provided with comment #23; changing status for inspection.
Comment 27 dagobertram 2021-07-03 08:26:57 UTC
I finally found a workaround for the problem as shown in Bug 430891 comment #4:

1. balooctl disable
2. balooctl purge
3. reboot
4. balooctl enable

Now the search with baloo enabled works like a charm. We should make Bug 431664 a priority though.

*** This bug has been marked as a duplicate of bug 431664 ***