You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marc Girod <gi...@shire.ntc.nokia.com> on 2003/04/11 23:38:05 UTC

[users@httpd] sendfile on Linux 2.4.18-14 with httpd-2.0.40-8

Hello!

I am using Apache to serve web pages from a ClearCase vob
(IBM/Rational ClearCase v2002.05.00 patch 19), through a dedicated
view. My server is a RedHat Linux 8.0 kernel 2.4.18-14, and my version
of httpd 2.0.40-8.

The pages returned from within the vob are blank, although httpd
detects no error and even reports an access with the right size.

Stracing the event however returns the following:

[...]
open("/var/www/html/vob/dust/index.html", O_RDONLY) = 9
setsockopt(8, SOL_TCP, TCP_NODELAY, [0], 4) = 0
setsockopt(8, SOL_TCP, TCP_CORK, [1], 4) = 0
writev(8, [{"HTTP/1.1 206 Partial Content\r\nDa"..., 322}], 1) = 322
sendfile(8, 9, [0], 1670)               = -1 ENOSYS (Function not implemented)
[...]

I would first suspect the driver of the file system, i.e. ClearCase
mvfs.o, but the sendfile man page seems to mention it as a kernel
feature, and goes on saying:

  Other Unixes often implement sendfile with different semantics and pro-
  totypes. It should not be used in portable programs.

So, could the problem be with httpd?
Also, I found the page:

http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile

Is RedHat Linux 8.0, kernel 2.4.18-14 one of the platforms with a
broken sendfile support, and should I update Apache to 2.0.44 to
disable sendfile?

Best Regards!
Marc

-- 
Marc Girod     313 Fairchild Drive       desk:   +1 650 864 6501
Nokia NBI      CA 94043 Mountain View    mobile: +1 817 703 8975
Bld C #314     USA                       fax:    +1 650 691


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] sendfile on Linux 2.4.18-14 with httpd-2.0.40-8

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 11 Apr 2003, Marc Girod wrote:
> open("/var/www/html/vob/dust/index.html", O_RDONLY) = 9

> sendfile(8, 9, [0], 1670)               = -1 ENOSYS (Function not implemented)

> I would first suspect the driver of the file system, i.e. ClearCase
> mvfs.o, but the sendfile man page seems to mention it as a kernel
> feature, and goes on saying:
>
>   Other Unixes often implement sendfile with different semantics and pro-
>   totypes. It should not be used in portable programs.
>
> So, could the problem be with httpd?
> Also, I found the page:
>
> http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile
>
> Is RedHat Linux 8.0, kernel 2.4.18-14 one of the platforms with a
> broken sendfile support, and should I update Apache to 2.0.44 to
> disable sendfile?

Yes, or recompile apache with (if I remember correctly)
--disable-sendfile.  The problem is not really apache.  It is a filesystem
that doesn't support the required sendfile symantics.

Apache does disable sendfile on platforms that don't support it.  The
problem is platforms that in general support sendfile, but don't support
it at particular locations.  Apache handles this by allowing you to
specify (with the EnableSendfile directive) exactly where sendfile is
supported.

It would be nice, of course, if apache would see the ENOSYS, log a
warning, and then proceed to serve the file as if sendfile wasn't
available at all.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org