Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Dear release team

Please do tell me if I can upload lxcfs 3.0.3-2+deb10u1 to stable.

A canonical employee reported a swap accounting bug that could make a
container look like it uses all the host's swap. The fix being minor,
I've designed a patch I'd like to have uploaded to stable.

The upload is not done yet, as I'd rather wait for your opinion.

The bug is already fixed in testing, as this patch has also been included in
lxcfs 4.

Thanks in advance!

diff -Nru lxcfs-3.0.3/debian/changelog lxcfs-3.0.3/debian/changelog
--- lxcfs-3.0.3/debian/changelog        2018-12-09 22:06:41.000000000 +0100
+++ lxcfs-3.0.3/debian/changelog        2021-03-12 12:17:23.000000000 +0100
@@ -1,3 +1,11 @@
+lxcfs (3.0.3-2+deb10u1) buster; urgency=medium
+
+  [ Kellen Renshaw ]
+  * d/p/0001 : Fix a misreport of swap being fully used due to a computation
+    error (Closes: #955499)
+
+ -- Pierre-Elliott Bécue <p...@debian.org>  Fri, 12 Mar 2021 12:17:23 +0100
+
 lxcfs (3.0.3-2) unstable; urgency=medium
 
   * Add a call to dpkg-maintscript-helper rm_conffile to handle properly the
diff -Nru lxcfs-3.0.3/debian/gbp.conf lxcfs-3.0.3/debian/gbp.conf
--- lxcfs-3.0.3/debian/gbp.conf 2018-12-09 22:06:41.000000000 +0100
+++ lxcfs-3.0.3/debian/gbp.conf 2021-03-12 12:17:23.000000000 +0100
@@ -1,2 +1,3 @@
 [DEFAULT]
 pristine-tar = True
+debian-branch=debian/buster
diff -Nru 
lxcfs-3.0.3/debian/patches/0001-bindings-Adjusts-the-logic-for-calculating-SwapFree-.patch
 
lxcfs-3.0.3/debian/patches/0001-bindings-Adjusts-the-logic-for-calculating-SwapFree-.patch
--- 
lxcfs-3.0.3/debian/patches/0001-bindings-Adjusts-the-logic-for-calculating-SwapFree-.patch
  1970-01-01 01:00:00.000000000 +0100
+++ 
lxcfs-3.0.3/debian/patches/0001-bindings-Adjusts-the-logic-for-calculating-SwapFree-.patch
  2021-03-12 12:17:05.000000000 +0100
@@ -0,0 +1,26 @@
+From: Kellen Renshaw <kellen.rens...@canonical.com>
+Date: Fri, 12 Mar 2021 12:16:47 +0100
+Subject: =?utf-8?q?bindings=3A_Adjusts_the_logic_for_calculating_SwapFree_t?=
+ =?utf-8?q?o_better_handle=E2=80=A6?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+… conditions where swap usage is reported to be <0.
+---
+ bindings.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bindings.c b/bindings.c
+index 5858c6d..fc89789 100644
+--- a/bindings.c
++++ b/bindings.c
+@@ -3186,7 +3186,7 @@ static int proc_meminfo_read(char *buf, size_t size, 
off_t offset,
+                       printme = lbuf;
+               } else if (startswith(line, "SwapFree:") && memswlimit > 0 && 
memswusage > 0) {
+                       unsigned long swaptotal = memswlimit,
+-                                      swapusage = memswusage - memusage,
++                                      swapusage = memusage > memswusage ? 0 : 
memswusage - memusage,
+                                       swapfree = swapusage < swaptotal ? 
swaptotal - swapusage : 0;
+                       snprintf(lbuf, 100, "SwapFree:       %8lu kB\n", 
swapfree);
+                       printme = lbuf;
diff -Nru lxcfs-3.0.3/debian/patches/series lxcfs-3.0.3/debian/patches/series
--- lxcfs-3.0.3/debian/patches/series   1970-01-01 01:00:00.000000000 +0100
+++ lxcfs-3.0.3/debian/patches/series   2021-03-12 12:17:05.000000000 +0100
@@ -0,0 +1 @@
+0001-bindings-Adjusts-the-logic-for-calculating-SwapFree-.patch

unblock lxcfs/3.0.3-2+deb10u1

-- System Information:
Debian Release: 10.8
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-10-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_USER
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set 
to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to