Skip to content

bundled runc binary shows incorrect version #10553

@thaJeztah

Description

@thaJeztah

Description

I noticed this in docker's containerd.io packages after we switched to packaging containerd 1.7 (see docker/docker-ce-packaging#1044 (comment)), but it looks like current containerd 1.6 packages have the same issue; I still need to dig deeper where the regression point is; it's possible both our scripts and containerd's scripts have the same issue, or that changes in upstream runc led to this change.

I suspect that both containerd and runc use a VERSION env-var or makefile var to set the version to use for the binaries at compile-time, and that this env-var leaks through, resulting in runc using containerd's version as version.

Steps to reproduce the issue

Download and extract a release, and check the output of runc --version

Describe the results you received and expected

The runc version shows the version of containerd, not runc;

curl -fsSLO https://github.com/containerd/containerd/releases/download/v1.7.20/cri-containerd-1.7.20-linux-arm64.tar.gz
tar -xvzf cri-containerd-1.7.20-linux-arm64.tar.gz
# ...
./usr/local/sbin/runc --version
runc version v1.7.20
commit: v1.1.13-0-g58aa9203
spec: 1.0.2-dev
go: go1.21.12
libseccomp: 2.5.5

I expected the runc binary to show the version of runc;

./usr/local/sbin/runc --version
runc version v1.1.13
commit: v1.1.13-0-g58aa9203
spec: 1.0.2-dev
go: go1.21.12
libseccomp: 2.5.5

What version of containerd are you using?

containerd github.com/containerd/containerd v1.7.20 8fc6bcf

Any other relevant information

It looks like the 1.6 packages have the same issue; regression looks to be between v1.6.33 and v1.6.34;

Packages of containerd v1.6.33 show the correct version;

curl -fsSLO https://github.com/containerd/containerd/releases/download/v1.6.33/cri-containerd-1.6.33-linux-arm64.tar.gz
tar -xvzf cri-containerd-1.6.33-linux-arm64.tar.gz
# ...
./usr/local/sbin/runc --version
runc version 1.1.12
commit: v1.1.12-0-g51d5e946
spec: 1.0.2-dev
go: go1.21.11
libseccomp: 2.5.5

Packages of containerd v1.6.34 show the incorrect version;

curl -fsSLO https://github.com/containerd/containerd/releases/download/v1.6.34/cri-containerd-1.6.34-linux-arm64.tar.gz
tar -xvzf cri-containerd-1.6.34-linux-arm64.tar.gz
# ...
runc version v1.6.34
commit: v1.1.13-0-g58aa9203
spec: 1.0.2-dev
go: go1.21.12
libseccomp: 2.5.5

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions