[Home]LockedMemory

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Resolving the error "failed to map shmem"

If emc displays the following message on startup:
 RTAPI: ERROR: failed to map shmem
 RTAPI: Locked memory limit is 32KiB, recommended at least 20480KiB.
 This can cause the error 'failed to map shmem'.
then the problem is the your system's configured limit of locked memory.

Solution

Edit /etc/security/limits.conf with your favorite text editor (e.g., sudo gedit /etc/security/limits.conf). Add the following line
 *       -    memlock 20480
For Ubuntu Lucid (10.10), also add the following line at the end of /etc/pam.d/common-session
 session required pam_limits.so
Log out and log back in.

Appendix

To temporarily raise the limit for the current session, use the following command:
 ulimit -l 20480

To verify the limit is raised, use the following command:

 ulimit -l

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited March 7, 2011 10:44 am by Sam (diff)
Search:
Published under a Creative Commons License