This crash is seemingly random, I can usually reproduce it by pressing Super+Space, and launching an app - then restarting the Assistant, and typing some random characters - it seems to be completely random.
106.877 Assistant(64:64): Started Thread "Background Thread"(65)
107.647 Assistant(64:65): Built cache in 763 ms
107.655 Assistant(64:64): ASSERTION FAILED: false
././AK/Function.h:208
107.655 [#0 Assistant(64:64)]: Terminating Assistant(64) due to signal 6
107.655 [#0 Finalizer Task(5:5)]: Backtrace:
0x00000000deadc0de Kernel::Processor::switch_context(Kernel::Thread*&, Kernel::Thread*&) + 0x383
107.655 [#0 Finalizer Task(5:5)]: Backtrace:
0x00000000deadc0de Kernel::Processor::switch_context(Kernel::Thread*&, Kernel::Thread*&) + 0x383
107.655 [#0 Finalizer Task(5:5)]: Generating coredump for pid: 64
107.663 CrashDaemon(34:34): New coredump file: /tmp/coredump/Assistant_64_1679253479
107.862 CrashReporter(66:66): Started Thread "Background Thread"(67)
108.810 CrashReporter(66:67): Generating backtrace took 949 ms
108.810 CrashReporter(66:67): --- Backtrace for thread #0 (TID 64) ---
108.810 CrashReporter(66:67): 0x000000105223202b: [/usr/lib/libsystem.so] syscall2 +0xb (syscall.cpp:25 => syscall.cpp:24)
108.810 CrashReporter(66:67): 0x0000000c7689448d: [/usr/lib/libc.so] abort +0x26 (stdlib.cpp:386)
108.810 CrashReporter(66:67): 0x0000000c7689a855: [/usr/lib/libc.so] __assertion_failed +0x85 (assert.cpp:34)
108.814 CrashReporter(66:67): 0x0000001b83f9142f: [/bin/Assistant] AK::Function<void ()>::CallableWrapper<Threading::BackgroundAction<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > >::BackgroundAction(AK::Function<AK::ErrorOr<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> >, AK::Error> (Threading::BackgroundAction<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > >&)>, AK::Function<AK::ErrorOr<void, AK::Error> (AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> >)>, AK::Optional<AK::Function<void (AK::Error)> >)::{lambda()#2}::operator()() const::{lambda()#2}>::call() +0x3f (Function.h:208 => Function.h:104)
108.814 CrashReporter(66:67): 0x0000000dcbcfe678: [/usr/lib/libcore.so.serenity] Core::EventLoop::pump(Core::EventLoop::WaitMode) [clone .localalias] +0x488 (Function.h:111)
108.814 CrashReporter(66:67): 0x0000000dcbcfebb9: [/usr/lib/libcore.so.serenity] Core::EventLoop::exec() +0x99 (EventLoop.cpp:451)
108.818 CrashReporter(66:67): 0x0000001b83f94bb9: [/bin/Assistant] serenity_main(Main::Arguments) +0xc09 (main.cpp:285)
108.818 CrashReporter(66:67): 0x0000001b83f84b5a: [/bin/Assistant] main +0x14a (Main.cpp:43)
108.818 CrashReporter(66:67): 0x0000001b83f84ce8: [/bin/Assistant] _entry +0x48 (crt0.cpp:48)
109.064 CrashReporter(66:67): Generating backtrace took 227 ms
109.064 CrashReporter(66:67): --- Backtrace for thread #1 (TID 65) ---
109.064 CrashReporter(66:67): 0x0000001052232043: [/usr/lib/libsystem.so] syscall3 +0x13 (syscall.cpp:30 => syscall.cpp:29)
109.064 CrashReporter(66:67): 0x0000000c768cbbab: [/usr/lib/libc.so] madvise +0x1b (syscall.h:40 => mman.cpp:77)
109.068 CrashReporter(66:67): 0x0000000c7689f53d: [/usr/lib/libc.so] malloc_impl +0x57d (malloc.cpp:337)
109.068 CrashReporter(66:67): 0x0000000c7689f9ac: [/usr/lib/libc.so] malloc +0x3c (malloc.cpp:543)
109.068 CrashReporter(66:67): 0x0000001b83f8fe00: [/bin/Assistant] AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul>::try_ensure_capacity(unsigned long) +0x40 (kmalloc.h:47 => Vector.h:649)
109.068 CrashReporter(66:67): 0x0000001b83f88e48: [/bin/Assistant] AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > Assistant::FileProvider::query(AK::DeprecatedString const&, AK::Function<void (AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul>)>)::{lambda(auto:1&)#1}::operator()<Threading::BackgroundAction<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > > >(Threading::BackgroundAction<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > >&) const +0x1d8 (Vector.h:641 => Vector.h:560 => Vector.h:262 => Providers.cpp:147)
109.072 CrashReporter(66:67): 0x0000001b83f900b8: [/bin/Assistant] Threading::BackgroundAction<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > >::BackgroundAction(AK::Function<AK::ErrorOr<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> >, AK::Error> (Threading::BackgroundAction<AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> > >&)>, AK::Function<AK::ErrorOr<void, AK::Error> (AK::Optional<AK::Vector<AK::NonnullRefPtr<Assistant::Result>, 0ul> >)>, AK::Optional<AK::Function<void (AK::Error)> >)::{lambda()#2}::operator()() const +0x98 (Function.h:173 => Function.h:111)
109.072 CrashReporter(66:67): 0x0000001cd302caaa: [/usr/lib/libthreading.so.serenity] background_thread_func() +0x58a (Function.h:111)
109.072 CrashReporter(66:67): 0x0000001cd302d77c: [/usr/lib/libthreading.so.serenity] Threading::Thread::start()::{lambda(void*)#1}::_FUN(void*) +0x6c (Function.h:111)
109.076 CrashReporter(66:67): 0x0000000c768a9fbb: [/usr/lib/libc.so] pthread_create_helper +0x2b (pthread.cpp:73)
Crash is related to:
It smells like a race condition to me, but I'm unfamiliar with how Assistant works.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too