Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157832 - httpd segfault on logrotate
Summary: httpd segfault on logrotate
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: httpd
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 156320
TreeView+ depends on / blocked
 
Reported: 2005-05-16 12:20 UTC by Neil Horman
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2005-621
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 17:05:04 UTC


Attachments (Terms of Use)
customer provided core file from httpd crash (deleted)
2005-05-16 12:20 UTC, Neil Horman
no flags Details
patch to avoid dereferencing of NULL pointer (deleted)
2005-05-16 12:26 UTC, Neil Horman
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:621 qe-ready SHIPPED_LIVE httpd bug fix update 2005-09-28 04:00:00 UTC

Description Neil Horman 2005-05-16 12:20:52 UTC
Description of problem:
httpd appears to have race problems in its cleanup handlers, in that it appears
those cleanup handlers can be run from multiple threads in the httpd process.

Version-Release number of selected component (if applicable):
httpd-2.0.46

How reproducible:
not sure

Steps to Reproduce:
N/A/
  
Actual results:
when receiving SIGHUP, httpd segfaults

Expected results:
server should restart

Additional info:

Comment 1 Neil Horman 2005-05-16 12:21:04 UTC
Created attachment 114418 [details]
customer provided core file from httpd crash

Comment 2 Neil Horman 2005-05-16 12:26:34 UTC
Created attachment 114419 [details]
patch to avoid dereferencing of NULL pointer

This isn't the most graceful solution, given the problem description, but it
seems reasonable, since it seems that re-writing httpd to be thread safe in its
cleanup handlers could be fairly invasive.  It basically just checks for NULL
on calls to apr_file_close.  My other thought would be to add fields to
registered cleanup handlers to mark them as being "run" so as to prevent double
execution, but this seemed more appropriate to me.

Comment 3 Joe Orton 2005-05-16 12:30:05 UTC
Thanks for the report, but there is too much analysis here and not enough
information.

What version of the httpd package is being used?  Do you have a precise repro
case for this issue?  What configuration is being used, which triggers this? 
Why are you talking about "threads"?  (/usr/sbin/httpd does not use threads)

Comment 20 Red Hat Bugzilla 2005-09-28 17:05:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-621.html



Note You need to log in before you can comment on or make changes to this bug.