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 1101652 - Apache crashes when replica is restarted when installing
Summary: Apache crashes when replica is restarted when installing
Keywords:
Status: CLOSED DUPLICATE of bug 1008018
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mod_wsgi
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On: 1099811
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-27 17:01 UTC by Rob Crittenden
Modified: 2021-01-14 09:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1099811
Environment:
Last Closed: 2014-05-28 12:41:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rob Crittenden 2014-05-27 17:01:23 UTC
+++ This bug was initially created as a clone of Bug #1099811 +++

Description of problem:
Apache crashes when installing 6.5 master+replica and 5.11 Client.

In discussing with Rob and team, it was decided to remove extra restart

Version-Release number of selected component (if applicable):
ipa-server-3.0.0-37.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Used beaker to install the environment using quickinstall for QE tests


Actual results:
Crash is detetcted


Expected results:
No crash


Additional info:
Email from Rob:

I found this in /var/log/messages

May 19 09:13:34 pogolinux-01 setsebool: The httpd_can_network_connect
policy boolean was changed to on by root
May 19 09:13:34 pogolinux-01 setsebool: The httpd_manage_ipa policy
boolean was changed to on by root
May 19 09:13:35 pogolinux-01 kernel: httpd[19488]: segfault at 30 ip
00007f333682a7c7 sp 00007fffe606d050 error 4 in
libapr-1.so.0.3.9[7f3336816000+2b000]
May 19 09:13:35 pogolinux-01 kernel: httpd[19489]: segfault at 30 ip
00007f333682a7c7 sp 00007fffe606f6d0 error 4 in
libapr-1.so.0.3.9[7f3336816000+2b000]
May 19 09:13:35 pogolinux-01 kernel:
May 19 09:13:35 pogolinux-01 abrt[19523]: Not saving repeating crash in
'/usr/sbin/httpd'
May 19 09:13:36 pogolinux-01 abrt[19524]: Saved core dump of pid 19488
(/usr/sbin/httpd) to /var/spool/abrt/ccpp-2014-05-19-09:13:35-19488
(73166848 bytes)
May 19 09:13:36 pogolinux-01 abrtd: Directory
'ccpp-2014-05-19-09:13:35-19488' creation detected

My initial thought was that Apache was restarted in the middle of
initialization. Based on the core it looked like it blew up on a python
import. The ipareplica-install.log doesn't confirm this though. We
restart the server after configuring SELinux and that is what is
failing. Fortunately we restart it again a few steps later and that is
fine which is why the install is successful. While I wonder why it is
blowing up, it may mean we can drop an HTTP restart and save a few seconds.

--- Additional comment from RHEL Product and Program Management on 2014-05-21 05:22:11 EDT ---

Since this bug report was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Namita Soman on 2014-05-21 05:27:25 EDT ---

Beaker job: https://beaker.engineering.redhat.com/jobs/655062

--- Additional comment from Martin Kosek on 2014-05-27 06:34:59 EDT ---

Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4352

--- Additional comment from Rob Crittenden on 2014-05-27 12:42:47 EDT ---



--- Additional comment from Rob Crittenden on 2014-05-27 13:00:37 EDT ---

Comment 1 Rob Crittenden 2014-05-27 17:04:24 UTC
This is the sequence of events from the replica install log:

[ Enable SSL booleans ]

2014-05-27T16:24:19Z DEBUG   [11/12]: restarting httpd
2014-05-27T16:24:19Z DEBUG args=/sbin/service httpd status
2014-05-27T16:24:19Z DEBUG stdout=httpd is stopped

2014-05-27T16:24:19Z DEBUG stderr=
2014-05-27T16:24:19Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2014-05-27T16:24:20Z DEBUG args=/sbin/service httpd restart
2014-05-27T16:24:20Z DEBUG stdout=Stopping httpd: [FAILED]^M
Starting httpd: [  OK  ]^M

2014-05-27T16:24:20Z DEBUG stderr=
2014-05-27T16:24:20Z DEBUG args=/sbin/service httpd status
2014-05-27T16:24:20Z DEBUG stdout=httpd dead but subsys locked

2014-05-27T16:24:20Z DEBUG stderr=
2014-05-27T16:24:20Z DEBUG   duration: 0 seconds

The stop failed because it was already dead. This is the first time we poke at the service, so this may be normal, but the subsys lock is confusing. The start is successful.

In the same second according to the logs there is another restart to pick up a new certificate we load:

2014-05-27T16:24:20Z DEBUG stderr=
2014-05-27T16:24:23Z DEBUG args=/sbin/service httpd restart
2014-05-27T16:24:23Z DEBUG stdout=Stopping httpd: [  OK  ]^M
Starting httpd: [  OK  ]^M

2014-05-27T16:24:23Z DEBUG stderr=
2014-05-27T16:24:23Z DEBUG args=/sbin/service httpd status
2014-05-27T16:24:23Z DEBUG stdout=httpd dead but subsys locked

I can only assume it is blowing up during the second start, in the same second. Since this is a WSGI app it gets loaded after the core httpd modules which is why startup appears successful to /sbin/service.

So in IPA we can address this by re-evaluating our restarts. I imagine we can get rid of at least one of them, especially considering that we blow Apache up and the installer doesn't even notice.

But I'm concerned about the underlying cause. Is this a bug in mod_wsgi not handling the signal properly while in the middle of imports, or an Apache bug shutting down the fd's too quickly, or something else?

Comment 3 Jan Kaluža 2014-05-28 07:16:30 UTC
What version of mod_wsgi do you use? From sosreport in original Bug 1099811, it looks like it's RHEL6 machine (not RHEL7 as you stated in this bugzilla) and mod_wsgi-3.2 is installed.

In RHEL7 (mod_wsgi-3.4), this should be fixed. If it's RHEL6 machine (and mod_wsgi-3.2), this bug is duplicate of Bug 1008018.

Comment 4 Rob Crittenden 2014-05-28 12:41:42 UTC
Yes, this looks like the same issue. Sorry for the confusion over releases, this was RHEL 6.

Closing as duplicate.

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


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