Closed coldnebo closed 7 months ago
Just had a thought... if there is binding between therubyracer and ruby objects (i.e. to allow calls to ruby objects from javascript) could this be a mismatch thing between Rubies and the version of therubyracer? 0.9.9 was probably originally before the Ruby 1.9.2 release way back when we started using asset pipeline.
Another possible hazard is leaving the gem compiled for one ruby and then installing another ruby but using the same precompiled gem, no? In that case the wraps might be binary incompatible... but I'd expect that kind of error to fail all the time, not part of the time... hmmm. confusing.
@coldnebo Ruby has ABI versioning, generally you should consider recompiling your binary gems whenever you change Ruby ABI. Though this may not be the reason behind your segfault.
@ignisf good point.
Our gems and Ruby versions are ok, and in sync (i.e. reinstalled/compiled), but that didn't solve the issue.
I can now reproduce this error consistently using the following bash snippet which loosely models what is happening on our deployment server (apps may be pushed by devs at any time):
pushd app1
rake assets:precompile &
popd
pushd app2
rake assets:precompile &
popd
It looks like therubyracer v8.so has issues with multiple processes compiling assets at the same time from different processes.
Another important piece of information seems to be that this only happens happens more frequently when one or more asset files are empty. If you remove these empty compilation targets from the pipeline, then this error goes away.
I'm not sure what the asset pipeline is doing in this case.
Hi, we're seeing this segfault intermittently in CentOS during our deploy process.
There seems to be no difference between the logs except the segfault when it occurs.
Admittedly this is an old version of therubyracer (0.9.9), but one of our apps doesn't seem to have this issue when precompiling and we can't tell what's going on.
Any ideas what might cause this?
I know there are other segfault issues open, but wasn't sure what their context was, so I opened this separately.