mod_fastcgi process manager crashing with Segmentation fault

Eric Hodel <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
We are running fcgi-devkit-2.4.0, mod_fastcgi 2.4.2 on FreeBSD 4.10 
with Apache/2.0.52 and ruby-fcgi 0.8.4 and 0.8.5 children (tried an 
upgrade, no fix).

One (or more) of the ruby children dies (purposefully) when its FCGI 
pipe is closed, then mod_fastcgi crashes with a Segmentation fault 
under 1 second afterwards.  Sometimes mod_fastcgi is able to restart a 
child process before crashing, sometimes not.

Once the the mod_fastcgi process manager dies, the whole site is dead.

I have a core file for the ruby process, which purposefully crashes but 
no cores for httpd, despite setting CoreDumpDirectory /tmp

The crashes happen during periods of low load, ~20000 hits per day.  
FastCGI and ruby operated flawlessly under high load, ~50000 hits or so 
per day.

The FastCGI PM once went 13210 hits and almost 12 hours 50 minutes 
between crashes.
Another time the PM went 1085 hits and only 45 minutes between crashes.

Attached are Apache error logs of the FastCGI PM crashing:

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
fcgi-crash.log (application/octet-stream, 5.1 KB)
[Mon Nov 22 14:22:11 2004] [notice] Graceful restart requested, doing restart
[Mon Nov 22 14:22:11 2004] [notice] FastCGI: process manager initialized (pid 62827)
[Mon Nov 22 14:22:11 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62828)
[Mon Nov 22 14:22:11 2004] [notice] Apache/2.0.52 (FreeBSD) mod_fastcgi/2.4.2 configured -- resuming normal operations
[Mon Nov 22 14:22:11 2004] [info] Server built: Nov  4 2004 11:48:25
[Mon Nov 22 14:22:11 2004] [debug] prefork.c(955): AcceptMutex: flock (default: flock)
[Mon Nov 22 14:22:11 2004] [warn] long lost child came home! (pid 62758)
[Mon Nov 22 14:22:11 2004] [warn] long lost child came home! (pid 62757)
[Mon Nov 22 14:22:12 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62849)
[Mon Nov 22 14:22:13 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62850)
[Mon Nov 22 14:22:14 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62851)
[Mon Nov 22 14:22:15 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62852)
[Mon Nov 22 14:22:16 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62853)
[Mon Nov 22 14:22:17 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62854)
[Mon Nov 22 14:22:18 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62855)
[Mon Nov 22 14:22:19 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62856)
[Mon Nov 22 14:22:20 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 62857)
/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

[Mon Nov 22 14:31:03 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" (pid 62850) terminated due to uncaught signal '6' (Abort trap)
[Mon Nov 22 14:31:03 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" restarted (pid 62891)
[Mon Nov 22 14:31:04 2004] [notice] child pid 62827 exit signal Segmentation fault (11)
[Mon Nov 22 14:31:04 2004] [warn] long lost child came home! (pid 62827)
/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

...

[Tue Nov 23 06:11:35 2004] [notice] FastCGI: process manager initialized (pid 66810)
[Tue Nov 23 06:11:35 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66811)
[Tue Nov 23 06:11:35 2004] [notice] Apache/2.0.52 (FreeBSD) mod_fastcgi/2.4.2 configured -- resuming normal operations
[Tue Nov 23 06:11:35 2004] [info] Server built: Nov  4 2004 11:48:25
[Tue Nov 23 06:11:35 2004] [debug] prefork.c(955): AcceptMutex: flock (default: flock)
[Tue Nov 23 06:11:36 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66833)
[Tue Nov 23 06:11:37 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66834)
[Tue Nov 23 06:11:38 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66835)
[Tue Nov 23 06:11:39 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66837)
[Tue Nov 23 06:11:40 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66838)
[Tue Nov 23 06:11:41 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66839)
[Tue Nov 23 06:11:42 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66840)
[Tue Nov 23 06:11:43 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66841)
[Tue Nov 23 06:11:44 2004] [warn] FastCGI: server "/usr/local/www/our_site/public/dispatch.fcgi" started (pid 66842)
/usr/local/lib/ruby/1.8/cgi.rb:725: [BUG] rb_sys_fail() - errno == 0 
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

[Tue Nov 23 06:40:19 2004] [notice] child pid 66810 exit signal Segmentation fault (11)
[Tue Nov 23 11:55:08 2004] [notice] FastCGI: process manager initialized (pid 67845)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.