RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1527295 - httpd with worker/event mpm segfaults after multiple SIGUSR1
Summary: httpd with worker/event mpm segfaults after multiple SIGUSR1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Maryna Nalbandian
URL:
Whiteboard:
: 1622641 (view as bug list)
Depends On:
Blocks: 1477664 1549616 1562205 1594286
TreeView+ depends on / blocked
 
Reported: 2017-12-19 07:00 UTC by Masaki MAENO
Modified: 2021-12-10 15:30 UTC (History)
7 users (show)

Fixed In Version: httpd-2.4.6-88.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 11:19:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1376835 0 medium CLOSED httpd with worker/event mpm segfaults after multiple successive graceful reloads 2021-12-10 14:44:38 UTC
Red Hat Product Errata RHBA-2018:3211 0 None None None 2018-10-30 11:19:53 UTC

Description Masaki MAENO 2017-12-19 07:00:33 UTC
Description of problem:

Apache httpd in RHEL7 configured with worker/event mpm segfaults after receiving multiple SIGUSR1. 2.4.6-67.el7_4.6.x86_64 also has problems. 


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

* RHEL7 Latest 2.4.6-67.el7_4.6.x86_64

How reproducible:

Near 100% with worker or event

Steps to Reproduce:
  1. Install httpd
  2. Ensure using worker or event
     (E.g.: sed -i -e '/^Load/s/^/#/' -e '/#Load.*event/s/^#//' /etc/httpd/conf.modules.d/00-mpm.conf)
  3. systemctl restart httpd
  4. Repeat "# kill -USR1 `cat /var/run/httpd/httpd.pid`; kill -USR1 `cat /var/run/httpd/httpd.pid`"

Actual results:

 [Fri Dec 15 10:39:29.964033 2017] [mpm_worker:notice] [pid 20084:tid 
140575944685696] AH00297: SIGUSR1 received.  Doing graceful restart
 [Fri Dec 15 10:39:30.084318 2017] [core:notice] [pid 20084] AH00060: 
seg fault or similar nasty error detected in the parent process

Expected results:

 httpd shouldn't segfault. With prefork, it doesn't

Additional info:

 The problem (httpd with worker/event mpm segfaults after multiple successive graceful reloads) was fixed in 2.4.6-53.el7 (Development Version)

- Apache httpd with worker/event mpm segfaults after multiple 
  successive graceful reloads triggered by logrotate
      https://access.redhat.com/solutions/2626601

* Tue Mar 07 2017 Luboš Uhliarik <luhliari> - 2.4.6-53
- Resolves: #1376835 - httpd with worker/event mpm segfaults after multiple
  successive graceful reloads

httpd-2.4.6-mpm-segfault.patch
============
--- a/server/mpm/event/event.c
+++ a/server/mpm/event/event.c
@@ -2735,6 +2735,7 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)

     /* we've been told to restart */
     apr_signal(SIGHUP, SIG_IGN);
+    apr_signal(AP_SIG_GRACEFUL, SIG_IGN);
     if (one_process) {
         /* not worth thinking about */
============

httpd in RHEL7 configured with worker/event mpm segfaults after receiving
multiple SIGUSR1. (logrotate.conf example: size 1G and daily)
2.4.6-67.el7_4.6.x86_64 also has problems. 

I think that the aforementioned patch is not sufficient and need to add accurate exclusion control.

Comment 5 Masaki MAENO 2018-04-09 04:50:40 UTC
Please fix the segfaults ("Apache httpd in RHEL7 configured with worker/event mpm segfaults after receiving multiple SIGUSR1") .

Is the problem fixed in the future?

Comment 8 Joe Orton 2018-06-21 15:12:58 UTC
There are a couple of different cases here, and I want to be sure we are fixing exactly what is expected:

1. A segfault on repeated SIGUSR1 (with unchanged configuration), using the event MPM.

2. A segfault on repeated SIGUSR1 (with unchanged configuration), using the worker MPM.

3. A segfault on SIGUSR1 when with changed configuration to load or unload mod_logio.

Cases (1) and (3) should be fixed in the current httpd, httpd-2.4.6-80.el7.x86_64 or later.

Case (2) is unaddressed and will be fixed here.

If there is a different reproduction case which works with httpd-2.4.6-80.el7.x86_64 please let us know.

Comment 10 Masaki MAENO 2018-06-22 00:07:25 UTC
I hope that the Cases (1) (2) and (3) with httpd-2.4.6-80.el7.x86_64 will be fixed.
I don't know a different reproduction.

Comment 15 errata-xmlrpc 2018-10-30 11:19:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3211

Comment 16 Luboš Uhliarik 2018-11-05 12:01:31 UTC
*** Bug 1622641 has been marked as a duplicate of this bug. ***

Comment 17 martin.monperrus 2020-09-14 06:15:20 UTC
For the record, I was hit by this crash on Apache/2.4.25 several times.
Current workaround: switch to mpm_event

Comment 18 martin.monperrus 2020-09-14 06:21:01 UTC
FTR: upstream issue may be 
"child exit segmentation fault after apache graceful" https://bz.apache.org/bugzilla/show_bug.cgi?id=55914


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