Skip to contentSkip to conversation

lxc: temporary workaround for gcc 7 issue

PATCH In review Mark Asselstine 2 participants 2 messages Jun 15, 2017 – Jun 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lxc: temporary workaround for gcc 7 issue

gcc 7 has a bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11672
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969

In order to avoid the build failure that this causes we reduce the range by one. Better to have a slight reduction in the range than having nobody to be able to build and use lxc.

Once gcc is fixed this can be reverted.

---
 .../files/cgroups-work-around-issue-in-gcc-7.patch | 34 ++++++++++++++++++++++
 recipes-containers/lxc/lxc_2.0.8.bb                |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 recipes-containers/lxc/files/cgroups-work-around-issue-in-gcc-7.patch
recipes-containers/lxc/files/cgroups-work-around-issue-in-gcc-7.patch new file +34 -0
new file mode 100644
index 0000000..90740fb
@@ -0,0 +1,34 @@
+From 58a2d817a82100d287c60c63315d81445cdba3f9 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Thu, 15 Jun 2017 15:12:08 -0400
+Subject: [PATCH] cgroups: work around issue in gcc 7
+
+This works around
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=11672
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969
+
+By removing a single cgroup entry. For the majority of usecases this
+loss of a single entry should not be an issue and once gcc 7 is fixed
+we can revert this.
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ src/lxc/cgroups/cgfsng.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
+index ebd548b..c520abd 100644
+--- a/src/lxc/cgroups/cgfsng.c
++++ b/src/lxc/cgroups/cgfsng.c
+@@ -1373,7 +1373,7 @@ static inline bool cgfsng_create(void *hdata)
+ 	offset = cgname + len - 5;
+ 
+ again:
+-	if (idx == 1000) {
++	if (idx == 999) {
+ 		ERROR("Too many conflicting cgroup names");
+ 		goto out_free;
+ 	}
+-- 
+2.7.4
+
recipes-containers/lxc/lxc_2.0.8.bb +1 -0
index 80c8da7..3dd9f63 100644
@@ -28,6 +28,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
 	file://lxc-fix-B-S.patch \
 	file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
 	file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
+	file://cgroups-work-around-issue-in-gcc-7.patch \
 	"
 
 SRC_URI[md5sum] = "7bfd95280522d7936c0979dfea92cdb5"
Signature · 1 line
2.7.4
#1 lore raw

merged.

Bruce

Quoted 85 lines · Mark Asselstine

gcc 7 has a bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11672
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969

In order to avoid the build failure that this causes we reduce the range by one. Better to have a slight reduction in the range than having nobody to be able to build and use lxc.

Once gcc is fixed this can be reverted.

---
 .../files/cgroups-work-around-issue-in-gcc-7.patch | 34
++++++++++++++++++++++
 recipes-containers/lxc/lxc_2.0.8.bb                |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 recipes-containers/lxc/files/

cgroups-work-around-issue-in-gcc-7.patch

recipes-containers/lxc/files/cgroups-work-around- new file +0 -0
new file mode 100644
index 0000000..90740fb

issue-in-gcc-7.patch

recipes-containers/lxc/files/cgroups-work-around- new file +34 -0
@@ -0,0 +1,34 @@
+From 58a2d817a82100d287c60c63315d81445cdba3f9 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Thu, 15 Jun 2017 15:12:08 -0400
+Subject: [PATCH] cgroups: work around issue in gcc 7
+
+This works around
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=11672
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969
+
+By removing a single cgroup entry. For the majority of usecases this
+loss of a single entry should not be an issue and once gcc 7 is fixed
+we can revert this.
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ src/lxc/cgroups/cgfsng.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
+index ebd548b..c520abd 100644
+--- a/src/lxc/cgroups/cgfsng.c
++++ b/src/lxc/cgroups/cgfsng.c
+@@ -1373,7 +1373,7 @@ static inline bool cgfsng_create(void *hdata)
+       offset = cgname + len - 5;
+
+ again:
+-      if (idx == 1000) {
++      if (idx == 999) {
+               ERROR("Too many conflicting cgroup names");
+               goto out_free;
+       }
+--
+2.7.4
+
recipes-containers/lxc/ renamed from recipes-containers/lxc/lxc_2.0.8.bb +0 -0

lxc_2.0.8.bb
index 80c8da7..3dd9f63 100644

recipes-containers/lxc/lxc_2.0.8.bb +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "http://linuxcontainers.org/
 downloads/${BPN}-${PV}.tar.gz \
        file://lxc-fix-B-S.patch \
        file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
        file://logs-optionally-use-base-filenames-to-report-src-fil.patch
 \
+       file://cgroups-work-around-issue-in-gcc-7.patch \
        "

SRC_URI[md5sum] = "7bfd95280522d7936c0979dfea92cdb5"
--
2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"