https://bugs.kde.org/show_bug.cgi?id=526922
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marcelo.araujo.almeida@gmai | |l.com --- Comment #6 from [email protected] --- *Note: This technical diagnosis and root cause analysis were compiled with the assistance of an LLM based on system logs and debugging data collected directly from my system.* I can confirm the exact same crash on Arch Linux (Kernel 7.2.10-arch1-1, KDE Plasma 6 on Wayland, KF6), matching Comment #5. We investigated the journal logs prior to the coredump and identified the exact root cause: this is a race condition in `systemd --user` during session startup when using SDDM on Wayland. ### What the journal shows before the abort: ```text baloo_file_extractor: Failed to create wl_display (No such file or directory) baloo_file_extractor: Could not load the Qt platform plugin "wayland" in "" even though it was found. baloo_file_extractor: could not connect to display baloo_file_extractor: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. baloo_file_extractor: Could not load the Qt platform plugin "xcb" in "" even though it was found. baloo_file_extractor: This application failed to start because no Qt platform plugin could be initialized. systemd-coredump: Process baloo_file_extr dumped core. ### Root Cause Analysis: 1. kde-baloo.service only specifies PartOf=graphical-session.target without any After= ordering directive (such as After=plasma-workspace.target or After=graphical- session.target). 2. Consequently, systemd --user launches baloo_file and kwin_wayland concurrently at the exact same second during login. 3. Because SDDM (running on Wayland) already allocated wayland-0 for the greeter, kwin_wayland_wrapper assigns the user session compositor to --socket wayland-1. 4. However, baloo_file was spawned milliseconds before KWin finished exporting WAYLAND_DISPLAY=wayland-1 and DISPLAY=:0 to the systemd user environment. Checking /proc/<baloo_file_pid>/environ confirmed that WAYLAND_DISPLAY was completely missing. 5. When baloo_file launches baloo_file_extractor, the child process inherits this environment without WAYLAND_DISPLAY. Since certain extraction plugins pull in QGuiApplication, Qt attempts to connect to the default /run/user/<UID>/wayland-0 socket (which no longer exists for this session), fails, attempts the X11 fallback (which also fails without DISPLAY), and triggers QMessageLogger::fatal, resulting in the SIGABRT crash loop. ### Immediate Workaround: Force Baloo to run headless/offscreen so it does not attempt to connect to any display server. Run: systemctl --user edit kde-baloo.service Add: [Service] Environment="QT_QPA_PLATFORM=offscreen" Then restart: systemctl --user daemon-reload && systemctl --user restart kde-baloo.service This completely stopped all crashes and coredumps on my system, and Baloo indexed all files cleanly. ### Suggested Upstream Fixes: 1. Programmatic Offscreen QPA: In baloo_file_extractor, set qputenv("QT_QPA_PLATFORM", "offscreen"); before instantiating QGuiApplication. As a background indexing daemon, it should never rely on an active display server. 2. Systemd Service Environment: Add Environment="QT_QPA_PLATFORM=offscreen" upstream to /usr/lib/systemd/user/kde-baloo.service. 3. Ordering Dependency: Add After=plasma-workspace.target or After=graphical-session.target in kde-baloo.service to avoid starting concurrently before the display environment is exported. -- You are receiving this mail because: You are watching all bug changes.
