https://bugs.kde.org/show_bug.cgi?id=525304
Bug ID: 525304
Summary: kcm_fontinst crashes (exit 255) on D-Bus activation,
triggered by merely opening the Fonts KCM; replaces
symlinked fontconfig conf.d files with plain copies as
a side effect
Classification: Applications
Product: systemsettings
Version First 6.6.6
Reported In:
Platform: NixOS
OS: Linux
Status: REPORTED
Severity: crash
Priority: NOR
Component: kcm_fontinst
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Opening System Settings -> Appearance & Style -> Fonts (kcm_fonts) causes
systemsettings to D-Bus-activate the org.kde.fontinst service, which crashes
immediately with exit code 255. As a side effect that happens in the few
seconds before the crash, any file under ~/.config/fontconfig/conf.d/ that is
a symlink (rather than a plain file) gets replaced with a plain-file copy of
whatever the symlink pointed to at that moment.
No font installation, deletion, or setting change is needed to trigger this
-- just opening the page is enough.
STEPS TO REPRODUCE
1. Have at least one file under ~/.config/fontconfig/conf.d/ that is a
symlink to another location (e.g. as created by home-manager's
fonts.fontconfig module on NixOS, or any tool that manages per-user
fontconfig via symlinks).
2. Open System Settings -> Appearance & Style -> Fonts.
3. Watch `journalctl -f` and `stat` the symlinked file in parallel.
OBSERVED RESULT
journalctl (systemsettings PID 53661), timestamps trimmed to the relevant
window:
14:09:16.494740 systemsettings: Using fontconfig file:
".../conf.d/10-hm-fonts.conf"
(the "Using fontconfig file" line repeats 9x total, once per file in conf.d)
14:09:20.256450 systemsettings: Service org.kde.fontinst not registered,
starting
"/nix/store/2xr2cvhm84s8l85a1qp5b4p144gx32nd-plasma-workspace-6.6.6/libexec/fontinst"
14:09:20.259617 systemd: Started dbus-:[email protected].
14:09:20.285 (approx, from file mtime) <- the symlink at
conf.d/10-hm-fonts.conf
is replaced by a plain regular file, byte-identical to what
the symlink previously resolved to
14:09:20.299161 systemd: dbus-:[email protected]: Main process
exited, code=exited, status=255/EXCEPTION
14:09:20.299167 systemd: dbus-:[email protected]: Failed with
result 'exit-code'.
EXPECTED RESULT
kcm_fonts loads without crashing anything, and if fontinst needs to enumerate
conf.d files it does so read-only -- it should not resolve/replace symlinks
it doesn't own.
SOFTWARE/OS VERSIONS
Plasma: 6.6.6
Qt: 6.11.1
Operating System: NixOS (flake-pinned nixpkgs, commit
6713828a351efa628b025a1adf7f43cbf8597513)
Windowing System: Wayland
ADDITIONAL INFORMATION
On a distro where these fontconfig files are ordinary plain files to begin
with, this crash would likely be invisible -- the "replace with a plain
copy" side effect is a no-op there. It only has a visible consequence on
setups (like NixOS + home-manager) that manage the file as a symlink into a
content-addressed store path that changes on every rebuild: once the
symlink has been replaced by a stale copy, the file-management tool that
owns it refuses to overwrite it on the next run, since it looks like a
foreign file was placed in its way -- blocking that tool's activation
entirely until the stray file is removed by hand. That downstream breakage
is specific to our setup, but the fontinst crash + symlink-clobbering
itself looks like a plasma-workspace bug independent of any particular
distro.
Happy to enable coredumpctl / provide a backtrace if that's useful --
let me know what build flags or symbols you'd need.
--
You are receiving this mail because:
You are watching all bug changes.