Mongrel difficulties

So, not much progress on Trade and Dominion lately, but today I’m working on it. Now, I’m running Mongrel 1.1.5 as my web server, and the difficulty is this: Five or ten minutes after I start it up, it hangs and refuses to serve me any webpages. I am fairly confident this is not in my code, because I’ve stripped that down to just a “Hello, World” webpage and I still see the hang. Mongrel will sit about consuming 95% of my CPU time until I kill it from outside. The gdb trace:

#0 0x0076e594 in malloc_consolidate () from /lib/tls/libc.so.6
#1 0x0076dd5b in _int_malloc () from /lib/tls/libc.so.6
#2 0x0076d0fd in malloc () from /lib/tls/libc.so.6
#3 0x0806b272 in ruby_xmalloc (size=8595040) at gc.c:105
#4 0x08097447 in ruby_re_compile_pattern (pattern=0xa217380 "\\A/u3/rolfa/Trade/app/controllers(/|\\\\)", size=39, bufp=0xa2173c8)
at regex.c:2453
#5 0x08093fca in make_regexp (s=0xa217380 "\\A/u3/rolfa/Trade/app/controllers(/|\\\\)", len=39, flags=0) at re.c:643
#6 0x08094d38 in rb_reg_initialize (obj=3065444960, s=0xa217380 "\\A/u3/rolfa/Trade/app/controllers(/|\\\\)", len=39, options=0)
at re.c:1374
#7 0x08094ea7 in rb_reg_new (s=0xa217380 "\\A/u3/rolfa/Trade/app/controllers(/|\\\\)", len=39, options=0) at re.c:1408
#8 0x0805932a in rb_eval (self=3072770260, n=0x81) at eval.c:3881
#9 0x0805861f in rb_eval (self=3072770260, n=0x81) at eval.c:2983
#10 0x08056a36 in rb_eval (self=3072770260, n=0x81) at eval.c:3046
#11 0x0805a77d in rb_yield_0 (val=3074079420, self=3072770260, klass=0, flags=-1222152216, avalue=0) at eval.c:5033
#12 0x0805ad0a in rb_yield (val=3074079420) at eval.c:5117
#13 0x080b8c52 in rb_ary_collect (ary=3068027260) at array.c:1719
#14 0x08066ee3 in call_cfunc (func=0x80b8bfc , recv=3068027260, len=169506376, argc=0, argv=0xa1a75c8) at eval.c:5700
#15 0x0805c0cf in rb_call0 (klass=3076367580, recv=3068027260, id=3753, oid=129, argc=0, argv=0x0, body=0xb75d9e60, flags=0) at eval.c:5859
#16 0x0805cae9 in rb_call (klass=3076367580, recv=3068027260, mid=3753, argc=0, argv=0x0, scope=0, self=3072770260) at eval.c:6106
#17 0x08057d43 in rb_eval (self=3072770260, n=0x81) at eval.c:3487
#18 0x08057297 in rb_eval (self=3072770260, n=0x81) at eval.c:3215
#19 0x08057c3e in rb_eval (self=3072770260, n=0x81) at eval.c:3479
#20 0x08057c3e in rb_eval (self=3072770260, n=0x81) at eval.c:3479
#21 0x08057c3e in rb_eval (self=3072770260, n=0x81) at eval.c:3479
#22 0x0805c428 in rb_call0 (klass=3072770120, recv=3072770260, id=46737, oid=129, argc=0, argv=0xbffddac4, body=0xb7277088, flags=0)
at eval.c:6010
#23 0x0805cae9 in rb_call (klass=3072770120, recv=3072770260, mid=46737, argc=1, argv=0xbffddac0, scope=1, self=3072770260) at eval.c:6106
#24 0x08057d43 in rb_eval (self=3072770260, n=0x81) at eval.c:3487
#25 0x080576fa in rb_eval (self=3072770260, n=0x81) at eval.c:3670
#26 0x0805c3bd in rb_call0 (klass=3072770120, recv=3072770260, id=18833, oid=129, argc=0, argv=0xbffde8a4, body=0xb7275698, flags=0)
at eval.c:5983
#27 0x0805cae9 in rb_call (klass=3072770120, recv=3072770260, mid=18833, argc=1, argv=0xbffde8a0, scope=1, self=3072770260) at eval.c:6106
#28 0x08057d43 in rb_eval (self=3072770260, n=0x81) at eval.c:3487
#29 0x080576fa in rb_eval (self=3072770260, n=0x81) at eval.c:3670
#30 0x08057503 in rb_eval (self=3072770260, n=0x81) at eval.c:3301
#31 0x08056711 in rb_eval (self=3072770260, n=0x81) at eval.c:2957
#32 0x0805c428 in rb_call0 (klass=3072770120, recv=3072770260, id=46673, oid=129, argc=0, argv=0xbffe0294, body=0xb72786cc, flags=0)
at eval.c:6010
#33 0x0805cae9 in rb_call (klass=3072770120, recv=3072770260, mid=46673, argc=1, argv=0xbffe0290, scope=1, self=3072770260) at eval.c:6106
#34 0x08057d43 in rb_eval (self=3072770260, n=0x81) at eval.c:3487
#35 0x08057503 in rb_eval (self=3072770260, n=0x81) at eval.c:3301
#36 0x0805c428 in rb_call0 (klass=3072770120, recv=3072770260, id=46649, oid=129, argc=0, argv=0xbffe1074, body=0xb7278c44, flags=0)
at eval.c:6010
#37 0x0805cae9 in rb_call (klass=3072770120, recv=3072770260, mid=46649, argc=1, argv=0xbffe1070, scope=0, self=3065453400) at eval.c:6106
#38 0x08057d43 in rb_eval (self=3065453400, n=0x81) at eval.c:3487
#39 0x0805a77d in rb_yield_0 (val=3065448180, self=3065453400, klass=3065453380, flags=-1222185816, avalue=2) at eval.c:5033
#40 0x08060d7b in proc_invoke (proc=3072745580, args=3065448140, self=3065453400, klass=0) at ruby.h:679
#41 0x0805c809 in rb_call0 (klass=3076398380, recv=3065453400, id=47065, oid=129, argc=1, argv=0xbffe1b60, body=0xb7265ff4, flags=2)
at eval.c:5893

(...)

seems to suggest an infinite loop somewhere in Mongrel, which is difficult to debug.

Advertisements

1 Comment

Filed under Projects, Trade and Dominion

One response to “Mongrel difficulties

  1. Richard Campbell

    But apparently depressingly common.

    “Results 1 – 10 of about 2,100 for +mongrel +”infinite loop”. (0.51 seconds)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s