cowboyd/therubyracer — Issue #118: Exits with "Killed" on Gentoo Hardened (pax)
Author: gabetax
Created: 2011-10-14 21:13:10+00:00
State: open

Upon inclusion of 'v8' on Gentoo with a hardened profile (with pax enabled via the grsecurity kernel patch), the program exits immediately:

# irb
irb(main):001:0> require '/usr/lib/ruby/gems/1.8/gems/therubyracer-0.9.8/lib/v8.rb'
Killed

This is causing rails 3.1 and its rake tasks to similarly fail on my server when I include the less-rails gem (which depends on less which depends on "therubyracer", "~> 0.9.2") for the asset pipeline.

I found a [gist](https://gist.github.com/803962/08af179222dd969c2df9788ef1b8a00e81d19e80) with instructions for running straight command line node or d8 without pax interfering, which works for those command line executables. I've tried doing a similar command on the v8.so file compiled for therubyracer, without improvement:

# paxctl -v /usr/lib/ruby/gems/1.8/gems/therubyracer-0.9.8/lib/v8.so
PaX control v0.5
Copyright 2004,2005,2006,2007 PaX Team

- PaX flags: -----m-x-e-- [/usr/lib/ruby/gems/1.8/gems/therubyracer-0.9.8/lib/v8.so]
MPROTECT is disabled
RANDEXEC is disabled
EMUTRAMP is disabled

I don't necessarily expect a resolution due to this being a fairly niche setup, but I would appreciate any information people can provide, and the issue may lead as a paper trail for anyone else experiencing this issue.

As a work around I'm moving less-rails out of my production Gemfile and precompiling my assets on a less problematic server.