Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto: namespace conflict with letsencrypt #94

Closed
rst0git opened this issue Sep 7, 2022 · 0 comments · Fixed by #95
Closed

proto: namespace conflict with letsencrypt #94

rst0git opened this issue Sep 7, 2022 · 0 comments · Fixed by #95

Comments

@rst0git
Copy link
Member

rst0git commented Sep 7, 2022

Unfortunately #90 did not resolve the problem with conflicting proto file names. Since protobuf v1.26.0 a hard error will be reported when the compiled Go program starts up that has multiple conflicting protobuf names linked into it.

Steps to reproduce the issue:

  1. git clone -b go-criu/v6 git@github.com:rst0git/libpod.git
  2. cd libpod && make -j `nproc` && sudo make test

Describe the results you received:
The tests fail with the following error:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict


goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

Ginkgo ran 1 suite in 2m10.452270337s
Test Suite Failed

I can confirm that the initial solution renaming core.proto / so.proto files to criu-core.proto / criu-so.proto works as expected.

rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

FIXES: checkpoint-restore#94

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Co-developed-by: Prajwal S N <prajwalnadig21@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Co-developed-by: Prajwal S N <prajwalnadig21@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
This reverts commit 2b00a6d.

The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Co-developed-by: Prajwal S N <prajwalnadig21@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
This reverts commit 2b00a6d.

The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Co-developed-by: Prajwal S N <prajwalnadig21@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/go-criu that referenced this issue Sep 7, 2022
The core.proto and so.proto files provided by criu have conflicting
names with the proto files included in

https://github.com/letsencrypt/boulder

Since protobuf v1.26.0 a hard error is reported when a compiled Go
program starts up that has multiple conflicting protobuf names
linked into it. This results in the following error when running
the podman tests:

panic: proto: file "sa.proto" is already registered
	previously from: "github.com/letsencrypt/boulder/sa/proto"
	currently from:  "github.com/checkpoint-restore/go-criu/v6/crit/images"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1b0b380?, 0xc0004ce240?}, {0x1b0b380?, 0xc0004ce280})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001a8678, {0x1b204c8?, 0xc0000fc000?})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:130 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x1b10fd0, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filedesc/build.go:112 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x153c2e0, 0x34}, {0x25a1a80, 0x100, 0x100}, 0x0, 0x1, 0x0, 0x0, {0x0, ...}, ...}, ...})
	/home/rst/tmp/libpod/vendor/google.golang.org/protobuf/internal/filetype/build.go:138 +0x19d
github.com/checkpoint-restore/go-criu/v6/crit/images.file_sa_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/sa.pb.go:190 +0x198
github.com/checkpoint-restore/go-criu/v6/crit/images.file_core_proto_init()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1109 +0x6f
github.com/checkpoint-restore/go-criu/v6/crit/images.init.12()
	/home/rst/tmp/libpod/vendor/github.com/checkpoint-restore/go-criu/v6/crit/images/core.pb.go:1095 +0x17
path is /home/rst/tmp/libpod/.coverage
Unable to read coverage file cmd/podman/coverprofile to combine, open cmd/podman/coverprofile: no such file or directory

This patch fixes this error by prepending the `criu-` prefix to
core.proto and so.proto.

Fixes: checkpoint-restore#94

Co-developed-by: Prajwal S N <prajwalnadig21@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
snprajwal added a commit to snprajwal/runc that referenced this issue Sep 17, 2022
This minor version fixes protobuf namespace conflicts
between go-criu and https://github.com/letsencrypt/boulder
(See checkpoint-restore/go-criu#94
for details).

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant