summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-17 14:55:56 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-17 14:56:44 +0200
commitbfba3256a02a0871579c4ee48d787dfe4585fd8d (patch)
treeba5ca800d0eab899f30885e294bc44e13686e6c6
parentde34a42bcad31f0648ac0f249801310e0dbf83f9 (diff)
service: don't hit an assert if a service unit changes type and we get a spurious event from before
-rw-r--r--TODO22
-rw-r--r--src/core/service.c10
2 files changed, 10 insertions, 22 deletions
diff --git a/TODO b/TODO
index 6d5468a7eb..10f43d7d25 100644
--- a/TODO
+++ b/TODO
@@ -22,23 +22,6 @@ Bugfixes:
* we pull src/core/manager.h into src/shared/src/shared/path-lookup.c which is the wrong direction
rename enum "ManagerRunningAs" to "SystemdRunningAs" and move it to shared/
-* crash happens when running a service as forking and then changing it to simple and reloading.
-
- Jul 09 18:20:57 mop systemd[1]: usbmuxd.service operation timed out. Terminating.
- Jul 09 18:20:57 mop systemd[1]: Unit usbmuxd.service entered failed state.
- Jul 09 18:22:24 mop systemd[1]: PID 21814 read from file /var/run/usbmuxd.pid does not exist.
- Jul 09 18:22:24 mop systemd[1]: Unit usbmuxd.service entered failed state.
- Jul 09 18:22:33 mop systemd[1]: Reloading.
- Jul 09 18:22:37 mop systemd[1]: Assertion 's->type == SERVICE_FORKING' failed at src/core/service.c:3007, function service_sigchld_eve...Aborting.
- Jul 09 18:22:37 mop systemd[1]: Caught <ABRT>, dumped core as pid 21865.
- Jul 09 18:22:37 mop systemd[1]: Freezing execution.
- Jul 09 18:22:37 mop [21866]: Process 21865 (systemd) dumped core.
-
-* support *static* (/run) hibernate inhibitors. All rpm -i actions should completely prevent any
- sort of hibernate action until the next reboot. If the kernel or any other base tool is replaced
- by rpm, the resume path might fail, the for resume needed kernel might even be uninstalled, and
- the whole situation leads directly to data loss.
-
F18:
* journald: warn if we drop messages we forward to the syslog socket
@@ -55,6 +38,11 @@ F18:
Features:
+* support *static* (/run) hibernate inhibitors. All rpm -i actions should completely prevent any
+ sort of hibernate action until the next reboot. If the kernel or any other base tool is replaced
+ by rpm, the resume path might fail, the for resume needed kernel might even be uninstalled, and
+ the whole situation leads directly to data loss.
+
* move debug shell to tty6 and make sure this doesn't break the gettys on tty6
* move cryptsetup key caching into kernel keyctl?
diff --git a/src/core/service.c b/src/core/service.c
index 807b34267f..7b5ff6d1ac 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2961,12 +2961,10 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
else
service_enter_signal(s, SERVICE_FINAL_SIGTERM, f);
break;
- } else {
- assert(s->type == SERVICE_DBUS || s->type == SERVICE_NOTIFY);
-
- /* Fall through */
}
+ /* Fall through */
+
case SERVICE_RUNNING:
service_enter_running(s, f);
break;
@@ -3036,7 +3034,9 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
break;
case SERVICE_START:
- assert(s->type == SERVICE_FORKING);
+ if (s->type != SERVICE_FORKING)
+ /* Maybe spurious event due to a reload that changed the type? */
+ break;
if (f != SERVICE_SUCCESS) {
service_enter_signal(s, SERVICE_FINAL_SIGTERM, f);