Fixing Error: lib/active_support/ memoizable.rb:32: [BUG] Segmentation fault

Posted by Sheldon Finlay on September 08, 2010

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/memoizable.rb:32: [BUG] Segmentation fault
ruby 1.8.7 (2009-04-08 patchlevel 160) [x86_64-linux]

Aborted (core dumped)

Here’s a fun error I kept knocking up against when trying to run migrations, rake tasks, or script/console on a server here. Before you start uninstalling gems, reinstalling ruby, etc. check and see if you are on a CPanel server. If you are, most likely shell fork bomb protection is enabled in CPanel’s WHM. Shell fork bomb protection severely limits the amount of memory that shell users can access. Unfortunately that protection can prevent you from running legitimate processes, like rake tasks.

If you are the admin of the server, just log into the WHM, and disable shell fork bomb protection, then open a new shell and try your commands again. You do need to log out of the shell and open a new shell for the SFBP restriction to be lifted.

Of course, if you are on a shared server and not the admin, you might be out of luck. It’s doubtful that the server admin will disable this protection since it does serve a useful function, mainly preventing users from running reckless scripts that could take the whole server down. I haven’t looked into it, but there may be a way to configure CPanel to allow a higher limit, or opt-out certain users.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments