opencontainers / runc

CLI tool for spawning and running containers according to the OCI specification
https://www.opencontainers.org/
Apache License 2.0
11.58k stars 2.06k forks source link

[1.1] libct/system: ClearRlimitNofileCache for go 1.23 #4299

Closed kolyshkin closed 3 weeks ago

kolyshkin commented 1 month ago

This is a backport of #4290 to release-1.1 branch.


Go 1.23 tightens access to internal symbols, and even puts runc into "hall of shame" for using an internal symbol (recently added by commit da68c8e3). So, while not impossible, it becomes harder to access those internal symbols, and it is a bad idea in general.

Since Go 1.23 includes https://go.dev/cl/588076, we can clean the internal rlimit cache by setting the RLIMIT_NOFILE for ourselves, essentially disabling the rlimit cache.

Once Go 1.22 is no longer supported, we will remove the go:linkname hack.

(cherry picked from commit 584afc675650e87ecc443896f56aed27a0064dc0) Signed-off-by: Kir Kolyshkin kolyshkin@gmail.com

lifubang commented 1 month ago

Needs #4291

lifubang commented 1 month ago

Needs #4291

Opened #4300

kolyshkin commented 1 month ago

will rebase once #4300 is merged

kolyshkin commented 4 weeks ago

Rebased. CentOS Stream 8 CI failure is expected (#4302)

lifubang commented 4 weeks ago

Sorry, I should do a rebase, but not merge. Please help to do a rebase. @kolyshkin

kolyshkin commented 3 weeks ago

Sorry, I should do a rebase, but not merge. Please help to do a rebase. @kolyshkin

Should be fixed now.

Note the DCO check is still failing, there's a open bug about it (https://github.com/dcoapp/app/issues/211)

kolyshkin commented 3 weeks ago

Ah, DCO appears to work now, good.