[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

64-bit Linux Ruby Problem - Segmentation Fault

Dustin Tosh

10/1/2007 5:49:00 PM

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....
=> 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
--
Posted via http://www.ruby-....

2 Answers

M. Edward (Ed) Borasky

10/2/2007 3:38:00 AM

0

Dustin Tosh 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:
>
> $ ruby script/server lighttpd
> => Booting lighttpd (use 'script/server webrick' to force WEBrick)
> => Rails application starting on http://0....
> => 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".


Dustin Tosh

10/4/2007 6:44:00 PM

0

Wayne E. Seguin wrote:
> On 10/1/07, Dustin Tosh <dustin_tosh@yahoo.com> 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.
--
Posted via http://www.ruby-....