[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#691464: marked as done (unblock: systemd/44-5)



Your message dated Tue, 06 Nov 2012 18:19:30 +0000
with message-id <8a99603d6019edfa96780f7ac87b566d@mail.adsl.funky-badger.org>
and subject line Re: Bug#691464: unblock: systemd/44-5
has caused the Debian Bug report #691464,
regarding unblock: systemd/44-5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
691464: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691464
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package systemd

It contains a bunch of important fixes. From the changelog:

systemd (44-5) unstable; urgency=low

  * Team upload.

  [ Tollef Fog Heen ]
  * disable killing on entering START_PRE, START, thanks to Michael
    Stapelberg for patch.  This avoids killing VMs run through libvirt
    when restarting libvirtd.  Closes: #688635.
  * Avoid reloading services when shutting down, since that won't work and
    makes no sense.  Thanks to Michael Stapelberg for the patch.
    Closes: #624599.
  * Try to determine which init scripts support the reload action
    heuristically.  Closes: #686115, #650382.

  [ Michael Biebl ]
  * Update Vcs-* fields, the Git repository is hosted on alioth now. Set the
    default branch to "debian".
  * Avoid reload and (re)start requests during early boot which can lead to
    deadlocks.  Closes: #624599
  * Make systemd-cgroup work even if not all cgroup mounts are available on
    startup.  Closes: #690916
  * Fix typos in the systemd.path and systemd.unit man page.  Closes: #668344
  * Add watch file to track new upstream releases.

 -- Michael Biebl <biebl@debian.org>  Thu, 25 Oct 2012 21:41:23 +0200

The most important fix is probably #624599. We do have quite a few
packages which run reload or restart during rcS via dhcp or ifupdown
hooks. Most notably samba. The deadlock at this point means the system
stops booting.

It would be great seeing those fixes get into wheezy.

Full debdiff is attached

Cheers,
Michael

unblock systemd/44-5

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/debian/changelog b/debian/changelog
index 699669f..4912043 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,29 @@
+systemd (44-5) unstable; urgency=low
+
+  * Team upload.
+
+  [ Tollef Fog Heen ]
+  * disable killing on entering START_PRE, START, thanks to Michael
+    Stapelberg for patch.  This avoids killing VMs run through libvirt
+    when restarting libvirtd.  Closes: #688635.
+  * Avoid reloading services when shutting down, since that won't work and
+    makes no sense.  Thanks to Michael Stapelberg for the patch.
+    Closes: #624599.
+  * Try to determine which init scripts support the reload action
+    heuristically.  Closes: #686115, #650382.
+
+  [ Michael Biebl ]
+  * Update Vcs-* fields, the Git repository is hosted on alioth now. Set the
+    default branch to "debian".
+  * Avoid reload and (re)start requests during early boot which can lead to
+    deadlocks.  Closes: #624599
+  * Make systemd-cgroup work even if not all cgroup mounts are available on
+    startup.  Closes: #690916
+  * Fix typos in the systemd.path and systemd.unit man page.  Closes: #668344
+  * Add watch file to track new upstream releases.
+
+ -- Michael Biebl <biebl@debian.org>  Thu, 25 Oct 2012 21:41:23 +0200
+
 systemd (44-4) unstable; urgency=low
 
   [ Michael Biebl ]
diff --git a/debian/control b/debian/control
index 70ca95b..5837027 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,8 @@ Section: admin
 Priority: extra
 Maintainer: Tollef Fog Heen <tfheen@debian.org>
 Standards-Version: 3.9.2
-Vcs-Git: git://git.err.no/systemd/
-Vcs-Browser: http://git.err.no/cgi-bin/gitweb.cgi?p=systemd;a=summary
+Vcs-Git: git://anonscm.debian.org/pkg-systemd/systemd.git -b debian
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-systemd/systemd.git;a=summary
 Homepage: http://www.freedesktop.org/wiki/Software/systemd
 Build-Depends: debhelper (>= 9),
                libcap-dev,
diff --git a/debian/systemd-hack-up-the-source.hook b/debian/systemd-hack-up-the-source.hook
index 7ad31b4..09368ab 100755
--- a/debian/systemd-hack-up-the-source.hook
+++ b/debian/systemd-hack-up-the-source.hook
@@ -35,6 +35,8 @@ fi
 DEB_REF=$(sanitise_git_ref $DEB_VERSION)
 UPSTREAM_REF="${DEB_REF%-*}"
 
+#tar xf ../systemd_$UPSTREAM_VERSION.orig.tar.* --strip-components=1 --keep-newer-files
+
 do_patches (){
     while read -r line
     do
@@ -45,6 +47,7 @@ do_patches (){
 	    *)
 		git --git-dir "$REPO_DIR/.git" diff "$line" > "$patch_dir/$line"
                 echo "$line" >> "$patch_dir/series"
+                echo "$line" >> ".pc/applied-patches"
                 if [ ! -s "$patch_dir/$line" ]; then
                     echo "$line generated empty patch, please fix."
                     exit 1
@@ -55,6 +58,7 @@ do_patches (){
 }
 
 mkdir -p "$patch_dir" || exit 1
+mkdir -p ".pc" || exit 1
 echo "# $patch_list exported from git by export-hook" > "$patch_dir/series"
 
 (sed -e "s/\$DEB_VERSION/$DEB_VERSION/g"		\
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..962767f
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.freedesktop.org/software/systemd/systemd-(\d+)\.tar\.xz
diff --git a/man/systemd.path.xml b/man/systemd.path.xml
index 5b1ff75..306d8d2 100644
--- a/man/systemd.path.xml
+++ b/man/systemd.path.xml
@@ -125,7 +125,7 @@
                                 is
                                 activated. <varname>PathExistsGlob=</varname>
                                 works similar, but checks for the
-                                existance of at least one file
+                                existence of at least one file
                                 matching the globbing pattern
                                 specified. <varname>PathChanged=</varname>
                                 may be used to watch a file or
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 3cc126b..ce05f2f 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -122,7 +122,7 @@
                 <para>If a line starts with <option>.include</option>
                 followed by a file name, the specified file will be
                 parsed at this point. Make sure that the file that is
-                included has the appropiate section headers before
+                included has the appropriate section headers before
                 any directives.</para>
 
                 <para>Along with a unit file
diff --git a/src/cgtop.c b/src/cgtop.c
index 8b8617d..1257fd2 100644
--- a/src/cgtop.c
+++ b/src/cgtop.c
@@ -340,17 +340,22 @@ static int refresh(Hashmap *a, Hashmap *b, unsigned iteration) {
 
         r = refresh_one("name=systemd", "/", a, b, iteration, 0);
         if (r < 0)
-                return r;
-
+                if (r != -ENOENT)
+                    return r;
         r = refresh_one("cpuacct", "/", a, b, iteration, 0);
         if (r < 0)
-                return r;
-
+                if (r != -ENOENT)
+                    return r;
         r = refresh_one("memory", "/", a, b, iteration, 0);
         if (r < 0)
-                return r;
+                if (r != -ENOENT)
+                    return r;
 
-        return refresh_one("blkio", "/", a, b, iteration, 0);
+        r = refresh_one("blkio", "/", a, b, iteration, 0);
+        if (r < 0)
+                if (r != -ENOENT)
+                    return r;
+        return 0;
 }
 
 static int group_compare(const void*a, const void *b) {
diff --git a/src/manager.c b/src/manager.c
index 74bd740..00f4620 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1700,6 +1700,8 @@ static int transaction_add_isolate_jobs(Manager *m) {
 int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool override, DBusError *e, Job **_ret) {
         int r;
         Job *ret;
+        Job *j;
+        Iterator i;
 
         assert(m);
         assert(type < _JOB_TYPE_MAX);
@@ -1711,6 +1713,45 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
                 return -EINVAL;
         }
 
+        if (type == JOB_RELOAD || type == JOB_RELOAD_OR_START || type == JOB_RESTART || type == JOB_TRY_RESTART) {
+                /* If final.target is queued (happens on poweroff, reboot and
+                 * halt), we will not accept new reload jobs. They would not be
+                 * executed ever anyways (since the shutdown comes first), but
+                 * they block the shutdown process: when systemd tries to stop
+                 * a unit such as ifup@eth0.service, that unit might invoke a
+                 * systemctl reload command, which blockingly waits (but only
+                 * gets executed after all other queued units for the shutdown
+                 * have been executed).
+                 *
+                 * See http://bugs.debian.org/624599 and
+                 *     http://bugs.debian.org/635777 */
+                HASHMAP_FOREACH(j, m->jobs, i) {
+                        assert(j->installed);
+
+                        if (strcmp(j->unit->id, "final.target") == 0) {
+                                log_debug("final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+                                dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+                                return -EINVAL;
+                        }
+                        /* Trying to reload services from multi-user.target
+                         * during the early boot stage can lead to deadlocks.
+                         * An example is samba being reloaded by the dhcp hook
+                         * when the network is activated during rcS.
+                         * As a workaround we ignore reload or (re)start
+                         * requests while sysinit.target is queued for
+                         * services which have the DefaultDependencies option
+                         * set to yes.
+                         *
+                         * See http://bugs.debian.org/624599 */
+                        if (strcmp(j->unit->id, "sysinit.target") == 0 && unit->default_dependencies) {
+                                log_debug("sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+                                dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+                                return -EINVAL;
+                        }
+                }
+        }
+
+
         if (mode == JOB_ISOLATE && !unit->allow_isolate) {
                 dbus_set_error(e, BUS_ERROR_NO_ISOLATION, "Operation refused, unit may not be isolated.");
                 return -EPERM;
diff --git a/src/service.c b/src/service.c
index 8b5c0b0..808a1b8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -494,7 +494,7 @@ static ExecCommand *exec_command_new(const char *path, const char *arg1) {
         return c;
 }
 
-static int sysv_exec_commands(Service *s) {
+static int sysv_exec_commands(Service *s, const bool supports_reload) {
         ExecCommand *c;
 
         assert(s);
@@ -508,13 +508,24 @@ static int sysv_exec_commands(Service *s) {
                 return -ENOMEM;
         exec_command_append_list(s->exec_command+SERVICE_EXEC_STOP, c);
 
-        if (!(c = exec_command_new(s->sysv_path, "reload")))
-                return -ENOMEM;
-        exec_command_append_list(s->exec_command+SERVICE_EXEC_RELOAD, c);
+        if (supports_reload) {
+                if (!(c = exec_command_new(s->sysv_path, "reload")))
+                        return -ENOMEM;
+                exec_command_append_list(s->exec_command+SERVICE_EXEC_RELOAD, c);
+        }
 
         return 0;
 }
 
+static bool usage_contains_reload(const char *line) {
+        return (strcasestr(line, "{reload|") ||
+                strcasestr(line, "{reload}") ||
+                strcasestr(line, "{reload\"") ||
+                strcasestr(line, "|reload|") ||
+                strcasestr(line, "|reload}") ||
+                strcasestr(line, "|reload\""));
+}
+
 static int service_load_sysv_path(Service *s, const char *path) {
         FILE *f;
         Unit *u;
@@ -524,10 +535,12 @@ static int service_load_sysv_path(Service *s, const char *path) {
                 NORMAL,
                 DESCRIPTION,
                 LSB,
-                LSB_DESCRIPTION
+                LSB_DESCRIPTION,
+                USAGE_CONTINUATION
         } state = NORMAL;
         char *short_description = NULL, *long_description = NULL, *chkconfig_description = NULL, *description;
         struct stat st;
+        bool supports_reload = false;
 
         assert(s);
         assert(path);
@@ -574,8 +587,23 @@ static int service_load_sysv_path(Service *s, const char *path) {
                 line++;
 
                 t = strstrip(l);
-                if (*t != '#')
+                if (*t != '#') {
+                        /* Try to figure out whether this init script supports
+                         * the reload operation. This heuristic looks for
+                         * "Usage" lines which include the reload option. */
+                        if ( state == USAGE_CONTINUATION ||
+                            (state == NORMAL && strcasestr(t, "usage"))) {
+                                if (usage_contains_reload(t)) {
+                                        supports_reload = true;
+                                        state = NORMAL;
+                                } else if (t[strlen(t)-1] == '\\')
+                                        state = USAGE_CONTINUATION;
+                                else
+                                        state = NORMAL;
+                        }
+
                         continue;
+                }
 
                 if (state == NORMAL && streq(t, "### BEGIN INIT INFO")) {
                         state = LSB;
@@ -868,7 +896,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
                 }
         }
 
-        if ((r = sysv_exec_commands(s)) < 0)
+        if ((r = sysv_exec_commands(s, supports_reload)) < 0)
                 goto finish;
         if (s->sysv_runlevels &&
             chars_intersect(RUNLEVELS_BOOT, s->sysv_runlevels) &&
@@ -2094,7 +2122,8 @@ static void service_enter_start(Service *s) {
         /* We want to ensure that nobody leaks processes from
          * START_PRE here, so let's go on a killing spree, People
          * should not spawn long running processes from START_PRE. */
-        cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL);
+        // F17, bz816842, bz805942
+        //cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL);
 
         if (s->type == SERVICE_FORKING) {
                 s->control_command_id = SERVICE_EXEC_START;
@@ -2168,7 +2197,8 @@ static void service_enter_start_pre(Service *s) {
 
                 /* Before we start anything, let's clear up what might
                  * be left from previous runs. */
-                cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL);
+                // F17, bz816842, bz805942
+                //cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL);
 
                 s->control_command_id = SERVICE_EXEC_START_PRE;
 

--- End Message ---
--- Begin Message ---
On 25.10.2012 23:01, Michael Biebl wrote:
systemd (44-5) unstable; urgency=low

  * Team upload.

  [ Tollef Fog Heen ]
  * disable killing on entering START_PRE, START, thanks to Michael
Stapelberg for patch. This avoids killing VMs run through libvirt
    when restarting libvirtd.  Closes: #688635.
* Avoid reloading services when shutting down, since that won't work and
    makes no sense.  Thanks to Michael Stapelberg for the patch.
    Closes: #624599.
  * Try to determine which init scripts support the reload action
    heuristically.  Closes: #686115, #650382.

  [ Michael Biebl ]
* Update Vcs-* fields, the Git repository is hosted on alioth now. Set the
    default branch to "debian".
* Avoid reload and (re)start requests during early boot which can lead to
    deadlocks.  Closes: #624599
* Make systemd-cgroup work even if not all cgroup mounts are available on
    startup.  Closes: #690916
* Fix typos in the systemd.path and systemd.unit man page. Closes: #668344
  * Add watch file to track new upstream releases.

Unblocked; thanks.

Regards,

Adam

--- End Message ---

Reply to: