severity 885542 serious
tags 885542 +patch
thanks

Hi,

Am Freitag, den 28.09.2018, 13:43 +0200 schrieb Michael Banck:
> On Wed, 27 Dec 2017 21:38:41 +0100 Paul Slootman <p...@debian.org> wrote:
> > As I find having accurate start times of processes far more important
> > than having an accurate uptime counter for my containers, as do other
> > people as well apparently, I would like to see this reverted until a
> > better solution for the btime field /uptime is found.
> 
> Same here, this broke the patroni autopkgtest (see #909532 and https://g
> ithub.com/zalando/patroni/issues/811 as well as https://github.com/giamp
> aolo/psutil/issues/1344)
> 
> As ci.debian.net is running on LXC containers (on stable apparently)
> could this be fixed in stable, please?
> 
> Should this be RC as it breaks unrelated software?

I've bumped the severity to serious now.

Please find attached the proposed NMU upload to stable, adopting the fix
that Ubuntu has had in place for a while. Do you prefer to fix this
yourselves or should I go ahead?


Michael

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.ba...@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz
diff -Nru lxcfs-2.0.7/debian/changelog lxcfs-2.0.7/debian/changelog
--- lxcfs-2.0.7/debian/changelog	2017-05-20 11:00:52.000000000 +0200
+++ lxcfs-2.0.7/debian/changelog	2018-10-04 16:23:15.000000000 +0200
@@ -1,3 +1,12 @@
+lxcfs (2.0.7-1.1) stretch; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches/revert-the-virtualization-of-btime-field.patch: New patch,
+    reverts the uptime virtualiziation, fixing process start times, adopted
+    from upstream commit 72dd97f7 (Closes: #885542).
+
+ -- Michael Banck <mchael.ba...@credativ.de>  Thu, 04 Oct 2018 16:23:15 +0200
+
 lxcfs (2.0.7-1) unstable; urgency=medium
 
   * New upstream version 2.0.7
diff -Nru lxcfs-2.0.7/debian/patches/revert-the-virtualization-of-btime-field.patch lxcfs-2.0.7/debian/patches/revert-the-virtualization-of-btime-field.patch
--- lxcfs-2.0.7/debian/patches/revert-the-virtualization-of-btime-field.patch	1970-01-01 01:00:00.000000000 +0100
+++ lxcfs-2.0.7/debian/patches/revert-the-virtualization-of-btime-field.patch	2018-10-04 16:23:15.000000000 +0200
@@ -0,0 +1,34 @@
+From 72dd97f7ecfa1e118f4b33b3d694694fcf6fd120 Mon Sep 17 00:00:00 2001
+From: Serge Hallyn <se...@hallyn.com>
+Date: Sun, 18 Jun 2017 14:43:22 -0500
+Subject: [PATCH 1/2] (temporarily?) revert the virtualization of btime field
+ in /proc/stat
+
+Closes #189
+
+This seems to be responsible for corrupting STIME on processlist
+inside containers.  Hopefully we can find a reasonable way to fix
+both, but compared to unvirtualized btime field, bogus STIME field
+is the greater evil here.
+
+Signed-off-by: Serge Hallyn <se...@hallyn.com>
+---
+ bindings.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+Index: lxcfs-2.0.7/bindings.c
+===================================================================
+--- lxcfs-2.0.7.orig/bindings.c
++++ lxcfs-2.0.7/bindings.c
+@@ -3538,10 +3538,7 @@ static int proc_stat_read(char *buf, siz
+ 			continue;
+ 		if (sscanf(line, "cpu%9[^ ]", cpu_char) != 1) {
+ 			/* not a ^cpuN line containing a number N, just print it */
+-			if (strncmp(line, "btime", 5) == 0)
+-				l = snprintf(cache, cache_size, "btime %ld\n", getreaperctime(fc->pid));
+-			else
+-				l = snprintf(cache, cache_size, "%s", line);
++			l = snprintf(cache, cache_size, "%s", line);
+ 			if (l < 0) {
+ 				perror("Error writing to cache");
+ 				rv = 0;
diff -Nru lxcfs-2.0.7/debian/patches/series lxcfs-2.0.7/debian/patches/series
--- lxcfs-2.0.7/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ lxcfs-2.0.7/debian/patches/series	2018-10-04 16:23:15.000000000 +0200
@@ -0,0 +1 @@
+revert-the-virtualization-of-btime-field.patch

Reply via email to