# Mongrel has crashed

**URL:** <https://www.ruby-forum.com/t/mongrel-has-crashed/131684>\
**Category:** Mongrel\
**Created:** [March 12, 2008, 2:29pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684 "2008-03-12T14:29:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 12, 2008, 2:29pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/1 "2008-03-12T14:29:00Z")

</div>

Hi,

my mongrel has crashed with following errors in the logfile:

\*\* Starting Rails with development environment…  
\*\* Rails loaded.  
\*\* Loading any Rails specific GemPlugins  
\*\* Signals ready. TERM =\> stop. USR2 =\> restart. INT =\> stop (no  
restart).  
\*\* Rails signals registered. HUP =\> reload (without restart). It might  
not work well.  
\*\* Mongrel 1.1.3 available at 0.0.0.0:3000  
\*\* Writing PID file to ./script/…/config/…/tmp/pids/mongrel.pid  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/core\_ext/module/inclusion.rb:4:  
[BUG] gc\_sweep(): unknown data type 0x0(0xa8b2241c)  
ruby 1.8.6 (2008-03-03) [i686-linux]

Rails 1.2.6

What’s wrong?

My system is too important to hang up in so stupid way and it’s too late  
to choose something different than rails…

m.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 12, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/2 "2008-03-12T17:40:36Z")

</div>

On Wed, Mar 12, 2008 at 2:32 AM, Marcin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/core\_ext/module/inclusion.rb:4:  
> [BUG] gc\_sweep(): unknown data type 0x0(0xa8b2241c)  
> ruby 1.8.6 (2008-03-03) [i686-linux]
> 
> Rails 1.2.6
> 
> What’s wrong?

That’s a fatal Ruby exception. Something triggered an error that the  
Ruby interpreter thinks is a bug in the interpreter.

Did this happen just once, or are you getting it often? Do you have  
anything monitoring the mongrel processes so that if they do go away,  
they can be restarted?

Kirk H.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 12, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/3 "2008-03-12T17:58:20Z")

</div>

On Wed, Mar 12, 2008 at 11:33 AM, Kirk H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> On Wed, Mar 12, 2008 at 2:32 AM, Marcin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/core\_ext/module/inclusion.rb:4:  
> > [BUG] gc\_sweep(): unknown data type 0x0(0xa8b2241c)  
> > ruby 1.8.6 (2008-03-03) [i686-linux]
> > 
> > Rails 1.2.6
> > 
> > What’s wrong?

My off-the-cuff guesses, in order of where I’d look

- A funny gem or plugin is in use with your Rails app, and that’s  
causing problems

- Bad hardware

- A bad build of ruby

What third-party code (other than Rails) are you using?

Cheers,  
-Nate

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 12, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/4 "2008-03-12T20:17:25Z")

</div>

Nate V. pisze:

> > > What’s wrong?
> 
> My off-the-cuff guesses, in order of where I’d look
> 
> - A funny gem or plugin is in use with your Rails app, and that’s  
> causing problems

I realized that there’s a new version, so I’ll try to upgrade to 1.1.4.  
Maybe also there’s new ruby.

It happened from time to time, e.g. once for 3-4 weeks with my previous  
mongrel version (1.0.x). So I’ve made an upgrade to 1.1.3, but it worked  
only for 2 weeks.

I don’t use any plugins in my rails app.

I’ll come back if it remained with 1.1.4

Thanks,

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 12, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/5 "2008-03-12T21:00:24Z")

</div>

On Wed, Mar 12, 2008 at 1:15 PM, Marcin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I realized that there’s a new version, so I’ll try to upgrade to 1.1.4.  
> Maybe also there’s new ruby.

> It happened from time to time, e.g. once for 3-4 weeks with my previous  
> mongrel version (1.0.x). So I’ve made an upgrade to 1.1.3, but it worked  
> only for 2 weeks.
> 
> I don’t use any plugins in my rails app.
> 
> I’ll come back if it remained with 1.1.4

