You are not logged in.

#1 2016-12-08 15:50:26

shavit
Member
From: Israel
Registered: 2016-12-08
Posts: 5
Website

Security limits changes not taking effect?

Hello, first time posting here! Sorry in advance if this question is stupid.

I have tried to enable realtime scheduling for the audio group (for JACK). Those are the lines I've added to /etc/security/limits.conf

@audio	-	rtprio	99
@audio	-	memlock	unlimited
@audio	-	nice	-19

For some reason, the changes don't take effect. I've tried re-logging and rebooting the machine too.

I verified that I'm in the audio group. (using my username doesn't work either)

shavit@home  ~  groups
video audio users

I use ulimit -a to show the current limits:

 shavit@home  ~  ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         unlimited
-m: resident set size (kbytes)      unlimited
-u: processes                       63185
-n: file descriptors                1024
-l: locked-in-memory size (kbytes)  64
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 63185
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 0
-N 15:                              unlimited

Is there anything I'm missing? Could it be my kernel (linux-ck) that doesn't make my changes work?

Edit: Found out that rtprio's hard/soft limits aren't even being set..

 shavit@home  ~  ulimit -r 99
ulimit: value exceeds hard limit
 ✘ shavit@home  ~  ulimit -r 1 
ulimit: value exceeds hard limit

Does anyone know what's wrong?

Last edited by shavit (2016-12-08 20:23:02)

Offline

#2 2016-12-10 21:28:42

shavit
Member
From: Israel
Registered: 2016-12-08
Posts: 5
Website

Re: Security limits changes not taking effect?

I also noticed that if I use `hard`, the limit still doesn't change
Is there a way I could verify that this file is even being read?

Offline

#3 2016-12-11 07:55:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: Security limits changes not taking effect?

Did you try to boot a vanially kernel to ensure the MuQSS scheduler (or some other ck patch) isn't the cause?
Did you try a different shell (which is it) to ensure it's not a "bug" (incompatibility) in the ulimit implementation?

Offline

#4 2016-12-11 08:04:07

shavit
Member
From: Israel
Registered: 2016-12-08
Posts: 5
Website

Re: Security limits changes not taking effect?

I am building linux-rt at the moment, will report results back once I finish. If it doesn't help, I'll just go back to the stock Arch kernel and test there!

And yes! I have tried with both zsh and bash

 shavit@home  ~  ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         unlimited
-m: resident set size (kbytes)      unlimited
-u: processes                       63185
-n: file descriptors                1024
-l: locked-in-memory size (kbytes)  64
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 63185
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 0
-N 15:                              unlimited
 shavit@home  ~  bash
[shavit@home ~]$ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63185
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63185
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[shavit@home ~]$ 

Last edited by shavit (2016-12-11 08:07:52)

Offline

#5 2016-12-11 08:05:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Security limits changes not taking effect?

Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code and don't post screenshots of text, paste the actual text.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2016-12-11 08:13:29

shavit
Member
From: Israel
Registered: 2016-12-08
Posts: 5
Website

Re: Security limits changes not taking effect?

Can confirm that the new limits applied at the moment I booted into linux-rt!

Offline

#7 2016-12-11 08:44:08

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,962
Website

Re: Security limits changes not taking effect?

can you share your PS1?

Offline

#8 2016-12-11 11:28:06

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Security limits changes not taking effect?

unlimit works here.

~ > groups
lp audio skottish
~ > ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63330
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 99
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63330
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
~ > cat /etc/security/limits.d/99-audio.conf 
@audio 	- rtprio 	99
@audio 	- memlock 	unlimited
~ > pacman -Fs 99-audio.conf
extra/jack 0.125.0-3
    etc/security/limits.d/99-audio.conf
community/jack2 1.9.10-6
    etc/security/limits.d/99-audio.conf
community/jack2-dbus 1.9.10-6
    etc/security/limits.d/99-audio.conf

Offline

#9 2016-12-11 20:42:03

shavit
Member
From: Israel
Registered: 2016-12-08
Posts: 5
Website

Re: Security limits changes not taking effect?

ugjka wrote:

can you share your PS1?

What do you mean by PS1?

Offline

#10 2016-12-11 21:14:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: Security limits changes not taking effect?

echo $PS1

Welcome to UNIX :-P

Offline

Board footer

Powered by FluxBB