Bug 40497 - sendfile appears broken (hp-ux)
Summary: sendfile appears broken (hp-ux)
Status: CLOSED DUPLICATE of bug 42261
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_worker (show other bugs)
Version: 2.2.2
Hardware: HP HP-UX
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://not externally reachable, send...
Depends on:
Reported: 2006-09-13 13:49 UTC by Hanno Borns
Modified: 2007-10-08 03:36 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Borns 2006-09-13 13:49:33 UTC

Server version: Apache/2.2.3
Server built:   Aug 31 2006 17:33:21

Very interesting effect: When a particular string appears inside an html file,
Apache returns nothing and closes the connection.

Without this particular string the page gets delivered.
Only the string inside an html file gets delivered as well.

Data ...

<script language="javascript" type="text/javascript"

-> Result: Tag appears in output

    <title>Batchnet Gateway</title>
    <link rel="stylesheet" type="text/css"

-> Result: Content is sent

    <title>Batchnet Gateway</title>
    <link rel="stylesheet" type="text/css"
    <script language="javascript" type="text/javascript"

-> Result: Nothing sent, connection closed.

I am more than clueless what else to check, so considering this a potential bug.

The Apache installation on that this appears cannot be exposed to the internet.
If you want to see it, please drop me an email and I can share a screen to see it.
Comment 1 Ruediger Pluem 2006-09-13 14:30:00 UTC
Have you tried this only with a browser or also with a plain telnet connection?
The only thing I could think of that this could have something to do with Apache
itself is a problem with sendfile or mmap on HP-UX. Please add the following
directives to your httpd.conf and have a look if the problem is still there once
you restarted the apache:

EnableMMAP Off
EnableSendfile Off
Comment 2 Hanno Borns 2006-09-13 14:44:50 UTC
I had tried to get the page using wget which resulted in the same problem.

When trying with telnet, the behavior was the same odd thing.

However, your proposal with the directives EnableMMAP Off
and EnableSendfile Off in the httpd.conf helped; - the problem is resolved.

The drives serving these files are directly attached to the system, not 
mounted over the network or so.

In case the configure command would need to be adjusted, the OS this problem 
appeared on is "HP-UX isoit666 B.11.11 U 9000/800 601319351 unlimited-user 

In case you need any other information like patch level or compiler versions 
please let me know and I will try to supply.

Thanks for the very fast response!
Comment 3 Joe Orton 2006-09-13 14:56:33 UTC
- is this a 32-bit build?
- did you have this problem with 2.0.x? 

The large file support in 2.2 means that different code paths are being exercised.
Comment 4 Hanno Borns 2006-09-13 15:06:26 UTC
I am not sure if it is a 32 bit build but reading the debugger line (ILP32) 
I'd guess it is 32 bit.

[isoit666]apache/bin $ what httpd
        $Revision: 92453-07 linker linker crt0.o B.11.30 010914 $
        HP92453-02A.11.00 HP-UX SYMBOLIC DEBUGGER (END.O ILP32) $Revision: 
75.04 $

If you have any other command that I should execute to determine this, please 
let me know.

I never compiled 2.0 on this machine, 2.2.3 was the very first build here. If 
I should compile 2.0 please let me know, I can give it a try if that would 
help to tackle a problem.
Comment 5 Ruediger Pluem 2006-09-13 19:21:55 UTC
I assume that you added both directives at once as I suggested. Could you please
retry with only one of them used (so only EnableMMAP Off or EnableSendfile Off
added to the httpd.conf). This would help to discover if the problem is with
sendfile or MMAP or both.
Comment 6 Hanno Borns 2006-09-14 08:50:51 UTC
Yes, I added both at a time.

With the following setting it works:

#EnableMMAP off
EnableSendfile off

The same thing toggled like this doesn't work:

EnableMMAP off
#EnableSendfile off

So it appears not MMAP is the problem but Sendfile.
Comment 7 Nick Kew 2007-10-07 18:04:46 UTC
OP has answered all the relevant questions.  Updating summary in case it crosses
anyone's radar.
Comment 8 Jeff Trawick 2007-10-08 03:36:35 UTC
fixed in current 2.2.x tarballs (since fixed in current apr 1.2.x)

*** This bug has been marked as a duplicate of 42261 ***