You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Wesley W. Garland" <we...@page.ca> on 2006/04/19 17:17:04 UTC

APR configure, sendfile & SunOS 5.8

This report isn't as complete as my UUID report, as this is IIRC a
reasonably well-understood problem.

1. SunOS 5.8 does not necessarily ship with sendfile() and friends

2. APR configure with 1.2.7 seems to think it does

3. APR configure with 1.0.1 didn't care (or maybe 1.0.1 didn't support
sendfile?)

4. APR configure could detect the presence of sendfile on Solaris by
checking for
/usr/include/sys/sendfile.h
/usr/lib/libsendfile.so (or .so.1)

4. To work around: add --without-sendfile to ./configure command line

5. To fix: Add sunsolve patches to correct Sun BugID 4400361: "Need to add
support for sendfilev() system call"
Sparc patch 111297-01 fixes this bug, and requires these other patches:
108528-09 or greater (kernel)
108991-13 or greater (libc)
109025-03 or greater (truss)
111295-01 or greater (pstack)

x86 patch 111298-01 fixes this bug, and requires these other patches:
108529-09 or greater
108992-13 or greater
109026-04 or greater
111296-01 or greater

Obviously, this solution requires a reboot if you do not have appropriate
versions of 108528 or 108991. I am not sure about the other three.  Use showrev
-p to view the patch status of a Solaris box.

Warning to the Solaris system administrator encountering this problem: Most
of these patches have now been
aggregated-and-aggregrated-and-replaced-and-aggregated-etc. In order to
ACTUALLY fix the problem, you will either have to:

   - Spend non-trivial time determining the latest patches to resolve
   4400361
   - Install patches flagged OBSOLETE
   - Install the latest patch cluster
   - Use the Sun automagic patch tool to resolve this issue

I have not tested the solution (5); I have employed the workaround (4) for
this ancient box. It is a SunOS 5.8 Generic_108528-15. I do not require
apr_sendfile().

According to the notes on SunSolve, BugID 4400361 is addressed in Solaris 8
hardware 7/03. I am fairly certain (99.5%) that it was never a problem with
Solaris 9.

I raise this issue to help APR configure maintainers tweak their settings,
or help APR-using system administrators compile/install APR on older SunOS
5.8 platforms (i.e. those which have been in production for years and have
only received security/critical patches).

Wes

--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Re: APR configure, sendfile & SunOS 5.8

Posted by Jeff Trawick <tr...@gmail.com>.
On 4/19/06, Wesley W. Garland <we...@page.ca> wrote:
> This report isn't as complete as my UUID report, as this is IIRC a
> reasonably well-understood problem.
>
> 1. SunOS 5.8 does not necessarily ship with sendfile() and friends
right
>
> 2. APR configure with 1.2.7 seems to think it does

It checks for sys/sendfile.h and the sendfilev function, like the
other levels of APR.
>
> 3. APR configure with 1.0.1 didn't care (or maybe 1.0.1 didn't support
> sendfile?)
APR 0.9 and 1.0 also have the logic to detect sendfile on the machine
where APR is built.

>
> 4. APR configure could detect the presence of sendfile on Solaris by
> checking for
> /usr/include/sys/sendfile.h
> /usr/lib/libsendfile.so (or .so.1)

That's essentially what it does.

Do you have configure output for the machine where APR 1.2 thinks
(incorrectly) that sendfile is present?
>
> 4. To work around: add --without-sendfile to ./configure command line

Anybody building any level of APR on Solaris 8 and hoping to run the
binaries on a wide range of Solaris 8 boxes should add this parameter.

Is that really what is happening?

No level of APR detects at run-time whether or not sendfile is
present.  It only detects at build time, based on the characteristics
of the build machine.