Bug#981345: buster-pu: package systemd/241-7~deb10u6

Michael Biebl biebl at debian.org
Fri Jan 29 16:47:19 GMT 2021


Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org at packages.debian.org
Usertags: pu
X-Debbugs-Cc: pkg-systemd-maintainers at lists.alioth.debian.org, kibi at debian.org, debian-boot at lists.debian.org

Hi,

I'd like to make a stable upload for systemd fixing #975561:

  journal: do not trigger assertion when journal_file_close() get NULL

The rest is autopkgtest updates, as the current state is a bit sad [1]
on stable.

The full (annotated) changelog is

systemd (241-7~deb10u6) buster; urgency=medium

  * journal: do not trigger assertion when journal_file_close() get NULL
    (Closes: #975561)

https://salsa.debian.org/systemd-team/systemd/-/commit/42f62d560748cf79353d0a66d1ccf49517f951d3

* test-bpf: skip test when run inside containers.
    The test reliably fails inside LXC and Docker when run on a new enough
    kernel. It's unclear whether this is a kernel, LXC/Docker or systemd
    issue and apparently there is no real interest to get this fixed, so
    let's skip this test.

https://salsa.debian.org/systemd-team/systemd/-/commit/de5350a0090a51ba391baf57e5d3e549bf126a6b

  * autopkgtest: mark networkd-test.py as flaky.
    See https://github.com/systemd/systemd/issues/18357
    and https://github.com/systemd/systemd/issues/18196

https://salsa.debian.org/systemd-team/systemd/-/commit/996babe874059cc70f54f4edbd3e00a46a208bb7


CCed kibi/debian-boot, as usual.
The udev package should not be affected, as the above change only
affects the journal, which is not used in d-i.
The regression potential is rather low. The fix itself is a cherry-pick
from upstream and has been part of sid/testing since quite a while.


Regards,
Michael


[1] https://ci.debian.net/packages/s/systemd/


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

Kernel: Linux 5.10.0-2-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 8c3b276..61dcee2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+systemd (241-7~deb10u6) buster; urgency=medium
+
+  * journal: do not trigger assertion when journal_file_close() get NULL
+    (Closes: #975561)
+  * test-bpf: skip test when run inside containers.
+    The test reliably fails inside LXC and Docker when run on a new enough
+    kernel. It's unclear whether this is a kernel, LXC/Docker or systemd
+    issue and apparently there is no real interest to get this fixed, so
+    let's skip this test.
+  * autopkgtest: mark networkd-test.py as flaky.
+    See https://github.com/systemd/systemd/issues/18357
+    and https://github.com/systemd/systemd/issues/18196
+
+ -- Michael Biebl <biebl at debian.org>  Fri, 29 Jan 2021 15:16:06 +0100
+
 systemd (241-7~deb10u5) buster; urgency=medium
 
   * basic/cap-list: parse/print numerical capabilities (Closes: #964926)
diff --git a/debian/patches/debian/Re-enable-journal-forwarding-to-syslog.patch b/debian/patches/debian/Re-enable-journal-forwarding-to-syslog.patch
index 231158c..78c2d01 100644
--- a/debian/patches/debian/Re-enable-journal-forwarding-to-syslog.patch
+++ b/debian/patches/debian/Re-enable-journal-forwarding-to-syslog.patch
@@ -30,7 +30,7 @@ index 2791678..3a9e20a 100644
          <literal>systemd.journald.forward_to_syslog</literal>,
          <literal>systemd.journald.forward_to_kmsg</literal>,
 diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
-index 2a960eb..7fe0f82 100644
+index ba0b35d..cd45212 100644
 --- a/src/journal/journald-server.c
 +++ b/src/journal/journald-server.c
 @@ -1835,6 +1835,7 @@ int server_init(Server *s) {
diff --git a/debian/patches/journal-do-not-trigger-assertion-when-journal_file_close-.patch b/debian/patches/journal-do-not-trigger-assertion-when-journal_file_close-.patch
new file mode 100644
index 0000000..9cb536b
--- /dev/null
+++ b/debian/patches/journal-do-not-trigger-assertion-when-journal_file_close-.patch
@@ -0,0 +1,46 @@
+From: Yu Watanabe <watanabe.yu+github at gmail.com>
+Date: Tue, 28 May 2019 12:40:17 +0900
+Subject: journal: do not trigger assertion when journal_file_close() get NULL
+
+We generally expect destructors to not complain if a NULL argument is passed.
+
+Closes #12400.
+
+(cherry picked from commit c377a6f3ad3d9bed4ce7e873e8e9ec6b1650c57d)
+---
+ src/journal/journal-file.c    | 3 ++-
+ src/journal/journald-server.c | 7 ++-----
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 56827f9..04cf1ef 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -335,7 +335,8 @@ bool journal_file_is_offlining(JournalFile *f) {
+ }
+ 
+ JournalFile* journal_file_close(JournalFile *f) {
+-        assert(f);
++        if (!f)
++                return NULL;
+ 
+ #if HAVE_GCRYPT
+         /* Write the final tag */
+diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
+index 2a960eb..ba0b35d 100644
+--- a/src/journal/journald-server.c
++++ b/src/journal/journald-server.c
+@@ -2037,11 +2037,8 @@ void server_done(Server *s) {
+ 
+         client_context_flush_all(s);
+ 
+-        if (s->system_journal)
+-                (void) journal_file_close(s->system_journal);
+-
+-        if (s->runtime_journal)
+-                (void) journal_file_close(s->runtime_journal);
++        (void) journal_file_close(s->system_journal);
++        (void) journal_file_close(s->runtime_journal);
+ 
+         ordered_hashmap_free_with_destructor(s->user_journals, journal_file_close);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index c608be7..24dae93 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -55,6 +55,9 @@ Fix-typo-in-function-name.patch
 basic-cap-list-parse-print-numerical-capabilities.patch
 missing-Add-new-Linux-capabilities.patch
 networkd-do-not-generate-MAC-for-bridge-device.patch
+journal-do-not-trigger-assertion-when-journal_file_close-.patch
+test-bpf-skip-test-when-run-inside-containers.patch
+tests-skip-test-bpf-only-when-we-re-100-sure-it-s-run-in-.patch
 debian/Use-Debian-specific-config-files.patch
 debian/Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch
 debian/Make-run-lock-tmpfs-an-API-fs.patch
diff --git a/debian/patches/test-bpf-skip-test-when-run-inside-containers.patch b/debian/patches/test-bpf-skip-test-when-run-inside-containers.patch
new file mode 100644
index 0000000..874daa2
--- /dev/null
+++ b/debian/patches/test-bpf-skip-test-when-run-inside-containers.patch
@@ -0,0 +1,41 @@
+From: Michael Biebl <biebl at debian.org>
+Date: Sun, 19 May 2019 20:57:07 +0200
+Subject: test-bpf: skip test when run inside containers
+
+The test reliably fails inside LXC and Docker when run on a new enough
+kernel. It's unclear whether this is a kernel, LXC/Docker or systemd
+issue and apparently there is no real interest to get this fixed, so
+let's skip this test.
+As this also covers Travis CI, there is no need for this additional
+check anymore.
+
+See https://github.com/systemd/systemd/issues/9666
+
+(cherry picked from commit 98a3c188a1511caae422b2c891f3cc016824eb81)
+---
+ src/test/test-bpf.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/test-bpf.c b/src/test/test-bpf.c
+index cd8d68f..eb1d8d7 100644
+--- a/src/test/test-bpf.c
++++ b/src/test/test-bpf.c
+@@ -14,6 +14,7 @@
+ #include "test-helper.h"
+ #include "tests.h"
+ #include "unit.h"
++#include "virt.h"
+ 
+ /* We use the same limit here that PID 1 bumps RLIMIT_MEMLOCK to if it can */
+ #define CAN_MEMLOCK_SIZE (64U*1024U*1024U)
+@@ -56,8 +57,8 @@ int main(int argc, char *argv[]) {
+ 
+         test_setup_logging(LOG_DEBUG);
+ 
+-        if (is_run_on_travis_ci())
+-                return log_tests_skipped("test-bpf fails on Travis CI: https://github.com/systemd/systemd/issues/9666");
++        if (detect_container())
++                return log_tests_skipped("test-bpf fails inside LXC and Docker containers: https://github.com/systemd/systemd/issues/9666");
+ 
+         assert_se(getrlimit(RLIMIT_MEMLOCK, &rl) >= 0);
+         rl.rlim_cur = rl.rlim_max = MAX3(rl.rlim_cur, rl.rlim_max, CAN_MEMLOCK_SIZE);
diff --git a/debian/patches/tests-skip-test-bpf-only-when-we-re-100-sure-it-s-run-in-.patch b/debian/patches/tests-skip-test-bpf-only-when-we-re-100-sure-it-s-run-in-.patch
new file mode 100644
index 0000000..c7a9bc8
--- /dev/null
+++ b/debian/patches/tests-skip-test-bpf-only-when-we-re-100-sure-it-s-run-in-.patch
@@ -0,0 +1,25 @@
+From: Evgeny Vereshchagin <evvers at ya.ru>
+Date: Thu, 30 May 2019 03:29:50 +0200
+Subject: tests: skip test-bpf only when we're 100% sure it's run in
+ containers
+
+This is just a follow-up to https://github.com/systemd/systemd/pull/12617.
+
+(cherry picked from commit 6bd1457afe396864cc4b9884157a6126027ed85e)
+---
+ src/test/test-bpf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/test-bpf.c b/src/test/test-bpf.c
+index eb1d8d7..9252c60 100644
+--- a/src/test/test-bpf.c
++++ b/src/test/test-bpf.c
+@@ -57,7 +57,7 @@ int main(int argc, char *argv[]) {
+ 
+         test_setup_logging(LOG_DEBUG);
+ 
+-        if (detect_container())
++        if (detect_container() > 0)
+                 return log_tests_skipped("test-bpf fails inside LXC and Docker containers: https://github.com/systemd/systemd/issues/9666");
+ 
+         assert_se(getrlimit(RLIMIT_MEMLOCK, &rl) >= 0);
diff --git a/debian/tests/control b/debian/tests/control
index 0ae1c8b..f7ea7cd 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -52,7 +52,7 @@ Depends: systemd,
   systemd-sysv,
   policykit-1,
   dnsmasq-base
-Restrictions: needs-root, isolation-container
+Restrictions: needs-root, isolation-container, flaky
 
 Tests: build-login
 Depends: systemd,


More information about the Pkg-systemd-maintainers mailing list