Systemd/src/core
Michal Schmidt 1abc85b8d0 job: avoid recursion into transaction code from job cancelation
I hit an "assert(j->installed)" failure in transaction_apply(). Looking
into the backtrace I saw what happened:
1. The system was booting. var.mount/start was an installed job.
2. I pressed Ctrl+Alt+Del.
3. reboot.target was going to be isolated.
4. transaction_apply() proceeded to install a var.mount/stop job.
5. job_install() canceled the conflicting start job.
6. Depending jobs ended recursively with JOB_DEPENDENCY, among them was
   local-fs.target/start.
7. Its OnFailure action triggered - emergency.target was now going to be
   isolated.
8. We recursed back into transaction_apply() where the half-installed
   var.mount/stop job confused us.

Recursing from job installation back into the transaction code cannot be
a good idea. Avoid the problem by canceling the conflicting job
non-recursively in job_install(). I don't think we'll miss anything by
not recursing here. After all, we are called from transaction_apply().
We will not be installing just this one job, but all jobs from a
transaction. All requirement dependencies will be included in it and
will be installed separately. Every transaction job will get a chance
to cancel its own conflicting installed job.
2012-10-25 03:21:32 +02:00
..
.gitignore execute: support syscall filtering using seccomp filters 2012-07-17 04:17:53 +02:00
audit-fd.c selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
audit-fd.h audit: turn the audit fd into a static variable 2012-10-02 17:40:09 -04:00
automount.c mount: reword directory empty warning a bit 2012-09-19 09:58:34 +02:00
automount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
build.h journal: make libgcrypt dependency optional 2012-08-20 16:51:46 +02:00
bus-errors.h selinux: use standard D-Bus error id for access denied 2012-09-24 23:56:35 +02:00
cgroup-attr.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
cgroup-attr.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
cgroup.c core: move ManagerRunningAs to shared 2012-09-18 19:53:34 +02:00
cgroup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
condition.c condition: add ConditionFileNotEmpty= 2012-09-11 01:29:46 +02:00
condition.h condition: add ConditionFileNotEmpty= 2012-09-11 01:29:46 +02:00
dbus-automount.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-automount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-device.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-device.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-execute.c unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
dbus-execute.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
dbus-job.c selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
dbus-job.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-kill.c unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
dbus-kill.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
dbus-manager.c dbus-manager: check return of unit_dbus_path 2012-10-08 14:35:46 +02:00
dbus-manager.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-mount.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-mount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-path.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-path.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-service.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-service.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-snapshot.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-snapshot.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-socket.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-socket.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-swap.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-swap.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-target.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-target.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-timer.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-timer.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-unit.c selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
dbus-unit.h selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus.c core: move ManagerRunningAs to shared 2012-09-18 19:53:34 +02:00
dbus.h manager: extend performance measurement interface to include firmware/loader times 2012-09-13 18:54:32 +02:00
device.c Properly handle device aliases used as dependencies 2012-10-17 09:54:53 -04:00
device.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
execute.c systemd: use structured logging for unit changes 2012-10-18 21:33:52 +02:00
execute.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
fdset.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
fdset.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
hostname-setup.c remove Fedora hostname, locale, vconsole legacy file support 2012-10-24 03:51:06 +02:00
hostname-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
ima-setup.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
ima-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
initreq.h move libsystemd_core.la sources into core/ 2012-04-11 16:03:51 +02:00
job.c job: avoid recursion into transaction code from job cancelation 2012-10-25 03:21:32 +02:00
job.h job: add comments to JobResult values 2012-10-25 03:21:31 +02:00
kill.c unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
kill.h core: drop KillMode parameter from KillUnit() bus call 2012-07-20 00:10:32 +02:00
killall.c killall: avoid gcc warning about wait name clash 2012-07-19 02:17:11 +02:00
killall.h switch-root: don't wait for processes 2012-07-17 17:44:26 +02:00
kmod-setup.c modules-load: use correct va_list logging function 2012-06-28 00:52:14 +02:00
kmod-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
load-dropin.c util: rename join() to strjoin() 2012-07-13 13:41:01 +02:00
load-dropin.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
load-fragment-gperf.gperf.m4 unit: add new ConditionHost= condition type 2012-08-22 01:51:53 +02:00
load-fragment.c man: document behaviour of ListenStream= with only a port number in regards to IPv4/IPv6 2012-10-03 14:18:55 -04:00
load-fragment.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
locale-setup.c remove Fedora hostname, locale, vconsole legacy file support 2012-10-24 03:51:06 +02:00
locale-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
loopback-setup.c loopback: handle EPERM more gracefully 2012-04-13 18:52:53 +02:00
loopback-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
machine-id-setup.c machine-id: properly mount transient machine ID read-only 2012-08-13 16:24:30 +02:00
machine-id-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
macros.systemd.in rpm: expose preset dir as rpm macro and in systemd.pc 2012-09-13 22:17:46 +02:00
main.c core: Refuse to run a user instance when the system hasn't been booted with systemd. 2012-10-16 02:17:46 +02:00
Makefile build-sys: add stub makefiles to make emacs easier to use 2012-04-12 13:35:56 +02:00
manager.c manager: connect SIGRTMIN+24 to terminating --user instances 2012-10-18 01:19:35 +02:00
manager.h audit: turn the audit fd into a static variable 2012-10-02 17:40:09 -04:00
mount-setup.c mount: don't mount securityfs in a container 2012-09-18 12:13:02 +02:00
mount-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
mount.c mount: make sure m->where is set before unit_add_exec_dependencies() 2012-10-23 01:53:02 +02:00
mount.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
namespace.c nspawn,namespaces: make sure we recursively bind mount things in 2012-08-13 16:25:03 +02:00
namespace.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
org.freedesktop.systemd1.conf move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
org.freedesktop.systemd1.policy.in.in move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
org.freedesktop.systemd1.service move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
path.c core: move ManagerRunningAs to shared 2012-09-18 19:53:34 +02:00
path.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
securebits.h move libsystemd_core.la sources into core/ 2012-04-11 16:03:51 +02:00
selinux-access.c systemd: use structured logging for unit changes 2012-10-18 21:33:52 +02:00
selinux-access.h selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
selinux-setup.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
selinux-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
service.c systemd: use structured logging for unit changes 2012-10-18 21:33:52 +02:00
service.h service: introduce a proper service result if the start limit is hit 2012-08-22 05:02:33 +02:00
shutdown.c shutdown: in containers, invoke reboot(2), too. Then fallback to exit() if CAP_SYS_BOOT is missing 2012-09-05 15:55:40 -07:00
snapshot.c unit: get rid of UnitVTable.suffix, which is now unused 2012-07-10 17:16:50 +02:00
snapshot.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
socket.c mount: don't try to initialize extra deps for mount units before initializing their basic fields 2012-10-16 19:50:26 +02:00
socket.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
special.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
swap.c core/swap.c: Do not add Before=swap.target to swap units. 2012-10-16 02:20:55 +02:00
swap.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
switch-root.c namespace: rework namespace support 2012-08-13 15:27:04 +02:00
switch-root.h switch-root: move switch_root() call into its own .c file 2012-05-21 19:33:39 +02:00
syscall-list.c execute: support syscall filtering using seccomp filters 2012-07-17 04:17:53 +02:00
syscall-list.h execute: support syscall filtering using seccomp filters 2012-07-17 04:17:53 +02:00
sysfs-show.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
system.conf fix typos 2012-09-20 19:12:23 +02:00
systemd.pc.in rpm: expose preset dir as rpm macro and in systemd.pc 2012-09-13 22:17:46 +02:00
target.c target: imply default ordering for PartsOf deps as well 2012-09-18 11:01:34 +02:00
target.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
tcpwrap.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
tcpwrap.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
timer.c core: move ManagerRunningAs to shared 2012-09-18 19:53:34 +02:00
timer.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
transaction.c man: fix a bunch of typos in docs 2012-09-13 19:34:24 +02:00
transaction.h transaction: add missing emacs and license headers 2012-04-22 15:22:27 +02:00
umount.c shutdown: don't attempt read-only mounts in a container 2012-09-03 18:59:04 -07:00
umount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
unit-printf.c core: move ManagerRunningAs to shared 2012-09-18 19:53:34 +02:00
unit-printf.h unit: split unit_printf() and friends into its own .c file 2012-09-18 11:27:56 +02:00
unit.c systemd: use structured logging for unit changes 2012-10-18 21:33:52 +02:00
unit.h unit-printf: before resolving exec context specifiers check whether the object actually has an exec context 2012-09-18 11:40:01 +02:00
user.conf move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00