|Summary:||sendfile broken with LFS support on HP-UX/PA-RISC32|
|Component:||APR||Assignee:||Apache Portable Runtime bugs mailinglist <bugs>|
|URL:||intranet web site.|
|Attachments:||define the _HPUX_SOURCE feature test macro to obtain maximum functionality|
Description destroyedlolo 2007-04-26 02:43:42 UTC
Hello, I successfully configure Apache 2.2.4 on my HP-712 box under a well patched HP-UX 11.11 Unfortunately, it seems httpd doesn't work correctly. As example, I'm able to get be great "It works !" message, but if I'm trying to get an image as apache_pb.gif, I got a zero sized reply whereas the logs said the image as been transfered ("GET /apache_pb.gif HTTP/1.1" 200 2326). I configured as ./configure --enable-info=shared --enable-so --with-included-apr --with-expat=builtin --prefix=/projets/depots/apache_tst and the only modification I made in the standard httpd.conf was to modify the port and the user name to run the server. Best regards, Laurent
Comment 1 Jeff Trawick 2007-04-26 03:44:42 UTC
Put "EnableSendfile Off" in httpd.conf, restart, and try again. I haven't been able to get sendfile to work on HP-UX/PA-RISC32 (11iv1 or 11iv2) with large file support enabled (like Apache 2.2 has by default).
Comment 2 destroyedlolo 2007-04-26 04:33:16 UTC
Brillant : it's working. Thanks a lot. Have you any other clues about apache 2.2 and HP-UX on 32b machines ? Because it creates a core dump if I start it with some configuration files enabled (i.e. extra/httpd-autoindex.conf ... quite strange because if I include only this module it's working). Is 2.2 stable enough under HP-UX for a quite important server ? Thanks Laurent
Comment 3 Jeff Trawick 2007-04-26 07:21:04 UTC
>Is 2.2 stable enough under HP-UX for a quite important server? In general, 2.2 is plenty stable. I haven't done any stress testing of 2.2 on HP-UX, but I have done a fair amount of functional testing on HP-UX 11iv1 and some on 11iv2; the only issue I noticed was the sendfile mess. I wouldn't consider a sendfile issue (which can occur on a number of platforms in varying circumstances) an implication that there are other problems to worry about.
Comment 4 Jeff Trawick 2007-04-26 07:22:02 UTC
moving to APR, which owns the interface to the failing sendfile syscall...
Comment 5 Joe Orton 2007-04-27 02:21:02 UTC
The core dump at httpd startup sounds bad though - can you file a separate bug on that, running httpd under gdb to get a backtrace? I vaguely recall that there was some issue with the HP-UX sendfile64 which I never resolved - the return value was the wrong type or something?
Comment 6 destroyedlolo 2007-04-27 05:21:53 UTC
Hi Joe, I'm on holiday next week so I'll create a new bug report at my return. But, to be short, apache crashes when I enable extra/httpd-manual.conf. It seems it's when reading the configuration, because if I run bin/apachectl restart apachectl crashes and the previously running httpd is still running. I have also another problem with database authentication (bug #40582). Unfortunately, my 2 systems lost their system disks ... the same day (black day isn't it), and I was too busy to reinstall. Now I'm restarting to work on it. Bye Laurent
Comment 7 destroyedlolo 2007-05-09 08:23:15 UTC
I have created a bug report for the starting problem (#42368) Bye Laurent
Comment 8 destroyedlolo 2007-05-22 02:05:29 UTC
No crash anymore w/ 2.2.4
Comment 9 destroyedlolo 2007-05-22 02:07:21 UTC
Oups, I made a mistake. This bug is not yet solved.
Comment 10 Davi Arnaut 2007-06-22 07:51:23 UTC
Created attachment 20389 [details] define the _HPUX_SOURCE feature test macro to obtain maximum functionality The sendfile function was being used without being declared, because the _XOPEN_SOURCE_EXTENDED macro doesn't bring sendfile (and fixups) into the namespace. Tested and passes sendfile tests on: HP HP-UX 11i 11.11 PA-RISC 8700 HP HP-UX 11i v3 Itanium II * After applying the patch, execute ./buildconf
Comment 11 Jeff Trawick 2007-06-23 12:54:53 UTC
gosh Davi, I guess the real problem for me was that historically I never took the time to find an HP C compiler option to warn about missing prototypes, and all the recent staring at the sendfile() prototype myself didn't mean the compiler had even glanced at it :( thanks! (I assume that your apache.org account is working by now ;) )
Comment 12 Davi Arnaut 2007-06-23 16:26:14 UTC
(In reply to comment #11) > gosh Davi, I guess the real problem for me was that historically I never took > the time to find an HP C compiler option to warn about missing prototypes Lucky enough, I had gcc. Also, we could avoid this happening again in future by with a simple compile-time assertion: (void)(0 && sendfile); > > (I assume that your apache.org account is working by now ;) ) > Not yet, it seems to take some time.. there's no hurry.
Comment 13 Davi Arnaut 2007-06-26 16:52:48 UTC
Committed to trunk as r550877 and backported to 1.2.x in r550989. http://svn.apache.org/viewvc?view=rev&revision=550877 http://svn.apache.org/viewvc?view=rev&revision=550989
Comment 14 Jeff Trawick 2007-08-22 16:46:21 UTC
*** Bug 43189 has been marked as a duplicate of this bug. ***