SUMMARY Baloo_file fails with an ASSERT when creating/renaming a folder STEPS TO REPRODUCE 1. Create a test folder $ cd $ mkdir folder $ echo "Hello Penguin" > folder/test.txt 2. See that it is indexed 3. Rename the folder $ mv folder folder2 OBSERVED RESULT Dec 21 18:48:45 barking baloo_file[3362]: kf.baloo: "/home/test/folder/" -> "/home/test/folder2/" Dec 21 18:48:45 barking baloo_file[3362]: KCrash: appFilePath points to nullptr! Dec 21 18:48:45 barking baloo_file[3362]: KCrash: Application '<unknown>' crashing... crashRecursionCounter = 2 Dec 21 18:48:45 barking baloo_file[3362]: ASSERT: "from[from.size()-1] != QLatin1Char('/')" in file ./src/file metadatamover.cpp, line 80 Dec 21 18:48:45 barking systemd-coredump[3371]: Process 3362 (baloo_file) of user 1001 dumped core. SOFTWARE/OS VERSION Neon Unstable Plasma : 5.90.90 Frameworks: 5.247.0 Qt: 6.6.1 Kernel: 6.2.0-39-generic (64-bit) Filesystem: Ext4 or BTRFS ADDITIONAL INFORMATION Possible to reproduce on a new install of Neon Unstable, works of Neon Testing. Also crashes when creating a folder: baloo_file[1237]: ASSERT: "!filePath.endsWith(QLatin1Char('/'))" in file ./src/file/newfileindexer.cpp, line 38 but not when creating or renaming files.
A couple more points... It is not related to content indexing, the crash happens immediately when the folder is created or renamed. If baloo is not running and the folder is created, then baloo indexes it without problems when it is started.
(In reply to tagwerk19 from comment #0) > ... Possible to reproduce on a new install of Neon Unstable ... It's there with: neon-unstable-20231224-1120.iso As vanilla as I can make it: Installed as KVM guest, on AMD Ryzen 5 host, ext4 filesystem, en-US locale. Plasma: 5.91.90 Frameworks: 5.248.0 Qt: 6.6.1 Kernel: 6.2.0-39-generic (64-bit) Graphics: Wayland Sequence: $ xdg-user-dirs-update (for tidiness) $ systemctl --user restart kde-baloo $ mkdir folder $ systemctl --user status kde-baloo shows the ASSERT in baloo_file: "!filePath.endsWith(QLatin1Char('/'))" in file ./src/file/newfileindexer.cpp, line 38 Renaming the folder $ systemctl --user restart kde-baloo $ mv folder folder2 $ systemctl --user status kde-baloo shows the ASSERT: "from[from.size()-1] != QLatin1Char('/')" in file ./src/file metadatamover.cpp, line 80
(In reply to tagwerk19 from comment #2) > ... KVM guest, on AMD Ryzen 5 host ... Not just. Also there on an old Intel Core I3 host... Plus cross reference: https://invent.kde.org/frameworks/baloo/-/merge_requests/119#note_732995
Repeating with neon-unstable-20240107-1119.iso The issue is still present Some history: There's Bug 435161 Where I wasn't able to replicate https://bugs.kde.org/show_bug.cgi?id=435161#c11 and https://invent.kde.org/frameworks/baloo/-/merge_requests/71 A similar, as vanilla as possible, neon-testing neon-testing-20240102-0250.iso setup works for me, tried: mkdir folder mv folder folder2 setfattr -n user.xdg.tags -v Penguin folder2 There are some debug messages but no asserts.
Checked with neon-unstable-20240122-1334.iso, with the same conditions and the issue is still there. Is it possible that the assert is inverted? If the two folders given in the debug both have trailing slashes, an assert that fails if one doesn't seems strange. There are normalizeTrailingSlashes functions there in the code and they ensure that the name has a trailing slash. Dec 21 18:48:45 barking baloo_file[3362]: kf.baloo: "/home/test/folder/" -> "/home/test/folder2/" ... Dec 21 18:48:45 barking baloo_file[3362]: ASSERT: "from[from.size()-1] != QLatin1Char('/')" in file ./src/file metadatamover.cpp, line 80
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/184
(In reply to Bug Janitor Service from comment #6) > A possibly relevant merge request was started @ > https://invent.kde.org/frameworks/baloo/-/merge_requests/184 Should this have reached "Neon Unstable"? Just tested with neon-unstable-20240211-1119.iso and I still get ASSERT failures (testing as per Comment 2)
(In reply to tagwerk19 from comment #7) > Just tested with neon-unstable-20240211-1119.iso and I still get ASSERT > failures (testing as per Comment 2) Tried with neon-user-20240321-0715.iso, looks as if the bug (comment 2) is still with us...
(In reply to tagwerk19 from comment #8) > Tried with neon-user-20240321-0715.iso, looks as if the bug (comment 2) is still with us... I'm not sure what's happened here, I've tried: neon-user-20240321-0715.iso neon-testing-20240314-1503.iso neon-unstable-20240317-1117.iso and they all fail with the Assert. That did not used to happen. My assumption was that Q_ASSERTS cause crashes when the code is compiled in debug mode, otherwise they were silent. Maybe someone could correct me here :-). Could it be that Neon User is being compiled in "debug"? If that is the case, this is a regression.
Git commit 33756dd44c4f67a7984fa4c5da61726b46aa6bc6 by Christoph Cullmann, on behalf of Méven Car. Committed on 29/03/2024 at 17:52. Pushed by cullmann into branch 'master'. Some indexers need non-slash trailed path Fix regression introduced in 73183acf, prior to this commit all path from KInotify did not have a trailing slash, adjust in consequence. 9b61371fdefbd538938f20cdc87eed03d170fa5b adjusted BasicIndexingJob but not the other cases. Add some missing unit test cases, although they don't cover the bug cases, they allow to illustrate the crash conditions. Superseeds https://invent.kde.org/frameworks/baloo/-/merge_requests/119 cc @tagwerk19.invent @cullmann M +123 -0 autotests/unit/file/filewatchtest.cpp M +7 -2 src/file/metadatamover.cpp M +5 -2 src/file/modifiedfileindexer.cpp M +5 -2 src/file/newfileindexer.cpp M +5 -2 src/file/xattrindexer.cpp https://invent.kde.org/frameworks/baloo/-/commit/33756dd44c4f67a7984fa4c5da61726b46aa6bc6
*** Bug 486671 has been marked as a duplicate of this bug. ***
Repeating the tests, Neon User: Plasma: 6.0.5 Frameworks: 6.2.0 Qt: 6.7.0 Kernel: 6.5.0.35-generic Graphics: Wayland We are a step closer but not all the way... (In reply to tagwerk19 from comment #2) > Sequence: > $ xdg-user-dirs-update (for tidiness) > $ systemctl --user restart kde-baloo > $ mkdir folder > $ systemctl --user status kde-baloo > shows the ASSERT in baloo_file: > "!filePath.endsWith(QLatin1Char('/'))" in file ./src/file/newfileindexer.cpp, line 38 This now works, whereas: > Renaming the folder > $ systemctl --user restart kde-baloo > $ mv folder folder2 > $ systemctl --user status kde-baloo > shows the ASSERT: > "from[from.size()-1] != QLatin1Char('/')" in file ./src/file metadatamover.cpp, line 80 Still fails ... ... and I'm still not sure that I ought to get ASSERTS in Neon User.
*** Bug 484226 has been marked as a duplicate of this bug. ***
*** Bug 479899 has been marked as a duplicate of this bug. ***
(In reply to tagwerk19 from comment #12) > Still fails ... > ... and I'm still not sure that I ought to get ASSERTS in Neon User. In 481303 (https://bugs.kde.org/show_bug.cgi?id=481303#c7) ... The reason only neon is affected is probably because it builds with assertions on ... That doesn't say specifically Neon User, but it looks you might get more crashes in Neon