64-bit Linux Ruby Problem - Segmentation Fault

D

Dustin Tosh

I've been running a basic ruby/rails CRUD application on a 32-bit Red
Hat Linux machine. It works well on several 32-bit test/dev boxes.
When I move it over to a 64-bit box it runs for a few minutes, then I
start getting the following error:

$ ruby script/server lighttpd
=> Booting lighttpd (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
/usr/local/lib/ruby/1.8/pstore.rb:354: [BUG] Segmentation fault
ruby 1.8.6 (2007-03-13) [x86_64-linux]

I've tried using all three web servers, but they all produce the same
error.

I've been using Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
with the following packages installed:

ruby-1.8.6
rubygems-0.9.4
ruby-oci8-1.0.0-rc3
fcgi-2.4.0
pcre-5
rails

In addition I have the following web servers installed:
lighttpd-1.4.16
webrick
mongrel

Thanks,
Dustin
 
M

M. Edward (Ed) Borasky

Dustin said:
I've been running a basic ruby/rails CRUD application on a 32-bit Red
Hat Linux machine. It works well on several 32-bit test/dev boxes.
When I move it over to a 64-bit box it runs for a few minutes, then I
start getting the following error:

$ ruby script/server lighttpd
=> Booting lighttpd (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
/usr/local/lib/ruby/1.8/pstore.rb:354: [BUG] Segmentation fault
ruby 1.8.6 (2007-03-13) [x86_64-linux]

Hmmmm ... /usr/local/lib/ruby/1.8/pstore.rb?? Where is your Ruby
*interpreter* stored? Did you install it from a 64-bit-compatible RHEL 4
RPM or some other way?

I've tried using all three web servers, but they all produce the same
error.

I've been using Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
with the following packages installed:

ruby-1.8.6
rubygems-0.9.4
ruby-oci8-1.0.0-rc3
fcgi-2.4.0
pcre-5
rails

In addition I have the following web servers installed:
lighttpd-1.4.16
webrick
mongrel

Thanks,
Dustin

I think the problem is the Ruby interpreter, not any of the packages.
The segfault appears to have happened when the interpreter was on line
354 of "pstore.rb" as noted above. Make sure all your packages are pure
64-bit and installed from reputable RPMs, or rebuild them from source
RPMs with "rpmbuild".
 
D

Dustin Tosh

Wayne said:
What happens when you switch to database sessions? (You are using file
based
sessions, correct?)

It seems as though there is some sort of 64-bit memory leak when using
the file store mechanism, specifically the PStore.rb file.

I installed/configured the program to use MemCache and it appears to be
working, effectively avoiding the file causing the segmentation fault.

Thanks everyone for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top