It’s unlikely to be an issue with Mongrel, or we would have heard  
about it before, especially since you say that you have seen the error  
while running under two different versions of Mongrel, both of which  
have been out for a long time, and that you have seen this error  
multiple times.

/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/core\_ext/module/inclusion.rb:4:  
[BUG] gc\_sweep(): unknown data type 0x0(0xa8b2241c)  
ruby 1.8.6 (2008-03-03) [i686-linux]

If you look at the Ruby source code, that error is called during  
obj\_free() (defined in gc.c) when the object being freed doesn’t have  
a known node type.

My suspicion is that something that you are using has an extension in  
it that is doing something which interacts poorly with Ruby’s GC code.

Which version of Ruby 1.8.6 is it that you are running? Make sure you  
are using the latest patch level of 1.8.6. This is very important.

Kirk H.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 21, 2008, 11:55am UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/6 "2008-03-21T11:55:48Z")

</div>

It still crashes… ☹

/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/core\_ext/module/inclusion.rb:4:  
[BUG] gc\_sweep(): unknown data type 0x0(0xac53841c)  
ruby 1.8.6 (2008-03-03) [i686-linux]

Once, there was a crash message related to gettext, but I’ve made an  
upgrade and it crashes like that.

How to trace or debug that?

m.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 21, 2008, 3:40pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/7 "2008-03-21T15:40:47Z")

</div>

On Fri, Mar 21, 2008 at 4:52 AM, Marcin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> How to trace or debug that?  
> Look at the exception. Since you’ve gotten the same identical  
> exception twice, start there. It’s in ActiveSupport, not Mongrel,  
> BTW.

Here’s the line in question:

ObjectSpace.each\_object(Class) { |k| classes \<\< k if  
k.included\_modules.include?(self) }

This is an interesting place for that error to occur. I don’t have an  
immediate hypothesis, but somehow something is getting into the Ruby  
heap that isn’t a recognized node type.

Kirk H.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 21, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/8 "2008-03-21T18:02:42Z")

</div>

Do you have any GC patches in Ruby, use of DL, shaky C libs, or a  
weird Ruby patchlevel?

Evan

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 12, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/9 "2008-03-12T21:12:14Z")

</div>

> It’s unlikely to be an issue with Mongrel, or we would have heard  
> about it before, especially since you say that you have seen the error  
> while running under two different versions of Mongrel, both of which  
> have been out for a long time, and that you have seen this error  
> multiple times.

The error message was a bit different with previous version of mongrel  
but I assume that it was similar.

> My suspicion is that something that you are using has an extension in  
> it that is doing something which interacts poorly with Ruby’s GC code.
> 
> Which version of Ruby 1.8.6 is it that you are running? Make sure you  
> are using the latest patch level of 1.8.6. This is very important.

I use latest available in gentoo’s portage: patchlevel 1.8.6 p114 and  
AFAIK it’s latest stable version.

My gems:

\*\*\* LOCAL GEMS \*\*\*

actionmailer (1.3.6)  
Service layer for easy email delivery and testing.

actionpack (1.13.6)  
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.6)  
Web service support for Action Pack.

activerecord (1.15.6)  
Implements the ActiveRecord pattern for ORM.

activesupport (1.4.4)  
Support and utility classes used by the Rails framework.

cgi\_multipart\_eof\_fix (2.5.0)  
Fix an exploitable bug in CGI multipart parsing.

daemons (1.0.5)  
A toolkit to create and control daemons in different ways

fastthread (1.0.1)  
Optimized replacement for thread.rb primitives

gem\_plugin (0.2.3)  
A plugin system based on rubygems that uses dependencies only

gettext (1.9.0)  
Ruby-GetText-Package is a libary and tools to localize messages.

mongrel (1.1.3)  
A small fast HTTP library and server that runs Rails, Camping,  
Nitro  
and Iowa apps.

