Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
At the moment the httpd service is terminated if a single child is killed by the OOM killer.
Version-Release number of selected component (if applicable):
httpd-2.4.46-9.fc33
How reproducible:
always
Steps to Reproduce:
1. trigger excess memory consumption in one child
Actual results:
httpd.service is terminated after the oom-killer kills the child with excess memory consumption
Apr 08 15:14:19 systemd[1]: Started The Apache HTTP Server.
Apr 08 15:15:27 systemd[1]: httpd.service: A process of this unit has been killed by the OOM killer.
Apr 08 15:15:35 systemd[1]: httpd.service: Failed with result 'oom-kill'.
Expected results:
httpd should continue operating even if the child is terminated
Additional info:
Setting OOMPolicy=continue in httpd.service to prevent this seems reasonable.
My hesitation about this is that when the child is killed by SIGKILL it is otherwise not obvious from the httpd logs that the OOM condition took out a process (and terminated a bunch of active threads). Since the parent will terminate a child via SIGKILL internally, a SIGKILL-killed child is reaped via waitpid() is not logged as an abnormal condition. It is possible we could tweak that logic but not sure.
The OOM condition is logged in the journal for the unit, so shows up in "systemctl status httpd" as well as in dmesg etc.
Apr 08 15:21:08 systemd[1]: httpd.service: A process of this unit has been killed by the OOM killer.
Apr 08 15:22:53 systemd[1]: httpd.service: A process of this unit has been killed by the OOM killer.
The question is: is it better for httpd to continue processing requests in other children in an OOM situation, or should it terminate?
I think that "continue" is better. A vulnerability which triggers OOM is mitigated from a complete DoS to a partial one. The case Pavel found in production was a intermittent OOM (once per week, for example) and again, it is better in that case for httpd to recover. That OOM has occurred remains obvious from the system logs so should be picked up in monitoring, or, when investigating performance/reliability issues.