Systemd/src/core
Luca Boccassi 7233e91af0 core: store timestamps of unit load attempts
When the system is under heavy load, it can happen that the unit cache
is refreshed for an unrelated reason (in the test I simulate this by
attempting to start a non-existing unit). The new unit is found and
accounted for in the cache, but it's ignored since we are loading
something else.
When we actually look for it, by attempting to start it, the cache is
up to date so no refresh happens, and starting fails although we have
it loaded in the cache.

When the unit state is set to UNIT_NOT_FOUND, mark the timestamp in
u->fragment_loadtime. Then when attempting to load again we can check
both if the cache itself needs a refresh, OR if it was refreshed AFTER
the last failed attempt that resulted in the state being
UNIT_NOT_FOUND.

Update the test so that this issue reproduces more often.
2020-06-30 16:50:00 +02:00
..
all-units.h core: add spdx header to all-units.h 2019-07-24 05:06:21 +09:00
apparmor-setup.c AppArmor: Support for loading a set of pre-compiled profiles at startup time 2020-06-09 20:27:47 +02:00
apparmor-setup.h AppArmor: Support for loading a set of pre-compiled profiles at startup time 2020-06-09 20:27:47 +02:00
audit-fd.c
audit-fd.h
automount.c tree-wide: use set_ensure_put() 2020-06-22 16:32:37 +02:00
automount.h
bpf-devices.c tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
bpf-devices.h tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
bpf-firewall.c core/bpf-firewall: use the correct cleanup function 2020-06-24 10:38:15 +02:00
bpf-firewall.h bpf-firewall: custom BPF programs through IP(Ingress|Egress)FilterPath= 2019-06-25 09:56:16 +02:00
cgroup.c tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
cgroup.h core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
core-varlink.c core: don't bind varlink socket if running in test mode 2020-05-12 22:10:49 +02:00
core-varlink.h core: add user/group resolution varlink interface to PID 1 2020-01-15 15:28:55 +01:00
dbus-automount.c
dbus-automount.h
dbus-cgroup.c Revert "cgroup: Allow empty assignments of Memory{Low,Min}=" 2020-06-23 16:54:23 +02:00
dbus-cgroup.h core: make TasksMax a partially dynamic property 2019-11-14 18:41:54 +01:00
dbus-device.c
dbus-device.h
dbus-execute.c core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
dbus-execute.h core: add ExecStartXYZEx= with dbus support for executable prefixes 2019-05-30 20:41:42 -07:00
dbus-job.c pid1: convert to the new scheme 2020-05-05 22:40:37 +02:00
dbus-job.h pid1: convert to the new scheme 2020-05-05 22:40:37 +02:00
dbus-kill.c core: add support for RestartKillSignal= to override signal used for restart jobs 2019-10-02 14:01:25 +02:00
dbus-kill.h
dbus-manager.c Merge pull request #15926 from fbuihuu/rework-show-status 2020-06-22 13:55:06 +02:00
dbus-manager.h core: implement generic log control API in PID1 too 2020-04-21 17:08:23 +02:00
dbus-mount.c mount: add ReadWriteOnly property to fail on read-only mounts 2020-05-01 13:23:30 +02:00
dbus-mount.h
dbus-path.c
dbus-path.h
dbus-scope.c tree-wide: use public sd-bus functions in more places 2020-05-25 11:09:21 +02:00
dbus-scope.h
dbus-service.c core: let user define start-/stop-timeout behaviour 2020-06-09 10:04:57 +02:00
dbus-service.h
dbus-slice.c
dbus-slice.h
dbus-socket.c core: add new PassPacketInfo= socket unit property 2020-05-27 22:40:38 +02:00
dbus-socket.h
dbus-swap.c core: expose swap priority value via dbus only if it is set 2020-01-09 17:08:10 +01:00
dbus-swap.h
dbus-target.c
dbus-target.h
dbus-timer.c core: TAKE_PTR in timer_add_one_calendar_spec 2019-08-22 11:02:56 +02:00
dbus-timer.h
dbus-unit.c core: store unit aliases in a separate set 2020-06-10 09:36:58 +02:00
dbus-unit.h pid1: convert to the new scheme 2020-05-05 22:40:37 +02:00
dbus-util.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dbus-util.h user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dbus.c pid1: add --bus-introspect 2020-05-05 22:40:44 +02:00
dbus.h pid1: add --bus-introspect 2020-05-05 22:40:44 +02:00
device.c Merge pull request #15265 from fbuihuu/mount-fixes 2020-05-15 11:13:45 +02:00
device.h
dynamic-user.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dynamic-user.h tree-wide: reorder various structures to make them smaller and use fewer cache lines 2019-03-27 18:11:11 +01:00
efi-random.c random-util: add common helper random_write_entropy() for crediting entropy to the kernel's pool 2020-06-24 15:33:27 +02:00
efi-random.h core: take random seed from boot loader and credit it to kernel entropy pool 2019-07-25 18:16:46 +02:00
emergency-action.c feature to honor first shutdown request to completion 2020-06-24 09:42:01 +02:00
emergency-action.h core: change emergency_action() to return void 2019-03-18 16:06:36 +01:00
execute.c core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
execute.h core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
generator-setup.c Split out generator directory setup to a src/core/generator-setup.c 2020-03-27 20:12:44 +01:00
generator-setup.h Split out generator directory setup to a src/core/generator-setup.c 2020-03-27 20:12:44 +01:00
hostname-setup.c core: allow overriding the system hostname with systemd.hostname= on the kernel command line 2020-05-18 20:20:50 +02:00
hostname-setup.h
ima-setup.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
ima-setup.h
ip-address-access.c bpf-firewall: optimization for IPAddressXYZ="any" (and unprivileged users) 2019-06-22 19:56:06 +02:00
ip-address-access.h bpf-firewall: optimization for IPAddressXYZ="any" (and unprivileged users) 2019-06-22 19:56:06 +02:00
job.c Revert "job: Don't mark as redundant if deps are relevant" 2020-06-23 11:42:45 +02:00
job.h Revert "job: Don't mark as redundant if deps are relevant" 2020-06-23 11:42:45 +02:00
kill.c core: add support for RestartKillSignal= to override signal used for restart jobs 2019-10-02 14:01:25 +02:00
kill.h core: add support for RestartKillSignal= to override signal used for restart jobs 2019-10-02 14:01:25 +02:00
killall.c killall: update reference to root storage daemon interface docs 2020-01-13 18:53:46 +01:00
killall.h core/killall: Propagate errors and return the number of process left 2019-04-08 19:41:16 +02:00
kmod-setup.c tree-wide: drop libkmod.h when module-util.h is included 2019-11-04 00:30:32 +09:00
kmod-setup.h
load-dropin.c Merge pull request #15940 from keszybz/names-set-optimization 2020-06-10 18:52:08 +02:00
load-dropin.h core: store unit aliases in a separate set 2020-06-10 09:36:58 +02:00
load-fragment-gperf-nulstr.awk
load-fragment-gperf.gperf.m4 core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
load-fragment.c pid1: warn if people use User=nobody (#16293) 2020-06-26 22:36:39 +02:00
load-fragment.h core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
locale-setup.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
locale-setup.h
loopback-setup.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
loopback-setup.h
machine-id-setup.c Generate stable machine-id and DHCP client ID on POWER KVM. 2019-08-31 10:57:16 +02:00
machine-id-setup.h
macros.systemd.in rpm: avoid hiding errors from systemd commands 2019-03-22 20:54:59 +01:00
main.c core: add new systemd.random_seed= kernel command line option for seeding entropy pool 2020-06-24 15:33:44 +02:00
manager.c core: store timestamps of unit load attempts 2020-06-30 16:50:00 +02:00
manager.h pid1: rename manager_set_{show_status,watchdog}_overridden() into manager_override_(show_status,watchdog} 2020-06-11 12:00:32 +02:00
meson.build AppArmor: Support for loading a set of pre-compiled profiles at startup time 2020-06-09 20:27:47 +02:00
mount-setup.c inaccessible: move inaccessible file nodes to /systemd/ subdir in runtime dir always 2020-06-09 16:23:56 +02:00
mount-setup.h mount-setup: change the system mount propagation to shared by default only at bootup 2020-04-09 10:14:20 +02:00
mount.c Merge pull request #15911 from poettering/unit-name-tighten 2020-05-29 15:55:38 +09:00
mount.h mount: add ReadWriteOnly property to fail on read-only mounts 2020-05-01 13:23:30 +02:00
namespace.c core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
namespace.h core: add RootHashSignature service parameter 2020-06-25 08:45:21 +01:00
org.freedesktop.systemd1.conf pid1: add a new SetShowStatus() bus call to override/restore show status mode 2020-06-11 12:00:32 +02:00
org.freedesktop.systemd1.policy.in
org.freedesktop.systemd1.service Revert "Drop dbus activation stub service" 2019-12-20 17:28:12 +01:00
path.c Merge pull request #15697 from OhNoMoreGit/fix-path-units 2020-06-25 18:23:47 +02:00
path.h core/path: recheck path specs when triggered unit changes state 2020-05-05 13:56:02 +10:00
scope.c pid1: convert to the new scheme 2020-05-05 22:40:37 +02:00
scope.h scope: Support RuntimeMaxSec= directive in scope units 2019-10-28 09:44:31 +01:00
selinux-access.c tree-wide: use DISABLE_WARNING_FORMAT_NONLITERAL where appropriate 2020-05-25 18:25:05 +02:00
selinux-access.h selinux: do preprocessor check only in selinux-access.c 2020-04-29 13:56:40 +02:00
selinux-setup.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
selinux-setup.h
service.c core: don't consider SERVICE_SKIP_CONDITION for abnormal or failure restarts 2020-06-10 17:12:55 +02:00
service.h core: let user define start-/stop-timeout behaviour 2020-06-09 10:04:57 +02:00
show-status.c pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed 2020-03-01 11:48:23 +01:00
show-status.h pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed 2020-03-01 11:48:23 +01:00
slice.c core: fix the return value in order to make sure we don't dipatch method return too early 2020-06-05 16:10:40 +02:00
slice.h
smack-setup.c tree-wide: drop dirent.h when dirent-util.h is included 2019-11-04 00:30:32 +09:00
smack-setup.h
socket.c Merge pull request #15940 from keszybz/names-set-optimization 2020-06-10 18:52:08 +02:00
socket.h Merge pull request #15940 from keszybz/names-set-optimization 2020-06-10 18:52:08 +02:00
swap.c core: also log about left-over processes during unit stop 2020-05-26 23:52:13 +02:00
swap.h core: swap priority can be negative 2019-12-04 08:57:08 +01:00
system.conf.in log: add support for prefixing console log messages with current timestamp 2020-02-10 07:01:30 -05:00
systemd.pc.in path: use ROOTPREFIX properly 2020-05-28 23:52:34 +02:00
target.c pid1: convert to the new scheme 2020-05-05 22:40:37 +02:00
target.h
timer.c pid1: convert to the new scheme 2020-05-05 22:40:37 +02:00
timer.h core: optionally, trigger .timer units on timezone and clock changes 2019-04-02 08:20:10 +02:00
transaction.c Revert "job: Don't mark as redundant if deps are relevant" 2020-06-23 11:42:45 +02:00
transaction.h core: Add triggering job mode 2019-11-05 11:17:38 -08:00
triggers.systemd.in
unit-printf.c Add %l as specifier for the hostname without any domain component 2020-05-07 17:36:44 +02:00
unit-printf.h core: mark unit_*_printf() functions as taking a const Unit* 2019-10-16 16:21:56 +02:00
unit.c core: store timestamps of unit load attempts 2020-06-30 16:50:00 +02:00
unit.h core: store timestamps of unit load attempts 2020-06-30 16:50:00 +02:00
user.conf.in log: add support for prefixing console log messages with current timestamp 2020-02-10 07:01:30 -05:00