Jackd2: Cannot lock down 82278944 byte memory area (Cannot allocate memory) Bus error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
There is a known bug in Jackd2 that prevents it from running on ARM, giving these errors:
Cannot lock down 82278944 byte memory area (Cannot allocate memory)
Bus error
There is a patch in the official repo that fixes this:
https:/
You can test by issuing "jackd -d dummy", which should report no errors on a working system.
(Make sure to be a member of the "audio" group, or other errors will crop up)
The version in Debian experimental has the patch in the above link.
I've downloaded the source from experimental and built it with dpkg-buildpackage and can confirm that it's fixed.
Another option may be to cherry-pick that patch to the current version in Raspbian.
In addition to the patch, one also needs to increase shared memory, e.g.:
sudo mount -o remount,size=128M /run/shm
The default size of /run/shm on a 256 MB Pi is 44 MB, which isn't enough for the default number of ports in jackd.
An alternative may be to lower the default number of ports (PORT_NUM) in JackConstants.h.
952 seems to be the absolute maximum with the current size /run/shm.
(you can use -p NNN on the jackd command line to check /run/shm size requirements for different numbers of ports)
I have no idea how lowering the default number would affect performance, but I have a feeling using 900+ ports on a Pi may be asking too much anyway.
I was able to confirm this issue on a Pi 1B with 512MB RAM.
It did however install the version from the raspberrypi.org repo which can be explained by looking at the output of 'apt-cache policy jackd2': rasppi- 1b:~$ apt-cache policy jackd2 4+20120529git00 7cdc37- 5+rpi2 4+20120529git00 7cdc37- 5+rpi2 4+20120529git00 7cdc37- 5+rpi2 0 archive. raspberrypi. org/debian/ wheezy/main armhf Packages dpkg/status 9.8~dfsg. 4+20120529git00 7cdc37- 5 0 mirrordirector. raspbian. org/raspbian/ wheezy/main armhf Packages
diederik@
jackd2:
Installed: 1.9.8~dfsg.
Candidate: 1.9.8~dfsg.
Version table:
*** 1.9.8~dfsg.
500 http://
100 /var/lib/
1.
500 http://