Bug 1477907
Summary: | Configuration reload (SIGHUP) opens two (never closed) new pipes in subprocess [rhel-7.3.z] | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Oneata Mircea Teodor <toneata> |
Component: | keepalived | Assignee: | Ryan O'Hara <rohara> |
Status: | CLOSED ERRATA | QA Contact: | Brandon Perkins <bperkins> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 7.3 | CC: | cfeist, cluster-maint, igkioka, rohara, salmy, toneata, yann.morice |
Target Milestone: | rc | Keywords: | Regression, ZStream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | keepalived-1.2.13-9.el7_3.1 | Doc Type: | Bug Fix |
Doc Text: |
Previously, open pipes were not closed properly when the keepalived process received the SIGHUP signal. As a consequence, every time keepalived received SIGHUP, two new pipes were created while the existing pipes were not closed.
This bug has been fixed by using the pipe2() system call with the O_CLOEXEC flag. As a result, the number of open pipes no longer grows with every SIGHUP signal.
|
Story Points: | --- |
Clone Of: | 1464869 | Environment: | |
Last Closed: | 2018-01-25 12:58:25 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: | |||
Bug Depends On: | 1464869 | ||
Bug Blocks: |
Description
Oneata Mircea Teodor
2017-08-03 07:51:44 UTC
*** Bug 1477883 has been marked as a duplicate of this bug. *** The fix here is two-part: 1. Add "@DEFS@" to the DEFS in lib/Makefile.in such that the HAVE_PIPE2 is used correctly at build time. 2. Add back a few lines of code that were removed in #1429880. Specifically, the code in signal_handler_destroy(): -- close(signal_pipe[1]); -- close(signal_pipe[0]); -- signal_pipe[1] = -1; -- signal_pipe[0] = -1; Test results: # rpm -q keepalived keepalived-1.2.13-9.el7_3.1.x86_64 # keepalived -f /etc/keepalived/keepalived.conf # pstree -p $( cat /var/run/keepalived.pid ) keepalived(34937)─┬─keepalived(34938) └─keepalived(34939) # lsof | grep 34937 | grep pipe | wc -l 2 # lsof | grep 34938 | grep pipe | wc -l 2 # lsof | grep 34939 | grep pipe | wc -l 2 # kill -HUP $( cat /var/run/keepalived.pid ) # lsof | grep 34937 | grep pipe | wc -l 2 # lsof | grep 34938 | grep pipe | wc -l 2 # lsof | grep 34939 | grep pipe | wc -l 2 Note that after SIGHUP each process should have exactly 2 pipes open. This is correct. 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:0183 |