httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject RE: [BUG] Solaris mmap
Date Mon, 17 Nov 1997 21:11:34 GMT
Yeah, why the heck didn't I do it this way in the first place ...
something about block_alarms() while writing a log message must have
bugged me, but it doesn't bug me right now.

+1

Dean

On Mon, 17 Nov 1997, Ben Hyde wrote:

> Move mmap error checking adjacent to the call, to assure it stay
> in synch with the predicate that attempts the mmap.
> 
> /apachen/src/main:272> cvs diff -u http_core.c
> Index: http_core.c
> ===================================================================
> RCS file: /cvs/apachen/src/main/http_core.c,v
> retrieving revision 1.140
> diff -u -r1.140 http_core.c
> --- http_core.c	1997/11/15 00:16:50	1.140
> +++ http_core.c	1997/11/17 20:35:02
> @@ -1868,17 +1868,16 @@
>   	 * file mmapped */
>  	mm = mmap (NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE,
>  		    fileno(f), 0);
> +	if ((caddr_t)-1) {
> +	    aplog_error(APLOG_MARK, APLOG_CRIT, r->server,
> +			"mmap_handler: mmap failed: %s", r->filename);
> +	}
>      } else {
>  	mm = (caddr_t)-1;
>      }
>  
>      if (mm == (caddr_t)-1) {
>  	unblock_alarms();
> -
> -	if (r->finfo.st_size >= MMAP_THRESHOLD) {
> -	    aplog_error(APLOG_MARK, APLOG_CRIT, r->server,
> -			"mmap_handler: mmap failed: %s", r->filename);
> -	}
>  #endif
>  
>  	if (d->content_md5 & 1) {
> 
> 
> > -----Original Message-----
> > From:	Dean Gaudet [SMTP:dgaudet@arctic.org]
> > Sent:	Monday, November 17, 1997 11:16 AM
> > To:	new-httpd@apache.org
> > Subject:	Re: [BUG] Solaris mmap
> > 
> > Looks like another logic error related to the performance patch from
> > Ben
> > Hyde.  default_handler should have a "mmap_attempted" boolean which is
> > used to decide when to issue the mmap failed message. 
> > 
> > and mmap_handler should be changed to default_handler. 
> > 
> > Not a showstopper imho.
> > 
> > Dean
> > 
> > On Mon, 17 Nov 1997, Lars Eilebrecht wrote:
> > 
> > > Hi,
> > > 
> > > Using a current 1.3b3-dev on Solaris 2.4 gives me
> > > 
> > >   (0)Error 0: mmap_handler: mmap failed
> > > 
> > > on HEAD requests (static files). GET requests seem to work
> > > without any problems.
> > > 
> > > 
> > > ciao...
> > > -- 
> > > Lars Eilebrecht      - "Keep computers away from windows"
> > 
> > > sfx@unix-ag.org        (Garfinkel/Spafford: Practical Unix &
> > Internet Security)      
> > > 
> 


Mime
View raw message