64-bit Linux Ruby Problem - Segmentation Fault

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

On 10/1/07, Dustin T. [email protected] wrote:

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:

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

Dustin T. wrote:

/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?

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”.

Wayne E. Seguin wrote:

On 10/1/07, Dustin T. [email protected] wrote:

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:

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs