https://bugs.kde.org/show_bug.cgi?id=528003
Bug ID: 528003
Summary: drkonqi user units declare After= on targets they are
implicitly ordered Before, creating systemd ordering
cycles that discard plasma-core.target's stop job
Classification: Applications
Product: drkonqi
Version First 6.8.1
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
drkonqi-coredump-cleanup.timer and drkonqi-sentry-postman.path declare After=
on targets they are implicitly ordered Before= by systemd's default
dependencies (DefaultDependencies=yes). This creates ordering cycles on every
user session teardown.
Depending on how systemd resolves the cycle on a given boot, it either drops
the plasma-core.target stop transaction entirely (causing plasmashell to hang
until stop-sigterm times out and SIGKILLs it), or breaks the loop by deleting
an arbitrary stop job from another user service (causing that service to be
SIGKILLed by the cgroup sweep without receiving SIGTERM).
AFFECTED UNITS
1. src/coredump/cleanup/drkonqi-coredump-cleanup.timer
[Unit]
PartOf=plasma-core.target
After=timers.target
Timer units implicitly get Before=timers.target, creating a direct loop
(systemctl --user show):
Before=drkonqi-coredump-cleanup.service timers.target shutdown.target
plasma-core.target
After=timers.target
2. src/sentry/postman/drkonqi-sentry-postman.path
[Unit]
PartOf=plasma-core.target
After=default.target
Path units implicitly get Before=paths.target. Because default.target is
ordered after paths.target via basic.target, this creates a loop through
basic.target:
Before=plasma-core.target paths.target shutdown.target
drkonqi-sentry-postman.service
After=-.mount default.target
For comparison, src/sentry/postman/drkonqi-sentry-postman.timer has
PartOf=plasma-core.target with no After= line and does not cycle.
OBSERVED RESULT
Logs from three consecutive reboots showing the different ways systemd handles
the cycles:
Case 1: Transaction dropped (plasma-core.target fails to stop, ~40s shutdown
hang)
drkonqi-coredump-cleanup.timer: Found ordering cycle: timers.target/stop
after drkonqi-coredump-cleanup.timer/stop - after timers.target
drkonqi-coredump-cleanup.timer: Unable to break cycle starting with
drkonqi-coredump-cleanup.timer/stop
Requested transaction contains an unfixable cyclic ordering dependency:
Transaction order is cyclic.
plasma-core.target: Failed to enqueue stop job, ignoring: Transaction order
is cyclic.
plasma-plasmashell.service: State 'stop-sigterm' timed out. Killing.
plasma-plasmashell.service: Killing process 6851 (plasmashell) with signal
SIGKILL.
Case 2: Broken by dropping timers.target/stop
drkonqi-coredump-cleanup.timer: Job timers.target/stop deleted to break
ordering cycle
Case 3: Broken at the expense of an unrelated user service (syncthing.service
never receives SIGTERM)
basic.target: Found ordering cycle: syncthing.service/stop after
default.target/stop after drkonqi-sentry-postman.path/stop after
paths.target/stop after basic.target/stop -
--
You are receiving this mail because:
You are watching all bug changes.