mongrel\_upload\_progress (0.2.2)  
The mongrel\_upload\_progress gemplugin

rails (1.2.6)  
Web-application framework with template engine, control-flow layer,  
and ORM.

rake (0.7.3)  
Ruby based make-like utility.

sources (0.0.1)  
This package provides download sources for remote gem installation

I’ll try to upgrade them later.

Thanks!

m.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 21, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/10 "2008-03-21T18:13:24Z")

</div>

On Fri, Mar 21, 2008 at 10:50 AM, Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Do you have any GC patches in Ruby, use of DL, shaky C libs, or a  
> weird Ruby patchlevel?

Evan, if you look back in the thread, he listed his gems on Mar 12th.

Kirk H.

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 21, 2008, 6:27pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/11 "2008-03-21T18:27:02Z")

</div>

I saw that, so I mentioned gettext as the only one that stands out.  
There can be more gems than just system gems though.

Evan

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 21, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/12 "2008-03-21T18:03:54Z")

</div>

Some things to try:

Downgrade Ruby to p111 (unlikely).

Avoid using gettext (more likely).

Are you using any RubyInline plugins or vendorized gems?

Evan

---

<div class="post-metadata">

**Author:** ![Marcin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Post date:** [March 22, 2008, 1:15pm UTC](https://www.ruby-forum.com/t/mongrel-has-crashed/131684/13 "2008-03-22T13:15:57Z")

</div>

[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Message-ID: [1185b4255b2b2872750d836f6a20846b@localhost](mailto:1185b4255b2b2872750d836f6a20846b@localhost)  
X-Sender: removed\_email\_address@domain.invalid  
Received: from cie46.neoplus.adsl.tpnet.pl [83.31.28.46] with HTTP/1.1  
(POST);  
Sat, 22 Mar 2008 13:05:06 +0100  
User-Agent: RoundCube Webmail/0.1  
Content-Type: text/plain; charset=“UTF-8”  
Content-Transfer-Encoding: 8bit

Here comes my current gem list after upgrade:

hosting cur # gem list

\*\*\* LOCAL GEMS \*\*\*

actionmailer (1.3.6)  
Service layer for easy email delivery and testing.

actionpack (1.13.6)  
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.6)  
Web service support for Action Pack.

activerecord (1.15.6)  
Implements the ActiveRecord pattern for ORM.

activesupport (1.4.4)  
Support and utility classes used by the Rails framework.

cgi\_multipart\_eof\_fix (2.5.0)  
Fix an exploitable bug in CGI multipart parsing.

daemons (1.0.5)  
A toolkit to create and control daemons in different ways

fastthread (1.0.1)  
Optimized replacement for thread.rb primitives

gem\_plugin (0.2.3)  
A plugin system based on rubygems that uses dependencies only

gettext (1.90.0, 1.9.0)  
Ruby-GetText-Package is a libary and tools to localize messages.

icalendar (1.0.2)  
A ruby implementation of the iCalendar specification (RFC-2445).

mongrel (1.1.4)  
A small fast HTTP library and server that runs Rails, Camping, Nitro  
and Iowa apps.

mongrel\_upload\_progress (0.2.2)  
The mongrel\_upload\_progress gemplugin

rails (1.2.6)  
Web-application framework with template engine, control-flow layer,  
and ORM.

rake (0.7.3)  
Ruby based make-like utility.

sources (0.0.1)  
This package provides download sources for remote gem installation

hosting cur # ruby -v  
ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]

I have 2 versions of gettext, I’ll try to uninstall older one, and if it  
won’t help, the newer one.

I have latest patchlevel of ruby, only custom patches could be from  
gentoo’s portage.

It happened a few times before I’ve started to use gettext, but my  
mongrel  
was also older. Arghh seems to be difficult to find, what’s going on.  
I’ll  
try to do this gettext stuff…

m.
