Jackd2: Cannot lock down 82278944 byte memory area (Cannot allocate memory) Bus error

Bug #1189225 reported by Andreas Wettergren
14
This bug affects 3 people
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://github.com/jackaudio/jack2/commit/2f7d512b419cb75cef2e27db872d641de6e7aa0d

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.

Tags: jackd2
Revision history for this message
Diederik (didi-debian) wrote :

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':
diederik@rasppi-1b:~$ apt-cache policy jackd2
jackd2:
  Installed: 1.9.8~dfsg.4+20120529git007cdc37-5+rpi2
  Candidate: 1.9.8~dfsg.4+20120529git007cdc37-5+rpi2
  Version table:
 *** 1.9.8~dfsg.4+20120529git007cdc37-5+rpi2 0
        500 http://archive.raspberrypi.org/debian/ wheezy/main armhf Packages
        100 /var/lib/dpkg/status
     1.9.8~dfsg.4+20120529git007cdc37-5 0
        500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages

Changed in raspbian:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.