>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
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3b2
>Environment:
SunOS flosun 4.1.4 1 sun4c
gcc 2.7.2.2
>Description:
The server logs a [Crit] error for every file smaller than MMAP_THRESHOLD
e.g.
[Tue Oct 21 14:01:36 1997] [crit] (2)No such file or directory:
mmap_handler: mmap failed: /u3/www/docs/images/bullets/dots/yl_dot.gif
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?
>How-To-Repeat:
It ought to occur on any SunOS platform
>Fix:
(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
>Audit-Trail:
>Unformatted: