www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Chambers <dav...@flosun.salk.edu>
Subject os-sunos/1294: Spurious mmap error messages?
Date Tue, 21 Oct 1997 22:22:57 GMT

>Number:         1294
>Category:       os-sunos
>Synopsis:       Spurious mmap error messages?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Oct 21 15:30:01 PDT 1997
>Originator:     davidc@flosun.salk.edu
>Release:        1.3b2
SunOS flosun 4.1.4 1 sun4c
The server logs a [Crit] error for every file smaller than MMAP_THRESHOLD
	[Tue Oct 21 14:01:36 1997] [crit] (2)No such file or directory: mmap_handler: mmap failed:

The client correctly displays the images or files, however.

Assuming this really is a bug, it must be a coding omission in http_core.c
around where the test if (mm==(caddr_t)-1) is made.  The code checks the
file size and if less than MMAP_THRESHOLD (only nonzero for SunOS) it sets
mm to (caddr_t) -1.  It then immediately checks mm to see if it's -1,
which it is, so it issues an error message.  Perhaps it should check the
file size again?

It ought to occur on any SunOS platform
(see description) - I eliminated the messages by changing line 1686 of http_core.c
to read:
	if ((mm == (caddr_t)-1) && (r->finfo.st_size >= MMAP_THRESHOLD)) {

... but I'm not sure whether this is completely correct (what does block_alarms()
and unblock_alarms() do? :-%2

View raw message