Query on libpam-systemd

pavi1729 pavitra1729 at gmail.com
Wed Jan 27 12:18:14 UTC 2016


Hi,
  I have an issue with libpam-systemd which is interfering with
scheduler settings on my machine. Details as below


CODE:

   param.sched_priority = sched_get_priority_max(SCHED_FIFO);
   printf("priority %d \n", param.sched_priority);

   ret1 = sched_setscheduler(getpid(), SCHED_FIFO, &param);
   printf("sched_setscheduler ret %d \n", ret1);
   if(ret1 == -1){
       perror("sched_setscheduler");
       goto fail;
   }


I get EPERM @ sched_setscheduler(564, SCHED_FIFO, { 99 }) = -1 EPERM
(Operation not permitted)

QUESTION : Why should the root user get EPERM ??

--------------------------------------------------------------------------
File: linux/kernel/sched/core.c

PASS CASE : Without libpam-systemd installed, I get the below values

[   36.278241] rt_bandwidth_enabled(): 1
[   36.281977] rt_policy(policy) : 1
[   36.285367] task_group_is_autogroup(task_group(p)) : 0
[   36.289883] task_group(p)->rt_bandwidth.rt_runtime : 950000000

FAIL CASE: With libpam-systemd installed, I get the below values

[ 2096.713855] rt_bandwidth_enabled(): 1
[ 2096.717871] rt_policy(policy) : 1
[ 2096.721408] task_group_is_autogroup(task_group(p)) : 0
[ 2096.726180] task_group(p)->rt_bandwidth.rt_runtime: 0


QUESTION: Why is libpam-systemd changing rt_runtime ??

--------------------------------------------------------------------------

OTHER DETAILS

root at pavi:/home/pavi# uname -a
Linux pavi 3.18.21-tegra-g4c8a53e-dirty #43 SMP PREEMPT Fri Dec 18
14:56:40 IST 2015 aarch64 aarch64 aarch64 GNU/Linux


root at pavi:/home/pavi# cat /etc/os-release
NAME="Ubuntu"
VERSION="15.04 (Vivid Vervet)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.04"
VERSION_ID="15.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"


I have all the details added to stackoverflow @
http://stackoverflow.com/questions/34018956/sched-setscheduler-error-eperm-after-installing-libpam-systemd

Would really appreciate some help on this as I don't have any
expertise on systemd

Cheers,
Pavi




More information about the Ubuntu-devel-discuss mailing list