Bug 484226 - baloo_file crashes with assert "!filePath.endsWith(QLatin1Char('/'))" in xattrindexer
Summary: baloo_file crashes with assert "!filePath.endsWith(QLatin1Char('/'))" in xatt...
Status: ASSIGNED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.0.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
: 475115 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-22 09:16 UTC by Nicolas
Modified: 2024-04-07 19:20 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas 2024-03-22 09:16:57 UTC
SUMMARY
When logging in I saw the following error in baloo_file
> Mär 22 09:33:28 nic-desktop baloo_file[5561]: ASSERT: "!filePath.endsWith(QLatin1Char('/'))" in file ./src/file/xattrindexer.cpp, line 37
> Mär 22 09:33:28 nic-desktop baloo_file[5561]: KCrash: appFilePath points to nullptr!
> Mär 22 09:33:28 nic-desktop baloo_file[5561]: KCrash: Application '<unknown>' crashing... crashRecursionCounter = 2


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550 VISION D
System Version: -CF

ADDITIONAL INFORMATION
Backtrace:

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=138000596756032) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=138000596756032) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=138000596756032, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007d82c95b9476 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#4  0x00007d82ca3233ce in KCrash::defaultCrashHandler(int) () from /lib/x86_64-linux-gnu/libKF6Crash.so.6
#5  <signal handler called>
#6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=138000596756032) at ./nptl/pthread_kill.c:44
#7  __pthread_kill_internal (signo=6, threadid=138000596756032) at ./nptl/pthread_kill.c:78
#8  __GI___pthread_kill (threadid=138000596756032, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#9  0x00007d82c95b9476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#10 0x00007d82c959f7f3 in __GI_abort () at ./stdlib/abort.c:79
#11 0x00007d82c9f8e597 in qAbort () at ./src/corelib/global/qglobal.cpp:161
#12 0x00007d82c9f897f5 in qt_message_fatal<QString&> (message=..., context=...) at ./src/corelib/global/qlogging.cpp:2003
#13 qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, 
    context=..., msg=<optimized out>, ap=ap@entry=0x7d82c48c5740) at ./src/corelib/global/qlogging.cpp:378
#14 0x00007d82c9f8efc3 in QMessageLogger::fatal (this=<optimized out>, msg=<optimized out>) at ./src/corelib/global/qlogging.cpp:901
#15 0x00007d82c9f53327 in qt_assert (assertion=assertion@entry=0x62e9c397c610 "!filePath.endsWith(QLatin1Char('/'))", 
    file=file@entry=0x62e9c397cd4c "./src/file/xattrindexer.cpp", line=line@entry=37) at ./src/corelib/global/qassert.cpp:68
#16 0x000062e9c394b5ff in Baloo::XAttrIndexer::run (this=0x62e9c45d3380) at ./src/file/xattrindexer.cpp:37
#17 0x00007d82c9e1023d in QThreadPoolThread::run (this=0x62e9c423d970) at ./src/corelib/thread/qthreadpool.cpp:66
#18 0x00007d82c9e0fe7d in operator() (__closure=<optimized out>) at ./src/corelib/thread/qthread_unix.cpp:324
#19 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at ./src/corelib/thread/qthread_unix.cpp:260
#20 QThreadPrivate::start (arg=0x62e9c423d970) at ./src/corelib/thread/qthread_unix.cpp:283
#21 0x00007d82c960bac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#22 0x00007d82c969d850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:8
Comment 1 Nicolas 2024-03-22 09:19:59 UTC
Running `info locals` in xattrindexer shows:

