Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-144017

Default slice units result in EPERM for processes calling sched_setscheduler.

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • None
    • rhel-8.10
    • systemd
    • None
    • Yes
    • Moderate
    • rhel-systemd
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Since version "systemd-239-82.el8_10.8.x86_64", running a command that calls "sched_setscheduler", like "chrt -r 1 ls", will fail with an EPERM:

      chrt: failed to set pid 0's policy: Operation not permitted
      

      Stracing the process:

      35656 08:05:06.230437 sched_setscheduler(0, SCHED_RR, [1]) = -1 EPERM (Operation not permitted) <0.000026> 

      The issue seems to have been introduced by the patches from RHEL-9322.

      From the current version where the issue happens:

       

      [root@localhost ~]# grep cpu /proc/self/cgroup 
      5:cpuset:/
      3:cpu,cpuacct:/user.slice

      Previous version (systemd-239-82.el8_10.5.x86_64):

       

      [root@localhost ~]# grep cpu /proc/self/cgroup
      7:cpu,cpuacct:/
      6:cpuset:/

      What is the impact of this issue to you?

      Customer reported the inability to use the chrt command.

      Please provide the package NVR for which the bug is seen:

      systemd-239-82.el8_10.8.x86_64 / systemd-239-82.el8_10.13.x86_64

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Update from "systemd-239-82.el8_10.5.x86_64" to "systemd-239-82.el8_10.8.x86_64" or higher.
      2. Run a command that uses sched_setscheduler. In this example "chrt -r 1 ls".

              systemd-maint systemd maint mailing list
              rhn-support-jeperez Jesus Perez
              systemd maint mailing list systemd maint mailing list
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: