kaniporivalan
kaniporivalan

Reputation: 21

How to debug this issue. chrt: failed to set pid 14490's policy: Operation not permitted

chrt -p 14490
pid 14490's current scheduling policy: SCHED_OTHER
pid 14490's current scheduling priority: 0`

I am trying to change the the scheduling priority of this process to SCHED_RR using the below command and running into the following error.

chrt -r -p 25 14490
chrt: failed to set pid 14490's policy: Operation not permitted

How can I debug why this is failing ?

Upvotes: 2

Views: 2020

Answers (1)

paulsm4
paulsm4

Reputation: 121809

You failed to specify your Linux version... ... but here are a few options:

https://unix.stackexchange.com/questions/114643/chrt-failed-to-set-pid-xxxs-policy-on-one-machine-but-not-others

sysctl -w kernel.sched_rt_runtime_us=-1

https://lists.opensuse.org/opensuse-security/2011-04/msg00015.html

... and ...

https://www.linuxquestions.org/questions/slackware-14/chrt-from-shell-scripts-operation-not-permitted-4175590174/

I tested on a virtualized slackware 14.2. No error. I upgraded to util-linux-2.28.2 from current and then I had that error.

Upstream commit: https://github.com/karelzak/util-lin...ec919bec94089f

Marking thread as solved.

In other words:

  • You can try sysctl -w kernel.sched_rt_runtime_us=-1
  • But there are at least two reported instances where this was a bug: in slackware, and in util-linux. The solution in both cases was to update the Linux version.

Upvotes: 1

Related Questions