# 64-bit Linux Ruby Problem - Segmentation Fault

**URL:** <https://www.ruby-forum.com/t/64-bit-linux-ruby-problem-segmentation-fault/116036>\
**Category:** Ruby\
**Created:** [October 1, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/64-bit-linux-ruby-problem-segmentation-fault/116036 "2007-10-01T19:48:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tinney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tinney](https://www.ruby-forum.com/u/tinney)\
**Post date:** [October 1, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/64-bit-linux-ruby-problem-segmentation-fault/116036/1 "2007-10-01T19:48:53Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![tinney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tinney](https://www.ruby-forum.com/u/tinney)\
**Post date:** [October 1, 2007, 9:38pm UTC](https://www.ruby-forum.com/t/64-bit-linux-ruby-problem-segmentation-fault/116036/2 "2007-10-01T21:38:34Z")

</div>

On 10/1/07, Dustin T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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?)

---

<div class="post-metadata">

**Author:** ![tinney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tinney](https://www.ruby-forum.com/u/tinney)\
**Post date:** [October 2, 2007, 5:38am UTC](https://www.ruby-forum.com/t/64-bit-linux-ruby-problem-segmentation-fault/116036/3 "2007-10-02T05:38:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tinney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tinney](https://www.ruby-forum.com/u/tinney)\
**Post date:** [October 4, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/64-bit-linux-ruby-problem-segmentation-fault/116036/4 "2007-10-04T20:44:25Z")

</div>

Wayne E. Seguin wrote:

> On 10/1/07, Dustin T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.
