Mongrel has crashed

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.

On Wed, Mar 12, 2008 at 2:32 AM, Marcin L. [email protected]
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.

On Wed, Mar 12, 2008 at 11:33 AM, Kirk H. [email protected]
wrote:

On Wed, Mar 12, 2008 at 2:32 AM, Marcin L. [email protected] 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

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,

On Wed, Mar 12, 2008 at 1:15 PM, Marcin L. [email protected]
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.

It still crashes… :frowning:

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

On Fri, Mar 21, 2008 at 4:52 AM, Marcin L. [email protected]
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.

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

Evan

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.

On Fri, Mar 21, 2008 at 10:50 AM, Evan W. [email protected] 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.

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

Some things to try:

Downgrade Ruby to p111 (unlikely).

Avoid using gettext (more likely).

Are you using any RubyInline plugins or vendorized gems?

Evan

[email protected]
[email protected]
[email protected]
[email protected]
[email protected] [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Message-ID: 1185b4255b2b2872750d836f6a20846b@localhost
X-Sender: [email protected]
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.