[LAU] memlock limits not set correctly?

Bill Gribble grib at billgribble.com
Sun Jan 13 17:01:21 CET 2019

This has just popped up on my audio machine and I am not sure
what is going on.  It's probably a change somewhere in PAM or
GDM config.  If anyone knows what's up I would appreciate a clue.

Bill Gribble

# Some audio clients work fine, but Aeolus doesn't
grib at ghost:~$ aeolus
Cannot mmap shm segment /jack-1000-0 (Resource temporarily unavailable)
Map shared memory segments exception
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, 
skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 0, 
skipping unlock
Error: can't connect to JACK

# Ok, what's that shared memory segment?
grib at ghost:~$ ls -l /dev/shm/
total 80440
-rw-r--r-- 1 grib grib 82280346 Jan 13 10:49 jack-1000-0
-rw-r--r-- 1 grib grib     1187 Jan 13 10:49 jack-1000-1
-rw-rw-rw- 1 grib grib    70744 Jan 13 10:33 jack-shm-registry
srwxr-xr-x 1 grib grib        0 Jan 13 10:49 jack_default_1000_0
-rwxr-xr-x 1 grib grib       12 Jan 13 10:49 jack_sem.1000_default_freewheel
-rwxr-xr-x 1 grib grib       12 Jan 13 10:49 jack_sem.1000_default_qjackctl
-rwxr-xr-x 1 grib grib       12 Jan 13 10:49 jack_sem.1000_default_system

# I would get -EAGAIN if the segment was too big... what's the limit?
grib at ghost:~$ ulimit -l

# What?  Just 64MB? That explains the error,
# but I thought audio group had unlimited memlock
grib at ghost:~$ groups
grib cdrom floppy audio dip video plugdev staff netdev bluetooth

grib at ghost:~$ grep memlock /etc/security/limits.d/audio.conf
@audio   -  memlock    unlimited

# And in a crazy debugging fit I even set everybody's memlock
# really high ... so why is this process limited to 64MB?

grib at ghost:~$ grep memlock /etc/security/limits.conf
#        - memlock - max locked-in-memory address space (KB)
* - memlock 512000

More information about the Linux-audio-user mailing list