FTBFS with golang-1.21: TestGenerateApparmorSpecOpts fails

Bug #2032754 reported by Shengjing Zhu
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
containerd-app (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Committed
Undecided
Unassigned
Jammy
Fix Committed
Undecided
Unassigned

Bug Description

[Impact]
This bug was never present in jammy or focal, but they have tasks here due to an SRU[1] that is backporting 1.7.12 to these releases.

The 1.7.12 backports need golang 1.21, and that would introduce this FTBFS bug in those releases without the patch. Therefore the bug is referenced in the changes file and in d/changelog, and will be closed once the upload is accepted and released. So it's best to explain here what is going on.

[Test plan]

The test plan is to verify that:
a) golang-1.21 was used for the package build
b) the build succeeded

[Where problems could occur]
The fix is a bit of a workaround, and upstream also remarked[2] that eventually the tests should be changed to not need "go:noinline", but in the end these are just test fixes.

1. https://bugs.launchpad.net/ubuntu/+source/docker.io-app/+bug/2040460
2. https://github.com/containerd/containerd/pull/8957#issuecomment-1678829933

[ Other info ]

Not at this time.

[Original description]

https://launchpadlibrarian.net/678987210/buildlog_ubuntu-mantic-amd64.containerd-app_1.7.2-0ubuntu2_BUILDING.txt.gz

--- FAIL: TestGenerateSeccompSecurityProfileSpecOpts (0.00s)
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/sp_should_set_default_seccomp_when_seccomp_is_runtime/default (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x26dcae0
                          actual : 0x26dbb20
             Test: TestGenerateSeccompSecurityProfileSpecOpts/sp_should_set_default_seccomp_when_seccomp_is_runtime/default
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/should_set_specified_profile_when_local_profile_is_specified (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x2690120
                          actual : 0x261f040
             Test: TestGenerateSeccompSecurityProfileSpecOpts/should_set_specified_profile_when_local_profile_is_specified
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/should_use_default_profile_when_seccomp_is_empty (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x268fd40
                          actual : 0x261f040
             Test: TestGenerateSeccompSecurityProfileSpecOpts/should_use_default_profile_when_seccomp_is_empty
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/sp_should_set_specified_profile_when_local_profile_is_specified (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x268f960
                          actual : 0x261f040
             Test: TestGenerateSeccompSecurityProfileSpecOpts/sp_should_set_specified_profile_when_local_profile_is_specified
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/sp_should_set_specified_profile_when_local_profile_is_specified_even_without_prefix (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x268f580
                          actual : 0x261f040
             Test: TestGenerateSeccompSecurityProfileSpecOpts/sp_should_set_specified_profile_when_local_profile_is_specified_even_without_prefix
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/should_set_default_seccomp_when_seccomp_is_runtime/default (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x26dc7e0
                          actual : 0x26dbb20
             Test: TestGenerateSeccompSecurityProfileSpecOpts/should_set_default_seccomp_when_seccomp_is_runtime/default
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/should_fallback_to_docker/default_when_seccomp_is_empty_and_default_is_runtime/default (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x26dc9e0
                          actual : 0x26dbb20
             Test: TestGenerateSeccompSecurityProfileSpecOpts/should_fallback_to_docker/default_when_seccomp_is_empty_and_default_is_runtime/default
    --- FAIL: TestGenerateSeccompSecurityProfileSpecOpts/should_set_default_seccomp_when_seccomp_is_docker/default (0.00s)
        container_create_linux_test.go:946:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:946
             Error: Not equal:
                          expected: 0x26dc8e0
                          actual : 0x26dbb20
             Test: TestGenerateSeccompSecurityProfileSpecOpts/should_set_default_seccomp_when_seccomp_is_docker/default
--- FAIL: TestGenerateApparmorSpecOpts (0.00s)
    --- FAIL: TestGenerateApparmorSpecOpts/should_set_default_apparmor_when_apparmor_is_not_specified (0.00s)
        container_create_linux_test.go:1095:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:1095
             Error: Not equal:
                          expected: 0x2692140
                          actual : 0x261faa0
             Test: TestGenerateApparmorSpecOpts/should_set_default_apparmor_when_apparmor_is_not_specified
    --- FAIL: TestGenerateApparmorSpecOpts/should_set_default_apparmor_when_apparmor_is_runtime/default (0.00s)
        container_create_linux_test.go:1095:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:1095
             Error: Not equal:
                          expected: 0x2692000
                          actual : 0x261faa0
             Test: TestGenerateApparmorSpecOpts/should_set_default_apparmor_when_apparmor_is_runtime/default
    --- FAIL: TestGenerateApparmorSpecOpts/sp_should_set_default_apparmor_when_apparmor_is_runtime/default (0.00s)
        container_create_linux_test.go:1095:
             Error Trace: /<<PKGBUILDDIR>>/.gopath/src/github.com/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:1095
             Error: Not equal:
                          expected: 0x2691ec0
                          actual : 0x261faa0
             Test: TestGenerateApparmorSpecOpts/sp_should_set_default_apparmor_when_apparmor_is_runtime/default

It has been fixed in https://github.com/containerd/containerd/commit/0f043ae4

Shengjing Zhu (zhsj)
tags: added: ftbfs
Revision history for this message
Shengjing Zhu (zhsj) wrote :
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package containerd-app - 1.7.2-0ubuntu2

---------------
containerd-app (1.7.2-0ubuntu2) mantic; urgency=medium

  * Drop patches for -dev packages
    + 0004-disable-windows-support-in-ctr-metric.patch
    + 0005-Revert-Use-insecure.NewCredentials-instead-of-grpc.W.patch
  * Backport patch for Go1.21 (LP: #2032754)
    + 0007-seccomp-apparmor-add-go-noinline.patch

 -- Shengjing Zhu <email address hidden> Wed, 23 Aug 2023 15:04:29 +0800

Changed in containerd-app (Ubuntu):
status: New → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is missing the SRU template, and a clear indication of which ubuntu releases are affected. I see the bug referred to in the changes file of the jammy upload, so that task I'm adding myself.

description: updated
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello Shengjing, or anyone else affected,

Accepted containerd-app into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/containerd-app/1.7.12-0ubuntu2~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in containerd-app (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Changed in containerd-app (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Shengjing, or anyone else affected,

Accepted containerd-app into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/containerd-app/1.7.12-0ubuntu2~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (containerd-app/1.7.12-0ubuntu2~20.04.1)

All autopkgtests for the newly accepted containerd-app (1.7.12-0ubuntu2~20.04.1) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

docker.io-app/unknown (s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#containerd-app

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (containerd-app/1.7.12-0ubuntu2~22.04.1)

All autopkgtests for the newly accepted containerd-app (1.7.12-0ubuntu2~22.04.1) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

docker.io-app/24.0.5-0ubuntu1~22.04.1 (ppc64el)
docker.io-app/unknown (s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#containerd-app

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.