```
(gdb) info locals 
fileName = {d = {d = 0x500000000, ptr = 0x42 <error: Cannot access memory at address 0x42>, size = 0}}
mimetype = {d = {d = 0x7d42b800de40, ptr = 0x7d42b8000090 u"饀릡終", size = 1}}
job = {m_filePath = {d = {d = 0x0, ptr = 0x0, size = 8}}, m_mimetype = {d = {d = 0x30, ptr = 0x7d82c48c59c0 u"", size = 138000686490088}}, 
  m_indexingLevel = (unknown: 0xc48c5a20), m_doc = {m_id = 14051766588270777600, m_parentId = 138000685094104, m_terms = {d = {d = 0xfffffffffffffeb0}}, 
    m_xattrTerms = {d = {d = 0x0}}, m_fileNameTerms = {d = {d = 0xf}}, m_url = {d = {d = 0x7d82c48c5a60, 
    ptr = 0x7d82c9eef1d4 <doActivate<false>(QObject*, int, void**)+228> "\204\300\017\204U\377\377\377I\213F`H\211E\210H\205\300\017\204+\002", size = 140729494273040}}, 
    m_contentIndexing = 83, m_mTime = 32130, m_cTime = 8, m_data = {d = {d = 0x7d42b80f9170, 
        ptr = 0x3c9d054d8 <error: Cannot access memory at address 0x3c9d054d8>, size = 138000596753088}}}}
doc = {m_id = 0, m_parentId = 0, m_terms = {d = {d = 0x0}}, m_xattrTerms = {d = {d = 0x770000007c}}, m_fileNameTerms = {d = {d = 0x5b0000006e}}, 
  m_url = {d = {d = 0x0, ptr = 0x5b80458d0 <error: Cannot access memory at address 0x5b80458d0>, size = -280}}, m_contentIndexing = 66, m_mTime = 0, 
  m_cTime = 3087007792, m_data = {d = {d = 0x7d82c48c5a88, ptr = 0x7d82c48c5a88 "", size = 140729494273040}}}
filePath = @0x62e9c4392710: {d = {d = 0x7d82c001d570, ptr = 0x7d82c001d580 u"/home/nic/.vysor/", size = 17}}
__for_range = @0x62e9c45d33b0: {<QListSpecialMethods<QString>> = {<QListSpecialMethodsBase<QString>> = {<No data fields>}, <No data fields>}, d = {
    d = 0x62e9c4392700, ptr = 0x62e9c4392710, size = 1}}
__for_begin = <optimized out>
__for_end = <optimized out>
mimeDb = {d = 0x7d82ca057aa0 <_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_125Q_QGS_staticQMimeDatabaseEEEE8instanceEvE6holder.lto_priv.0>}
level = Baloo::BasicIndexingJob::MarkForContentIndexing
tr = {m_dbis = @0x7d82ca1555e8, m_txn = 0x62e9c41c4df0, m_env = 0x62e9c41d1690, m_writeTrans = std::unique_ptr<Baloo::WriteTransaction> = {
    get() = 0x7d42b871d1e0}}
```

the file path `/home/nic/.vysor/` is suspicious, the program is (often) running in the background. Maybe some kind of data race?
Comment 2 tagwerk19 2024-03-22 22:17:40 UTC
There is also Bug 484226, although this seems to specifically affects debug versions (Neon Unstable)
Comment 3 tagwerk19 2024-03-23 15:12:50 UTC
(In reply to tagwerk19 from comment #2)
> There is also Bug 484226, although this seems to specifically affects debug
> versions (Neon Unstable)
Hmmm, the "Asserts" seem to be affecting a clean Neon User install...
Comment 4 tagwerk19 2024-03-23 15:15:36 UTC
(In reply to tagwerk19 from comment #3)
> ... Bug 484226 ...
Should have been Bug 478854, this is Bug 484226
Comment 5 Natalie Clarius 2024-03-29 04:16:51 UTC
*** Bug 475115 has been marked as a duplicate of this bug. ***
Comment 6 Natalie Clarius 2024-03-29 04:18:09 UTC
I'm getting the same one very startup, the offinding file being ~/Dropbox/.dropbox.cache/.
Comment 7 Bug Janitor Service 2024-03-29 06:38:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/195
Comment 8 tagwerk19 2024-03-29 11:32:28 UTC
There's a somewhat longer thread here Bug 478854 which references a parallel MR
    https://invent.kde.org/frameworks/baloo/-/merge_requests/184

I'm now offline for a couple of weeks, wishing you Good Luck!