Skip to content

tests: test_exec_ioschedulingclass: exec-ioschedulingclass-none.service: exit status 1, expected 0 #21087

Closed

Description

@iam-TJ

systemd version the issue has been seen with
v249* (and others)

Used distribution
Debian 11 Bullseye

Linux kernel version used (uname -a)
Linux systemd-builder 5.15.0-rc6-soggy-00004-gfb2264f46ac0-dirty #15 SMP PREEMPT Mon Oct 18 16:02:04 BST 2021 x86_64 x86_64 x86_64 GNU/Linux

Kernel Command line
using systemd.unified_cgroup_hierarchy=1

CPU architecture issue was seen on
amd64

Expected behaviour you didn't see
Complete the tests or skip them

Unexpected behaviour you saw

...
src/test/test-execute.c:787:test_exec_ioschedulingclass: exec-ioschedulingclass-none.service: exit status 1, expected 0
...
Ok:                  884
Expected Fail:         0
Fail:                  1
Unexpected Pass:       0
Skipped:               9
Timeout:               0

Steps to reproduce the problem
Build inside an unprivileged nspawn container

Additional program output to the terminal or log subsystem illustrating the issue

514/894 test-execute                            FAIL    31.51 s (killed by signal 6 SIGABRT)
...
exec-ioschedulingclass-none.service: Passing 0 fds to service
exec-ioschedulingclass-none.service: About to execute /bin/sh -x -c 'c=$$(LC_ALL=C ionice); test "$${c%:*}" = "none"'
exec-ioschedulingclass-none.service: Forked /bin/sh as 27384
exec-ioschedulingclass-none.service: Changed dead -> start
PR_SET_MM_ARG_START failed: Operation not permitted
Received SIGCHLD from PID 27384 (sh).
Child 27384 (sh) died (code=exited, status=1/FAILURE)
exec-ioschedulingclass-none.service: Failed to read oom_kill field of memory.events cgroup attribute: No such file or directory
exec-ioschedulingclass-none.service: Child 27384 belongs to exec-ioschedulingclass-none.service.
exec-ioschedulingclass-none.service: Main process exited, code=exited, status=1/FAILURE
exec-ioschedulingclass-none.service: Failed with result 'exit-code'.
exec-ioschedulingclass-none.service: Service will not restart (restart setting)
exec-ioschedulingclass-none.service: Changed start -> failed
exec-ioschedulingclass-none.service: Unit entered failed state.
src/test/test-execute.c:787:test_exec_ioschedulingclass: exec-ioschedulingclass-none.service: exit status 1, expected 0
…

I wonder if the calling function src/test/test-execute.c::test_exec_ioschedulingclass() needs to wrap these tests in the detect_container() clause, or add an additional detection for unprivileged containers?

static void test_exec_ioschedulingclass(Manager *m) {
        test(m, "exec-ioschedulingclass-none.service", 0, CLD_EXITED);
        test(m, "exec-ioschedulingclass-idle.service", 0, CLD_EXITED);
        test(m, "exec-ioschedulingclass-best-effort.service", 0, CLD_EXITED);

        if (detect_container() > 0) {
                log_notice("Testing in container, skipping remaining tests in %s", __func__);
                return;
        }
        test(m, "exec-ioschedulingclass-realtime.service", 0, CLD_EXITED);
}

Activity

  1. added
    bug 🐛
    on Oct 24, 2021
  2. poettering commented on Oct 26, 2021

    @poettering
    Member

    I think that's a kernel incompatibility, i.e. IOPRIO_CLASS_NONE vs. IOPRIO_CLASS_BE handling.

    Can you reproduce this on a release kernel? or just the rc one?

  3. poettering commented on Oct 26, 2021

    @poettering
    Member

    I figure this is caused by torvalds/linux@e70344c and related commits. It has nothing to do with containers, those changes simply broke kernel API: we validate that what we set is also what is reported, but suddenly we set one thing but when we query it again something else is returned. i.e. IOPRIO_CLASS_NONE is set, and IOPRIO_CLASS_BE is reported...

    /cc @axboe

  4. mrc0mmand commented on Nov 18, 2021

    @mrc0mmand
    Member

    Just hit it when I was trying to update the Arch CentOS CI image:

    exec-ioschedulingclass-none.service: Passing 0 fds to service
    exec-ioschedulingclass-none.service: About to execute /bin/sh -x -c "c=\$\$(LC_ALL=C ionice); test \"\$\${c%:*}\" = \"none\""
    exec-ioschedulingclass-none.service: Forked /bin/sh as 8093
    exec-ioschedulingclass-none.service: Changed dead -> start
    exec-inaccessiblepaths-mount-propagation.service: Control group is empty.
    Received SIGCHLD from PID 8093 (3).
    Child 8093 (3) died (code=exited, status=1/FAILURE)
    exec-ioschedulingclass-none.service: Child 8093 belongs to exec-ioschedulingclass-none.service.
    exec-ioschedulingclass-none.service: Main process exited, code=exited, status=1/FAILURE
    exec-ioschedulingclass-none.service: Failed with result 'exit-code'.
    exec-ioschedulingclass-none.service: Service will not restart (restart setting)
    exec-ioschedulingclass-none.service: Changed start -> failed
    exec-ioschedulingclass-none.service: Unit entered failed state.
    src/test/test-execute.c:1068:test_exec_ioschedulingclass: exec-ioschedulingclass-none.service: can_unshare=no: exit status 1, expected 0
    
    linux 5.15.2.arch1-1
    linux-api-headers 5.12.3-1
    linux-headers 5.15.2.arch1-1
    
  5. bluca commented on Nov 25, 2021

    @bluca
    Member

    Fixed by #21503

  6. added this to the v250 milestone on Nov 25, 2021
  7. linked a pull request that will close this issuework around linux 5.15 ioprio API breakage #21503on Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛ci-blocker 🚧kernel-api-breakagetests

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions