# Ruby corrupts after a period of time

**URL:** <https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195>\
**Category:** ruby-talk\
**Created:** [22 March 2011 18:26 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195 "2011-03-22T18:26:02Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chip\_Burke](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Chip\_Burke](https://rubytalk.org/u/Chip_Burke)\
**Post date:** [22 March 2011 18:26 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/1 "2011-03-22T18:26:02Z")

</div>

I have recently upgraded from Ruby 1.8.7 to 1.9.2p180 on Fedora. After a  
period of time, a day perhaps, the installation goes corrupt. It works  
perfectly fine initially then everything fails. I am rolling this from  
source with typical ./configure/make/make install type process. A few  
examples:

#irb  
\<internal:lib/rubygems/custom\_require\>:29:in `require': closed stream  
(IOError)  
&nbsp;&nbsp;from \<internal:lib/rubygems/custom\_require\>:29:in `require'  
&nbsp;&nbsp;from /usr/lib/ruby/1.9.1/irb.rb:13:in `\<top (required)\>'  
&nbsp;&nbsp;from \<internal:lib/rubygems/custom\_require\>:29:in `require'  
&nbsp;&nbsp;from \<internal:lib/rubygems/custom\_require\>:29:in `require'  
&nbsp;&nbsp;from /usr/bin/irb:9:in `\<main\>'

# gem list  
\<internal:lib/rubygems/custom\_require\>:29: [BUG] Segmentation fault  
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86\_64-linux]

-- control frame ----------  
c:0005 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :require  
c:0004 p:0013 s:0014 b:0014 l:000013 d:000013 METHOD  
\<internal:lib/rubygems/custom\_require\>:29  
c:0003 p:0011 s:0009 b:0009 l:0012e8 d:0001f0 EVAL /usr/bin/gem:8  
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH  
c:0001 p:0000 s:0002 b:0002 l:0012e8 d:0012e8 TOP

> **···**
>
> ---------------------------  
> -- Ruby level backtrace information  
> ----------------------------------------  
> /usr/bin/gem:8:in `\<main\>'  
> \<internal:lib/rubygems/custom\_require\>:29:in `require'  
> \<internal:lib/rubygems/custom\_require\>:29:in `require'
> 
> -- C level backtrace information  
> -------------------------------------------  
> /usr/bin/ruby(rb\_vm\_bugreport+0xa1) [0x529241]  
> /usr/bin/ruby [0x56ce16]  
> /usr/bin/ruby(rb\_bug+0xb1) [0x56cf91]  
> /usr/bin/ruby [0x4b6f8f]  
> /lib64/libpthread.so.0 [0x34b680ed30]  
> /lib64/libc.so.6(memcpy+0x286) [0x34b5883a56]  
> /usr/bin/ruby(rb\_iseq\_compile\_node+0xc1) [0x5089d1]  
> /usr/bin/ruby(rb\_iseq\_new\_with\_opt+0xa6) [0x510336]  
> /usr/bin/ruby [0x4ff1a1]  
> /usr/bin/ruby [0x501d0a]  
> /usr/bin/ruby [0x500cba]  
> /usr/bin/ruby(rb\_iseq\_compile\_node+0x991) [0x5092a1]  
> /usr/bin/ruby(rb\_iseq\_new\_with\_opt+0xa6) [0x510336]  
> /usr/bin/ruby [0x4ff1a1]  
> /usr/bin/ruby [0x5021f7]  
> /usr/bin/ruby [0x500cba]  
> /usr/bin/ruby(rb\_iseq\_compile\_node+0x780) [0x509090]  
> /usr/bin/ruby [0x50fd5a]  
> /usr/bin/ruby(rb\_iseq\_new\_top+0x2c) [0x50fffc]  
> /usr/bin/ruby [0x570f54]  
> /usr/bin/ruby(rb\_require\_safe+0x44f) [0x57228f]  
> /usr/bin/ruby [0x5270ff]  
> /usr/bin/ruby [0x519439]  
> /usr/bin/ruby [0x51e698]  
> /usr/bin/ruby(rb\_iseq\_eval\_main+0x290) [0x51ea20]  
> /usr/bin/ruby [0x417cf3]  
> /usr/bin/ruby(ruby\_run\_node+0x36) [0x4199e6]  
> /usr/bin/ruby(main+0x4d) [0x416f2d]  
> /lib64/libc.so.6(\_\_libc\_start\_main+0xfa) [0x34b581e32a]  
> /usr/bin/ruby [0x416e19]
> 
> [NOTE]  
> You may have encountered a bug in the Ruby interpreter or extension  
> libraries.  
> Bug reports are welcome.  
> For details: [http://www.ruby-lang.org/bugreport.html](http://www.ruby-lang.org/bugreport.html)
> 
> Aborted
> 
> What does one do to even troubleshoot this let alone fix it?
> 
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Brabuhr](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Brabuhr](https://rubytalk.org/u/Brabuhr)\
**Post date:** [22 March 2011 19:35 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/2 "2011-03-22T19:35:43Z")

</div>

> **[Memtest86+ | The Open-Source Memory Testing Tool](https://www.memtest.org/)**
>
> Memtest86+ is an advanced, free, open-source, stand-alone memory tester for 32- and 64-bit computers (UEFI & BIOS supported)

> **[Feed your content cravings with Liferea - Linux.com](https://www.linux.com/news/feed-your-content-cravings-liferea/)**
>
> Author: Anže Vidmar I find myself not browsing the Web as much as I used to, thanks to Liferea, a Linux-based aggregator for online news feeds. A news aggregator eliminates the need for surfing the Web as much. Instead of going to all the Web pages...

> <https://superuser.com/questions/137455/how-to-troubleshoot-a-hardware-problem-on-linux>

> **···**
>
> On Tue, Mar 22, 2011 at 2:26 PM, Chip Burke \<cburke@innova-partners.com\> wrote:
> 
> > I have recently upgraded from Ruby 1.8.7 to 1.9.2p180 on Fedora. After a  
> > period of time, a day perhaps, the installation goes corrupt. It works  
> > perfectly fine initially then everything fails.
> > 
> > What does one do to even troubleshoot this let alone fix it?

---

<div class="post-metadata">

**Author:** ![Ryan\_Davis1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/ryan_davis1/32/1848_2.png) [@Ryan\_Davis1](https://rubytalk.org/u/Ryan_Davis1)\
**Post date:** [22 March 2011 21:46 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/3 "2011-03-22T21:46:21Z")

</div>

What C extensions might you have loaded?

> **···**
>
> On Mar 22, 2011, at 11:26 , Chip Burke wrote:
> 
> > I have recently upgraded from Ruby 1.8.7 to 1.9.2p180 on Fedora. After a  
> > period of time, a day perhaps, the installation goes corrupt. It works  
> > perfectly fine initially then everything fails. I am rolling this from  
> > source with typical ./configure/make/make install type process. A few  
> > examples:

---

<div class="post-metadata">

**Author:** ![Roger\_Pack4](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Roger\_Pack4](https://rubytalk.org/u/Roger_Pack4)\
**Post date:** [24 March 2011 17:43 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/4 "2011-03-24T17:43:38Z")

</div>

run it in gdb to get the backtrace?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Chip\_Burke](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Chip\_Burke](https://rubytalk.org/u/Chip_Burke)\
**Post date:** [25 March 2011 14:43 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/5 "2011-03-25T14:43:11Z")

</div>

Some more news. I built a clean Fedora 13 x86\_64 box last night to test  
1.9.2 in a non-upgrade environment. Exact same results. By morning ruby  
was spaghetti.

Ok, to answer Ryan's questions (Thank you very much for taking the time

> **···**
>
> on this by the way). Of course those commands fail when in the corrupt state. 'gem env path' says  
> /root/.gem/ruby/1.9.1:/usr/lib/ruby/gems/1.9.1
> 
> Instead of ls I used find.
> 
> #find /usr/lib/ruby/gems/1.9.1 -name \*.so
> 
> Returned nothing and the other path in root doesn't exist.
> 
> #env | egrep "GEM|RUBY"
> 
> Also nothing
> 
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Adrian\_Perez](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Adrian\_Perez](https://rubytalk.org/u/Adrian_Perez)\
**Post date:** [25 March 2011 15:10 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/6 "2011-03-25T15:10:22Z")

</div>

All right,  
That's weird. I agree. I don't have a lot of experience using  
distribution-provided rubies. So I'll try to take my point the clearest  
I can. First than anything that kind of output doesn't really help a  
lot, all I can see here is that it came to crash on some kind of memory  
issue which you can't determine by the backtrace at all. Attaching gdb  
to the process and watching that thing crash or getting a core dump will  
bring more light to that.  
On the other hand, do you appear to have left-overs from an older  
install? Are you sure you're not somehow getting to load a shared  
library (.so file) belonging to an old installation?  
If you haven't solved or went through a workaround by the time you read  
this, then let me know I'd be trying to help you through it.

- --  
Best Regards,

Adrian Perez

> **[Adrian Perez](https://adrianperez.codes/)**
>
> Craftmanship journey λ Software Engineering Blog

Twitter: @blackxored | Skype: blackxored | Google Voice: (559) 744 3201

> **···**
>
> On 03/22/2011 02:26 PM, Chip Burke wrote:
> 
> > I have recently upgraded from Ruby 1.8.7 to 1.9.2p180 on Fedora. After a  
> > period of time, a day perhaps, the installation goes corrupt. It works  
> > perfectly fine initially then everything fails. I am rolling this from  
> > source with typical ./configure/make/make install type process. A few  
> > examples:
> > 
> > #irb  
> > \<internal:lib/rubygems/custom\_require\>:29:in `require': closed stream  
> > (IOError)  
> > &nbsp;&nbsp;from \<internal:lib/rubygems/custom\_require\>:29:in `require'  
> > &nbsp;&nbsp;from /usr/lib/ruby/1.9.1/irb.rb:13:in `\<top (required)\>'  
> > &nbsp;&nbsp;from \<internal:lib/rubygems/custom\_require\>:29:in `require'  
> > &nbsp;&nbsp;from \<internal:lib/rubygems/custom\_require\>:29:in `require'  
> > &nbsp;&nbsp;from /usr/bin/irb:9:in `\<main\>'
> > 
> > # gem list  
> > \<internal:lib/rubygems/custom\_require\>:29: [BUG] Segmentation fault  
> > ruby 1.9.2p180 (2011-02-18 revision 30909) [x86\_64-linux]
> > 
> > -- control frame ----------  
> > c:0005 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :require  
> > c:0004 p:0013 s:0014 b:0014 l:000013 d:000013 METHOD  
> > \<internal:lib/rubygems/custom\_require\>:29  
> > c:0003 p:0011 s:0009 b:0009 l:0012e8 d:0001f0 EVAL /usr/bin/gem:8  
> > c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH  
> > c:0001 p:0000 s:0002 b:0002 l:0012e8 d:0012e8 TOP  
> > ---------------------------  
> > -- Ruby level backtrace information  
> > ----------------------------------------  
> > /usr/bin/gem:8:in `\<main\>'  
> > \<internal:lib/rubygems/custom\_require\>:29:in `require'  
> > \<internal:lib/rubygems/custom\_require\>:29:in `require'
> > 
> > -- C level backtrace information  
> > -------------------------------------------  
> > /usr/bin/ruby(rb\_vm\_bugreport+0xa1) [0x529241]  
> > /usr/bin/ruby [0x56ce16]  
> > /usr/bin/ruby(rb\_bug+0xb1) [0x56cf91]  
> > /usr/bin/ruby [0x4b6f8f]  
> > /lib64/libpthread.so.0 [0x34b680ed30]  
> > /lib64/libc.so.6(memcpy+0x286) [0x34b5883a56]  
> > /usr/bin/ruby(rb\_iseq\_compile\_node+0xc1) [0x5089d1]  
> > /usr/bin/ruby(rb\_iseq\_new\_with\_opt+0xa6) [0x510336]  
> > /usr/bin/ruby [0x4ff1a1]  
> > /usr/bin/ruby [0x501d0a]  
> > /usr/bin/ruby [0x500cba]  
> > /usr/bin/ruby(rb\_iseq\_compile\_node+0x991) [0x5092a1]  
> > /usr/bin/ruby(rb\_iseq\_new\_with\_opt+0xa6) [0x510336]  
> > /usr/bin/ruby [0x4ff1a1]  
> > /usr/bin/ruby [0x5021f7]  
> > /usr/bin/ruby [0x500cba]  
> > /usr/bin/ruby(rb\_iseq\_compile\_node+0x780) [0x509090]  
> > /usr/bin/ruby [0x50fd5a]  
> > /usr/bin/ruby(rb\_iseq\_new\_top+0x2c) [0x50fffc]  
> > /usr/bin/ruby [0x570f54]  
> > /usr/bin/ruby(rb\_require\_safe+0x44f) [0x57228f]  
> > /usr/bin/ruby [0x5270ff]  
> > /usr/bin/ruby [0x519439]  
> > /usr/bin/ruby [0x51e698]  
> > /usr/bin/ruby(rb\_iseq\_eval\_main+0x290) [0x51ea20]  
> > /usr/bin/ruby [0x417cf3]  
> > /usr/bin/ruby(ruby\_run\_node+0x36) [0x4199e6]  
> > /usr/bin/ruby(main+0x4d) [0x416f2d]  
> > /lib64/libc.so.6(\_\_libc\_start\_main+0xfa) [0x34b581e32a]  
> > /usr/bin/ruby [0x416e19]
> > 
> > [NOTE]  
> > You may have encountered a bug in the Ruby interpreter or extension  
> > libraries.  
> > Bug reports are welcome.  
> > For details: [http://www.ruby-lang.org/bugreport.html](http://www.ruby-lang.org/bugreport.html)
> > 
> > Aborted
> > 
> > What does one do to even troubleshoot this let alone fix it?

---

<div class="post-metadata">

**Author:** ![Chip\_Burke](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Chip\_Burke](https://rubytalk.org/u/Chip_Burke)\
**Post date:** [24 March 2011 17:58 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/7 "2011-03-24T17:58:55Z")

</div>

Ryan Davis wrote in post #988782:

> What C extensions might you have loaded?

Forgive my ignorance as I am a syadmin and don't delve into those parts.  
How can I find this information out? I am certain this is not a hardware  
issue as this same problem has arisen on every box I have ever tried  
this on.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Brabuhr](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Brabuhr](https://rubytalk.org/u/Brabuhr)\
**Post date:** [25 March 2011 21:34 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/8 "2011-03-25T21:34:23Z")

</div>

Thanks for testing that. Did you also test installing to a different PREFIX?

> **···**
>
> On Fri, Mar 25, 2011 at 10:43 AM, Chip Burke \<cburke@innova-partners.com\> wrote:
> 
> > Some more news. I built a clean Fedora 13 x86\_64 box last night to test  
> > 1.9.2 in a non-upgrade environment. Exact same results. By morning ruby  
> > was spaghetti.

---

<div class="post-metadata">

**Author:** ![Brabuhr](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Brabuhr](https://rubytalk.org/u/Brabuhr)\
**Post date:** [24 March 2011 18:15 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/9 "2011-03-24T18:15:13Z")

</div>

Can you provide more details of your process?

\* Install Fedora x on y (e.g. 13 on x86\_64)  
\* Install Ruby 1.8.7-? via yum or source  
&nbsp;&nbsp;\* if source, what configure flags/prefix/etc  
\* Download and extract 1.9.2-?  
&nbsp;&nbsp;\* ./configure  
&nbsp;&nbsp;&nbsp;&nbsp;\* any flags here? are you overwriting 1.8.7 in-place or  
installing into a prefix  
&nbsp;&nbsp;\* ...  
\* ...

> **···**
>
> On Thu, Mar 24, 2011 at 1:58 PM, Chip Burke \<cburke@innova-partners.com\> wrote:
> 
> > Ryan Davis wrote in post #988782:
> > 
> > > What C extensions might you have loaded?
> > 
> > Forgive my ignorance as I am a syadmin and don't delve into those parts.  
> > How can I find this information out? I am certain this is not a hardware  
> > issue as this same problem has arisen on every box I have ever tried  
> > this on.

---

<div class="post-metadata">

**Author:** ![Daniel\_Hvidding](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@Daniel\_Hvidding](https://rubytalk.org/u/Daniel_Hvidding)\
**Post date:** [27 July 2011 15:35 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/10 "2011-07-27T15:35:13Z")

</div>

unknown wrote in post #989307:

> **···**
>
> > On Fri, Mar 25, 2011 at 10:43 AM, Chip Burke \> \<cburke@innova-partners.com\> wrote:
> > 
> > > Some more news. I built a clean Fedora 13 x86\_64 box last night to test  
> > > 1.9.2 in a non-upgrade environment. Exact same results. By morning ruby  
> > > was spaghetti.
> > 
> > Thanks for testing that. Did you also test installing to a different  
> > PREFIX?
> 
> Did you ever resolve this issue? I am running into the same problem on  
> RHEL4. I had everything running great yesterday, and today I can't run  
> anything. Was thinking it was something I had added to the  
> $LD\_LIBRARY\_PATH yesterday that isn't automatically put there upon login  
> but I guess that's not the case. It is segment faulting upon any type of  
> require...
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Chip\_Burke](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Chip\_Burke](https://rubytalk.org/u/Chip_Burke)\
**Post date:** [24 March 2011 19:08 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/11 "2011-03-24T19:08:54Z")

</div>

unknown wrote in post #989053:

> > Ryan Davis wrote in post #988782:
> > 
> > > What C extensions might you have loaded?
> > 
> > Forgive my ignorance as I am a syadmin and don't delve into those parts.  
> > How can I find this information out? I am certain this is not a hardware  
> > issue as this same problem has arisen on every box I have ever tried  
> > this on.
> 
> Can you provide more details of your process?
> 
> \* Install Fedora x on y (e.g. 13 on x86\_64)  
> \* Install Ruby 1.8.7-? via yum or source  
> &nbsp;&nbsp;\* if source, what configure flags/prefix/etc  
> \* Download and extract 1.9.2-?  
> &nbsp;&nbsp;\* ./configure  
> &nbsp;&nbsp;&nbsp;&nbsp;\* any flags here? are you overwriting 1.8.7 in-place or  
> installing into a prefix  
> &nbsp;&nbsp;\* ...  
> \* ...

Install Fedora/CentOS. It has been a mixed bag thus far. Mostly x86\_64  
systems. CentOS 5.3-5.5 or Fedora 8-13.

Ruby 1.8.7 is installed via source.  
./configure --prefix=/usr  
make  
make install

Gems then installed via #ruby setup.rb. I have always just grabbed the  
latest/greatest gem version. 1.3.9, 1.6.2, etc

Use gems to install passenger, rails, etc.

6 months later developer says "I gotta have 1.9.2!"

Ok, now for 1.9.2 I follow the same procedures.  
./configure --prefix=/usr  
make  
make install

And being that gems is included in 1.9x, I skip the gem install. Then  
use gem to install rails etc.

Everything works just peachy... gems install, apps run... then  
mysteriously a day or so later everything curls up and dies like noted  
above.

> **···**
>
> > On Thu, Mar 24, 2011 at 1:58 PM, Chip Burke \<cburke@innova-partners.com\> \> wrote:
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Doug1](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@Doug1](https://rubytalk.org/u/Doug1)\
**Post date:** [28 July 2011 03:06 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/12 "2011-07-28T03:06:23Z")

</div>

I am 99% sure you are running into problems with prelink. On any centos or  
Fedora OS where we run custom compiled rubies (1.9.2-p180 currently),  
prelink runs once a day and corrupts the executable by doing something to  
.so's it uses or the binary executables themselves. The only way we have  
been able to keep prelink from doing anything is to completely uninstall the  
prelink rpm. I am sure if we spent the time, we could blacklist all ruby  
files from the prelink configuration file, but it wasn't worth our time and  
effort to do so. prelink is pretty much obsolete (or so I have heard) on  
modern OS's and we have not had any problems with it uninstalled.

Uninstall prelink, then recompile and reinstall from scratch your ruby  
interpreter. I am very sure this will solve your issue.

Any prelink gurus out there want to A) tell me that it is necessary to have  
installed and B) tell me how I tell prelink not to touch my custom compiled  
ruby?

-Doug Seifert

> **···**
>
> On Wed, Jul 27, 2011 at 8:35 AM, Daniel Hvidding \<danhvidding@gmail.com\>wrote:
> 
> > unknown wrote in post #989307:  
> > \> On Fri, Mar 25, 2011 at 10:43 AM, Chip Burke \> \> \<cburke@innova-partners.com\> wrote:  
> > \>\> Some more news. I built a clean Fedora 13 x86\_64 box last night to test  
> > \>\> 1.9.2 in a non-upgrade environment. Exact same results. By morning ruby  
> > \>\> was spaghetti.  
> > \>  
> > \> Thanks for testing that. Did you also test installing to a different  
> > \> PREFIX?
> > 
> > Did you ever resolve this issue? I am running into the same problem on  
> > RHEL4. I had everything running great yesterday, and today I can't run  
> > anything. Was thinking it was something I had added to the  
> > $LD\_LIBRARY\_PATH yesterday that isn't automatically put there upon login  
> > but I guess that's not the case. It is segment faulting upon any type of  
> > require...
> > 
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Matt\_Lawrence1](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Matt\_Lawrence1](https://rubytalk.org/u/Matt_Lawrence1)\
**Post date:** [24 March 2011 19:23 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/13 "2011-03-24T19:23:03Z")

</div>

You should check to see if you have the auto updates using yum configured.

-- Matt  
It's not what I know that counts.  
It's what I can remember in time to use.

> **···**
>
> On Fri, 25 Mar 2011, Chip Burke wrote:
> 
> > Ok, now for 1.9.2 I follow the same procedures.  
> > ./configure --prefix=/usr  
> > make  
> > make install
> > 
> > And being that gems is included in 1.9x, I skip the gem install. Then  
> > use gem to install rails etc.
> > 
> > Everything works just peachy... gems install, apps run... then  
> > mysteriously a day or so later everything curls up and dies like noted  
> > above.

---

<div class="post-metadata">

**Author:** ![Brabuhr](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Brabuhr](https://rubytalk.org/u/Brabuhr)\
**Post date:** [24 March 2011 19:31 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/14 "2011-03-24T19:31:11Z")

</div>

> 6 months later developer says "I gotta have 1.9.2!"

Have you looked into something like RVM to help manage multiple  
versions of Ruby installed in independent prefixes?

> Ok, now for 1.9.2 I follow the same procedures.  
> ./configure --prefix=/usr  
> make  
> make install
> 
> And being that gems is included in 1.9x, I skip the gem install. Then  
> use gem to install rails etc.
> 
> Everything works just peachy... gems install, apps run... then  
> mysteriously a day or so later everything curls up and dies like noted  
> above.

Thanks. Do you have any hosts running 1.9 that was not installed over  
a 1.8 install? (I assume your hosts that only ever had 1.8 installed  
never behaved like this.)

> **···**
>
> On Thu, Mar 24, 2011 at 3:08 PM, Chip Burke \<cburke@innova-partners.com\> wrote:

---

<div class="post-metadata">

**Author:** ![Ryan\_Davis1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/ryan_davis1/32/1848_2.png) [@Ryan\_Davis1](https://rubytalk.org/u/Ryan_Davis1)\
**Post date:** [24 March 2011 22:42 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/15 "2011-03-24T22:42:21Z")

</div>

> unknown wrote in post #989053:
> 
> > > Ryan Davis wrote in post #988782:
> > > 
> > > > What C extensions might you have loaded?
> > > 
> > > Forgive my ignorance as I am a syadmin and don't delve into those parts.  
> > > How can I find this information out? I am certain this is not a hardware  
> > > issue as this same problem has arisen on every box I have ever tried  
> > > this on.

kk. no problem. Basically, are there any .so files in any of the lib dirs of the gems you've installed?

What's this say?

% gem env path

then:

% ls $(gem env path)/gems/\*/lib/\*\*/\*.so

In my case:

% ls $(gem env path)/gems/\*/lib/\*\*/\*.bundle  
/Library/Ruby/Gems/1.8/gems/nokogiri-1.4.4/lib/nokogiri/nokogiri.bundle  
/Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/lib/sqlite3/sqlite3\_native.bundle

> Install Fedora/CentOS. It has been a mixed bag thus far. Mostly x86\_64  
> systems. CentOS 5.3-5.5 or Fedora 8-13.
> 
> Ruby 1.8.7 is installed via source.  
> ./configure --prefix=/usr  
> make  
> make install
> 
> Gems then installed via #ruby setup.rb. I have always just grabbed the  
> latest/greatest gem version. 1.3.9, 1.6.2, etc
> 
> Use gems to install passenger, rails, etc.
> 
> 6 months later developer says "I gotta have 1.9.2!"
> 
> Ok, now for 1.9.2 I follow the same procedures.  
> ./configure --prefix=/usr  
> make  
> make install
> 
> And being that gems is included in 1.9x, I skip the gem install. Then  
> use gem to install rails etc.
> 
> Everything works just peachy... gems install, apps run... then  
> mysteriously a day or so later everything curls up and dies like noted  
> above.

% env | egrep "GEM|RUBY"

In my case:

10006 % env | egrep "GEM|RUBY"  
GEM\_PATH=/Library/Ruby/Gems/1.8

which can cause hell on wheels when I run ruby 1.9

> **···**
>
> On Mar 24, 2011, at 12:08 , Chip Burke wrote:
> 
> > > On Thu, Mar 24, 2011 at 1:58 PM, Chip Burke \<cburke@innova-partners.com\> \>\> wrote:

---

<div class="post-metadata">

**Author:** ![Brabuhr](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Brabuhr](https://rubytalk.org/u/Brabuhr)\
**Post date:** [28 July 2011 14:48 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/16 "2011-07-28T14:48:28Z")

</div>

From the latest NSA Linux guide[1]:

\* Prelink can be safely disabled by setting the following setting  
'PRELINKING=no' in /etc/sysconfig/prelink:  
\* and run /usr/sbin/prelink -ua to restore binaries to a non-prelinked state

And recommends doing so:  
\* [prelink] is undesirable because it provides a stable address for an  
attacker to use during an exploitation attempt.

[1] [http://www.nsa.gov/ia/guidance/security\_configuration\_guides/operating\_systems.shtml#linux2](http://www.nsa.gov/ia/guidance/security_configuration_guides/operating_systems.shtml#linux2)

> **···**
>
> On Wed, Jul 27, 2011 at 11:06 PM, Douglas Seifert \<doug@dseifert.net\> wrote:
> 
> > A) tell me that [prelink] is necessary to have installed

---

<div class="post-metadata">

**Author:** ![Chip\_Burke](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Chip\_Burke](https://rubytalk.org/u/Chip_Burke)\
**Post date:** [24 March 2011 19:26 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/17 "2011-03-24T19:26:13Z")

</div>

Matt Lawrence wrote in post #989062:

> **···**
>
> > On Fri, 25 Mar 2011, Chip Burke wrote:
> > 
> > > above.
> > 
> > You should check to see if you have the auto updates using yum  
> > configured.
> > 
> > -- Matt  
> > It's not what I know that counts.  
> > It's what I can remember in time to use.
> 
> Yum is absolutely off. I can't imagine if it were on. Everything would  
> be blowing out everywhere as PHP, Python, Perl, etc are all compiled  
> form source and yum would butcher all of them.
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Chip\_Burke](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Chip\_Burke](https://rubytalk.org/u/Chip_Burke)\
**Post date:** [24 March 2011 19:44 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/18 "2011-03-24T19:44:11Z")

</div>

unknown wrote in post #989064:

> > 6 months later developer says "I gotta have 1.9.2!"
> 
> Have you looked into something like RVM to help manage multiple  
> versions of Ruby installed in independent prefixes?
> 
> > above.
> 
> Thanks. Do you have any hosts running 1.9 that was not installed over  
> a 1.8 install? (I assume your hosts that only ever had 1.8 installed  
> never behaved like this.)

Correct. 1.8.x installs have been stable for a long while starting with  
1.8.5 several years back. And these are all indeed upgrades from 1.8.x.

RVM has been discussed but the thought was get 1.9.x working first as a  
proof of concept, but I suppose RVM could work the opposite way and  
insulate versions. Regardless, one would think you could get a global  
install of 1.9.2 working as Fedora and CentOS aren't exactly back water  
odd ball distros.

> **···**
>
> > On Thu, Mar 24, 2011 at 3:08 PM, Chip Burke \<cburke@innova-partners.com\> \> wrote:
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Brabuhr](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Brabuhr](https://rubytalk.org/u/Brabuhr)\
**Post date:** [24 March 2011 21:22 UTC](https://rubytalk.org/t/ruby-corrupts-after-a-period-of-time/62195/19 "2011-03-24T21:22:30Z")

</div>

I have run 1.9.x on CentOS (PREFIX=/usr/local) with no issues, but I  
don't know why you \*later\* have trouble installing it over 1.8.7 in  
/usr.

> **···**
>
> On Thu, Mar 24, 2011 at 3:44 PM, Chip Burke \<cburke@innova-partners.com\> wrote:
> 
> > > Thanks. Do you have any hosts running 1.9 that was not installed over  
> > > a 1.8 install? (I assume your hosts that only ever had 1.8 installed  
> > > never behaved like this.)
> > 
> > Correct. 1.8.x installs have been stable for a long while starting with  
> > 1.8.5 several years back. And these are all indeed upgrades from 1.8.x.
> > 
> > RVM has been discussed but the thought was get 1.9.x working first as a  
> > proof of concept, but I suppose RVM could work the opposite way and  
> > insulate versions. Regardless, one would think you could get a global  
> > install of 1.9.2 working as Fedora and CentOS aren't exactly back water  
> > odd ball distros.
