Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as_pool_build_search_tokens sometimes crashes on strcmp() #442

Closed
luk1337 opened this issue Oct 28, 2022 · 3 comments
Closed

as_pool_build_search_tokens sometimes crashes on strcmp() #442

luk1337 opened this issue Oct 28, 2022 · 3 comments

Comments

@luk1337
Copy link

luk1337 commented Oct 28, 2022

Hello, I originally reported this issue to KDE, but I was told to report it here instead. I'm not quite sure what's in the pool that makes this issue happen, but if necessary, I can try add some logging messages for that.

Version: 0.15.5-1.fc37
GDB backtrace:

(gdb) bt
#0  __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:287
#1  0x00007f1b385d042d in as_pool_build_search_tokens (pool=<optimized out>, search=0x7f1aa97cedb8 "androidstudio")
    at ../src/as-pool.c:2154
#2  0x00007f1b385d0814 in as_pool_search (pool=0x560b08632060, search=0x7f1aa97cedb8 "androidstudio") at ../src/as-pool.c:2226
#3  0x00007f1b3988f584 in AppStream::Pool::search(QString const&) const (this=this@entry=0x560b086247f8, term=...)
    at ../qt/pool.cpp:172
#4  0x00007f1b69bf72b1 in InstallerRunner::findComponentsByString(QString const&) (query=..., this=0x560b086247e0)
    at /usr/src/debug/plasma-workspace-5.26.1-1.fc37.x86_64/runners/appstream/appstreamrunner.cpp:163
#5  InstallerRunner::match(Plasma::RunnerContext&) (this=0x560b086247e0, context=...)
    at /usr/src/debug/plasma-workspace-5.26.1-1.fc37.x86_64/runners/appstream/appstreamrunner.cpp:93
#6  0x00007f1ba015404f in Plasma::FindMatchesJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*)
    (this=0x560b08b7e990, self=...) at /usr/src/debug/kf5-krunner-5.99.0-1.fc37.x86_64/src/runnerjobs.cpp:140
#7  0x00007f1ba011ea4e in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*)
    (this=<optimized out>, job=<optimized out>, thread=<optimized out>)
    at /usr/src/debug/kf5-threadweaver-5.99.0-1.fc37.x86_64/src/executor.cpp:33
#8  0x00007f1ba011f885 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*)
    (this=<optimized out>, self=..., th=0x560b085e1970) at /usr/src/debug/kf5-threadweaver-5.99.0-1.fc37.x86_64/src/job.cpp:64
#9  0x00007f1ba0123458 in ThreadWeaver::Thread::run() (this=0x560b085e1970)
    at /usr/src/debug/kf5-threadweaver-5.99.0-1.fc37.x86_64/src/thread.cpp:98
#10 0x00007f1bbb8e8487 in QThreadPrivate::start(void*) (arg=0x560b085e1970) at thread/qthread_unix.cpp:330
#11 0x00007f1bba8af14d in start_thread (arg=<optimized out>) at pthread_create.c:442
#12 0x00007f1bba930950 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
@ximion
Copy link
Owner

ximion commented Dec 16, 2022

Do you have any way to reproduce this? The point where it crashes makes very little sense, as it's in the middle of a section that compares strings that should all be valid at that point. Might be some threading issue (could even be in KRunner...), but having a way to reproduce this would help a lot!

@luk1337
Copy link
Author

luk1337 commented Dec 18, 2022

The issue was supposedly fixed @ KDE, so maybe it was just race condition on their end. I'll close this issue for now, and maybe reopen again if I ever get the same backtrace.

@luk1337 luk1337 closed this as completed Dec 18, 2022
@ximion
Copy link
Owner

ximion commented Dec 19, 2022

Possibly the string the passed in was freed at a bad time by a different thread. Thanks for the follow-up and closing this issue :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants