httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: WWW Form Bug Report: "broken timeout causes apache hang" on Irix
Date Sat, 07 Sep 1996 19:43:35 GMT
Rob Hartill wrote:
> 
> 
> 
> thanks for the info. I'll pass it on to the developers list.

Noone seems to have picked up on this. I'm surprised. Of course, increasing the
timeout only ameliorates the problem rather than removing it. Using waitpid
would seem a more sensible solution.

Cheers,

Ben.

> 
> regards,
> rob
> 
> dgreen@starnetc.com wrote:
> >
> >Submitter: dgreen@starnetc.com
> >Operating system: Irix, version: 6.2
> >Version of Apache Used: 1.1.1
> >Extra Modules used: 
> >URL exhibiting problem: 
> >
> >Symptoms:
> >--
> >On heavily loaded systems, apache timeout fails in module http_main.c due to race-condition
in timeout.
> >
> >Timeout is implemented using alarm(2) function as follows (see line 861 in http_main.c):
> >
> > signal (SIGALRM, longjmp_out_of_alarm);
> >    alarm(1);
> >#if defined(NEXT)
> >    wait_or_timeout_retval = wait((union wait *)status);
> >#else
> >    wait_or_timeout_retval = wait(status);
> >#endif
> >    alarm(0);
> >
> >The problem occurs when the process is scheduled out after the alarm(1); call,
> >and is scheduled back in after the alarm signal has occurred.  This is a well-known
> >race-condition, as the wait function will never be interrupted by the alarm signal.
> >So the process will hang on the wait signal (possibly forever.)  We are operating
a
> >web site with more than 2 million hits a day, with more than 800 processes running,
and we will occasionally have this problem.
> >A work-around is to increase the timeout value. (possibly to 2 or 3 seconds.)
> >
> >--
> >
> >Backtrace:
> >--
> >
> >--
> >
> 
> 
> -- 
> Rob Hartill (robh@imdb.com)    
> http://www.imdb.com/  ... why wait for a clear night to see the stars?.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message