Thursday, December 14, 2006

BOINC Server Shared Memory Error

When I first installed uppercase as a demo project on a BOINC server, I got the following message in my client messages window:
Message from server: Project encountered internal error: shared memory
Looking at the cgi.log on the server showed:
Can't attach shmem: -146 (feeder not running?)
Running bin/status also showed that BOINC was enabled, the daemons were running and also enabled (disabled=no).

The first hint came from Nicolas Alvarez:
Maybe the shared memory block is owned by your user instead of boinc user as well. You should stop and restart server from the correct user.
$ ps aux | grep feeder
See what user owns the feeder process.
That was my exact problem. Then I got a more elaborate response from Eric Myers:
The feeder has to be able to talk to the scheduler via shared memory. There are several ways to do this. I have
chgrp apache bin/feeder
chmod g+s bin/feeder
so that it runs as group apache, and thus can share memory with the scheduler cgi when it's started by apache.

Another way to do this (which I don't like as much, but works) is to make the feeder group 'boinc' and add the apache user to that group.

Either way, the feeder (which always runs) needs to share permissions with the scheduler (cgi-bin/cgi - confusing name) so they can share memory.
Well, that pretty well summed up the problem.

I had already configured apache to be a member of my boinc group and just needed to make sure that feeder was also running as the boinc group.

1 comment:

Bart said...

Thanks a lot for this post. I had been having this smem problem for a while on gentoo and couldn't figure it out. Thanks again!