httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: EINTR from fopen() in ap_pfopen()
Date Fri, 20 Nov 1998 22:58:48 GMT
First try disabling OPTIMIZE_TIMEOUTS ... see if that helps any.

It's possible the longjmp is pulling you out of a library routine that has
an alarm setup... which would be odd.

Do you have anything like strace/truss/ktrace?  It might give some useful
info.

I guess if you have to, you can put the EINTR in there... but I'm just
concerned that the EINTR could happen elsewhere and it'd be nice to know
why it's really happenning.

Dean

On Fri, 20 Nov 1998, Mark Bixby wrote:

> Dean Gaudet writes:
> > 
> > SIGALRM is the only likely culprit... look for timeout info in your
> > error_log... 
> 
> The scenario as I presently understand it:
> 
> I'm using an SVIPC shmxxx() scoreboard.  This #defines OPTIMIZE_TIMEOUTS.
> 
> I'm browsing against the server, and the various children are handling my
> requests.  The parent OPTIMIZE_TIMEOUTS code decides to SIGALRM one of the
> children that has previously served me 5 .html or .gif files.
> 
> The child alrm_handler fires.  Debugging code I added shows that alarm_fn is
> being called and never returns, so I assume that a longjmp is being done.  This
> is waaaay more than I wanted to know about Apache.  ;-)
> 
> Meanwhile, I am continuing to browse.  40 seconds after the child's alrm_handler
> fired, it gets another one of my requests.  And the .htaccess fopen() in
> ap_pfopen() dies with EINTR.
> 
> I've asked in my HP support call if that 40-second deferred EINTR is a feature
> or a bug.  It will be awhile before HP answers.  I've never written signal
> handling code myself, so I don't know the answer (the manuals aren't very
> explicit).
> 
> So what should I do here?:
> 
> 1) Add MPE-specific "if EINTR then retry" code to ap_pfopen()?
> 
> 2) Add general EINTR retry code to ap_pfopen()?
> 
> 3) Switch to using a scoreboard file instead of shm?
> 
> - Mark B.
> 
> > On Tue, 17 Nov 1998, Mark Bixby wrote:
> > 
> > > I'm doing final runtime testing of the 1.3.3 MPE/iX port.
> > > 
> > > I'm receiving intermittent EINTR from the fopen() in ap_pfopen() when Apache
> > > is looking for .htaccess files.  Because of the unexpected EINTR, access to
> > > the relevant directory is being denied.
> > > 
> > > I wonder which signal is popping.  Is there already built-in code to log
> > > signals as they occur, and if so, how do I turn it on?
> > > 
> > > Or do I have to write my own debugging code?  Since signal handling in Apache
> > > is somewhat vast, can somebody provide me with general hints at the ap 
> > > functions I need to be looking at?
> > > 
> > > Thanks.
> > > -- 
> > > Mark Bixby                      E-mail: markb@cccd.edu
> > > Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
> > > District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
> > > Technical Support               Voice: +1 714 438-4647
> > > "You can tune a file system, but you can't tune a fish." - tunefs(1M)
> > > 
> > 
> 
> 
> -- 
> Mark Bixby                      E-mail: markb@cccd.edu
> Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
> District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
> Technical Support               Voice: +1 714 438-4647
> "You can tune a file system, but you can't tune a fish." - tunefs(1M)
> 


Mime
View raw message