i tried to host a rubyOnRails application on a oracle application server (more precisley: the included Apache).
The test to use fastcgi stops with segmentation fault in the ruby framework....
I am using Solaris 10 and installed ruby via www.sunfreeware.com
rails with gem
fcgi from www.fastcgi.com (compiled with gcc)
fcgi package for ruby with gem
Any experts out there?
Could you please tell us more details about this problem?
For example, is your Solaris running on x86 or SPARC system? How does the segmentation fault error message look like? Can you get a stack trace with GDB?
/usr/local/lib/ruby/1.8/drb/drb.rb:1427: [BUG] Segmentation fault
ruby 1.8.5 (2006-12-04) [sparc-solaris2.10]
[Tue Mar 27 20:43:30 2007] [error] [client 10.0.0.8] [ecid: 1175021008:10.0.0.166:16338:0:12876,0] FastCGI: incomplete headers (
0 bytes) received from server "/var/www/dispatch.fcgi"
[Tue Mar 27 20:43:30 2007] [warn] FastCGI: (dynamic) server "/var/www/dispatch.fcgi" (pid 23526) terminated due to uncaught signal '6' (Abort), a core file may have been generated
I found here:
On Tue, 15 Mar 2005, Ryan Raaum wrote:
generally this sort of thing is caused by running incompatible binaries - you
should carefully review your install procedure.
I'm sorry but currently I do not have SPARC hardware :-(
Can you run "public/dispatch.fcgi" without error?
Or, try Rails's FastCGI test case. The file name is "fcgi_dispatcher_test.rb". It should be in the railties/test directory under the installation directory of Rails. Run it with ruby and see if you can reproduce the segfault.
If you can, try to get the stack trace with GDB, like this:
gdb --args ruby fcgi_dispatcher_test.rb
and you will see the stack trace when ruby gets the segfault. If there are not function names but only "??"s in the stack trace, you have to compile ruby with the debug symbols first, using gcc's "-g" option.
By the way, there are lots of information about FastCGI in Rails on Rails's wiki:
Also, FastCGI is not quite easy to configure. I recommend Mongrel or SCGI.
the ./dispatch.fcgi runs without an error....
Running with cgi works fine...
running with fcgi end with:
/usr/local/lib/ruby/1.8/timeout.rb:52: [BUG] Segmentation fault ruby 1.8.5 (2006-12-04) [sparc-solaris2.10]
[Thu Mar 29 21:09:08 2007] [error] [client 10.0.0.8] [ecid: 1175195346:10.0.0.169:12011:0:7,0] FastCGI: incomplete headers (0 bytes) received from server "/var/www/dispatch.fcgi"
[Thu Mar 29 21:09:08 2007] [warn] FastCGI: (dynamic) server "/var/www/dispatch.fcgi" (pid 12033) terminated due to uncaught signal '6' (Abort), a core file may have been generated
I compiled everything with the SUN studio compiler (SUNspro)
Have you tried to switch from FastCGI to Mongrel/mod_proxy behind OHS ?
Based on my experience I think that production Rails application are not using FastCGI anymore and doing it with Mongrel.
You can find more information at:
- Mongrel Site
- Scaling Rails
Regards Tugdual Grall
It seems you installed Rails using rubygems. Do you know where is the gems installation directory? The fcgi_dispatcher_test.rb should be in that directory. You can find it in that directory using the "find" command:
find dir -name fcgi_dispatcher_test.rb
Change "dir" to the directory the gems were installed in, or if you don't know where the directory is, just find in "/usr/local/lib" or "/opt/csw", or "/". (I'm sorry I don't know where that directory is on Solaris platform.)
SUN Studio compiler's debug option is "-g", too.
It looks like the segfaults always occur at Thread.start. Maybe there is some bug in Ruby's threading implementation on SPARC Solaris...
I currently work on a Web 2.0 project with Ruby on Rails. For the RoR part we use a LiteSpeed server (http://litespeedtech.com/), whereas we have also Oracle Application Server (10gAS 10.1.2, 10gAS Soa Suite 10.1.3). LiteSpeed is free.