Bug 477759

Summary: httpd does not support modules built with -D_FILE_OFFSET_BITS=64
Product: Red Hat Enterprise Linux 5 Reporter: Jarkko <jval>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-13 13:13:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jarkko 2008-12-23 12:52:38 UTC
Description of problem:
httpd does not support modules built with -D_FILE_OFFSET_BITS=64

When I remove -D_FILE_OFFSET_BITS=64 from CFLAGS, things work. With that flag I get segfaults. The module gets that flag automatically from mysql as pkg-config is used, so removing the flag requires some ugly hacks.


Version-Release number of selected component (if applicable):
httpd-2.2.3-11.el5_2


How reproducible:
Well... Always if the flag is there.


Steps to Reproduce:
1. Build a httpd module with -D_FILE_OFFSET_BITS=64 in CFLAGS.
2. Load the module in httpd configuration.
3. Request a page.
  
Actual results:
segfaults


Expected results:
things working :)


Additional info:
Not sure if httpd actually supports -D_FILE_OFFSET_BITS=64 or not (apr has some comments about it in configure/configure.in and CHANGES - under SOURCES/httpd-2.2.3/srclib/apr/). If it does, this could go away if httpd would be built with that flag? I already tried to set that flag in CFLAGS, but httpd doesn't take it. I didn't try to patch Makefile etc. so I didn't actually try what happens if the actual build takes the flag.

Comment 1 Joe Orton 2009-01-13 13:13:08 UTC
No, this is not supported.

Redefining FILE_OFFSET_BITS affects the size of system types and hence can e.g. affect various structure sizes.   I recommend you separate your module into multiple source files, to isolate the parts which need to interact with MySQL (and hence need _FILE_OFFSET_BITS=64.