diff --git a/git-commit b/git-commit index 7a322b21b469f2faaf2dac7cfd0b0ac260f78d0c..e3e96b15200f4c98cb2816c6c17df452c3377f54 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -a8c0a5b09ea02b2003bd2e4940deef5142170dd2 +f4b256352252b0f4f90443c3da5ebc7ed22d52aa diff --git a/patch/0150-runc-freezer-add-delay-after-freeze.patch b/patch/0150-runc-freezer-add-delay-after-freeze.patch new file mode 100644 index 0000000000000000000000000000000000000000..2c9b149d5073a2e03eb8f68da076b1b03ca02e98 --- /dev/null +++ b/patch/0150-runc-freezer-add-delay-after-freeze.patch @@ -0,0 +1,54 @@ +From f128e6e6c63a45543d833b8a4db5e691cfa0a0cc Mon Sep 17 00:00:00 2001 +From: Lu Jingxiao +Date: Thu, 14 Sep 2023 11:44:43 +0800 +Subject: [PATCH] [Huawei] freezer: add delay after freeze + +reason: add delay after freeze and add a debug print. +backport from upstream manually with: + +Conflict:NA +Reference: +https://github.com/opencontainers/runc/commit/524abc59f46373a175b97bd07c4c7eccf5594cc6 +https://github.com/opencontainers/runc/commit/d1007b08a33ae63bb695fcb3244300c9bba2658a + +--- + libcontainer/cgroups/fs/freezer.go | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/libcontainer/cgroups/fs/freezer.go b/libcontainer/cgroups/fs/freezer.go +index 40f70c13..181caad1 100644 +--- a/libcontainer/cgroups/fs/freezer.go ++++ b/libcontainer/cgroups/fs/freezer.go +@@ -8,6 +8,7 @@ import ( + "strings" + "time" + ++ "github.com/Sirupsen/logrus" + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/configs" + ) +@@ -42,11 +43,21 @@ func (s *FreezerGroup) Set(path string, cgroup *configs.Cgroup) error { + if err := writeFile(path, "freezer.state", string(configs.Frozen)); err != nil { + return err + } ++ if i%25 == 24 { ++ // Occasional short sleep before reading ++ // the state back also improves the chances to ++ // succeed in freezing in case of a very slow ++ // system. ++ time.Sleep(10 * time.Microsecond) ++ } + state, err := readFile(path, "freezer.state") + if err != nil { + return err + } + if strings.TrimSpace(state) == string(configs.Frozen) { ++ if i > 1 { ++ logrus.Debugf("frozen after %d retries", i) ++ } + return nil + } + time.Sleep(1 * time.Millisecond) +-- +2.23.0 + diff --git a/runc.spec b/runc.spec index c4886aa5b760afb9b652fa97f1726e030526fa76..d473f2d043abe06b1e84ad351e9e2c1845dfdaf2 100644 --- a/runc.spec +++ b/runc.spec @@ -4,7 +4,7 @@ Name: docker-runc Version: 1.0.0.rc3 -Release: 313 +Release: 314 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -57,6 +57,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Thu Oct 12 2023 zhongjiawei - 1.0.0.rc3-314 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:freezer add delay after freeze + * Mon Sep 18 2023 zhongjiawei - 1.0.0.rc3-313 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 4c3276aa070e42e3cb5c3916614dccb2f16a589a..d390ec49a04176d1a86ed76ea9ac707cfaa562e2 100644 --- a/series.conf +++ b/series.conf @@ -149,4 +149,5 @@ patch/0146-runc-enable-cpuset-preferred-by-proc-sys-kernel-sche.patch patch/0147-runc-ingore-error-when-force-deleting-a-non-exist-cont.patch patch/0148-runc-delete-invalid-cgroupinfo-logs.patch patch/0149-runc-libct-init-unify-init-fix-its-error-logic.patch +patch/0150-runc-freezer-add-delay-after-freeze.patch #end