[Bug 2065964] Re: test-execute fails because of apparmor unprivileged userns restrictions
Ćukasz Zemczak
2065964 at bugs.launchpad.net
Wed May 22 09:46:15 UTC 2024
Hello Nick, or anyone else affected,
Accepted systemd into noble-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/systemd/255.4-1ubuntu8.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-
noble to verification-done-noble. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-noble. 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: systemd (Ubuntu Noble)
Status: In Progress => Fix Committed
** Tags added: verification-needed verification-needed-noble
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2065964
Title:
test-execute fails because of apparmor unprivileged userns
restrictions
Status in systemd package in Ubuntu:
Fix Committed
Status in systemd source package in Noble:
Fix Committed
Bug description:
[Impact]
unit-tests in noble currently fails because test-execute fails with
the following:
1633s exec-basic.service: Child 1934 belongs to exec-basic.service.
1633s exec-basic.service: Control process exited, code=exited, status=0/SUCCESS (success)
1633s exec-basic.service: Got final SIGCHLD for state start-post.
1633s exec-basic.service: Deactivated successfully.
1633s exec-basic.service: Service will not restart (restart setting)
1633s exec-basic.service: Changed start-post -> dead
1633s exec-basic.service: Consumed 49ms CPU time.
1633s Spawning process to nuke '/tmp/systemd-private-dbf1f9a2e08f4741900f145a35ce7e30-exec-basic.service-ItwK5c'
1633s Successfully forked off intermediary '(sd-rmrf)' as PID 1936.
1633s Spawning process to nuke '/var/tmp/systemd-private-dbf1f9a2e08f4741900f145a35ce7e30-exec-basic.service-V50z4Q'
1633s Successfully forked off intermediary '(sd-rmrf)' as PID 1937.
1633s src/test/test-execute.c:1121:test_exec_basic: exec-basic.service: can_unshare=no: exit status 0, expected 226
1633s Skipping PR_SET_MM, as we don't have privileges.
1633s Skipping PR_SET_MM, as we don't have privileges.
1633s (test-execute-unprivileged) terminated by signal ABRT.
1633s Assertion 'r >= 0' failed at src/test/test-execute.c:1412, function prepare_ns(). Aborting.
1633s
[...]
1678s [1mOK: 288 SKIP: 6 FAIL: 1[0m
1679s autopkgtest [20:59:40]: test unit-tests: -----------------------]
1679s autopkgtest [20:59:40]: test unit-tests: - - - - - - - - - - results - - - - - - - - - -
1679s unit-tests FAIL non-zero exit status 1
This is because some tests in test-execute run unprivileged, and try
to user user namespaces. I fixed this upstream[1], so just backport
the patch so that this test case no longer fails.
[Test Plan]
This only pertains to the unit-tests autopkgtest in systemd. Just
check the result of the autopkgtest run.
[Where problems could occur]
This only changes the test-execute code to skip tests that require
unprivileged userns whenever
kernel.apparmor_restrict_unprivileged_userns=1. Hence, any problems
would be limited to that test case within unit-tests.
[Other information]
Note that the upstream-2 test still has regular failures which need to
be investigated, so this change will not get the systemd autopkgtests
back to green. Since I already fixed this upstream, it is easy to
backport, so it's worth making the incremental improvement for now.
[1]
https://github.com/systemd/systemd/commit/70aece819311f7ab76abdf473bc8f316c5bc58c6
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2065964/+subscriptions
More information about the foundations-bugs
mailing list