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 1078589 - use of tls with libvirt.so can leave zombie processes
Summary: use of tls with libvirt.so can leave zombie processes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1078590 1080501
TreeView+ depends on / blocked
 
Reported: 2014-03-19 23:06 UTC by Eric Blake
Modified: 2014-10-14 04:20 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.10.2-30.el6
Doc Type: Bug Fix
Doc Text:
A previous update introduced an error where a SIG_SETMASK argument was incorrectly replaced by a SIG_BLOCK argument after the poll() system call. Consequently, the SIGCHLD signal could be permanently blocked, which caused signal masks not to return to their original values and defunct processes to be generated. With this update, the original signal masks are restored as intended, and poll() now functions correctly.
Clone Of:
: 1078590 (view as bug list)
Environment:
Last Closed: 2014-10-14 04:20:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1374 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2014-10-14 08:11:54 UTC

Description Eric Blake 2014-03-19 23:06:44 UTC
Description of problem:
Libvirt commit 434de30 refactored the client-side tls code, but accidentally changed a SIG_SETMASK to a SIG_BLOCK when attempting to restore signals after temporarily blocking them around a poll() call.  As a result, the client can end up with SIGCHLD permanently blocked, at which point the child leaks zombie processes.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-29.el6_5.5
but present all the way back to RHEL 6.2

How reproducible:
https://www.redhat.com/archives/libvir-list/2014-March/msg00858.html

Steps to Reproduce:
1. See the upstream mail thread
2.
3.

Actual results:
zombie processes leaked because SIGCHLD permanently blocked

Expected results:
no zombies, correct signal handling

Additional info:
Fixed with this patch upstream:
commit 3d4b4f5ac634c123af1981084add29d3a2ca6ab0
Author: Michal Privoznik <mprivozn>
Date:   Wed Mar 19 18:10:34 2014 +0100

    virNetClientSetTLSSession: Restore original signal mask
    
    Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling
    poll(). This is okay, as we don't want poll() to be interrupted.
    However, then - immediately as we fall out from the poll() - we try to
    restore the original sigmask - again using SIG_BLOCK. But as the man
    page says, SIG_BLOCK adds signals to the signal mask:
    
    SIG_BLOCK
          The set of blocked signals is the union of the current set and the set argument.
    
    Therefore, when restoring the original mask, we need to completely
    overwrite the one we set earlier and hence we should be using:
    
    SIG_SETMASK
          The set of blocked signals is set to the argument set.
    
    Signed-off-by: Michal Privoznik <mprivozn>

Comment 1 Eric Blake 2014-03-19 23:07:47 UTC
Technically a regression from RHEL 6.1 behavior; but as it has been so long since the bug was introduced I'm not sure if it deserves a z-stream fix to 6.5 or if it can just wait for 6.6

Comment 6 zhenfeng wang 2014-04-14 09:13:50 UTC
Verify this bug with libvirt-0.10.2-32.el6.x86_64, The verify steps were the same with the comment 12 in bug 1080501, since i can get the same result with the bug 1080501, so mark this bug verified

Comment 8 errata-xmlrpc 2014-10-14 04:20:44 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.

http://rhn.redhat.com/errata/RHBA-2014-1374.html


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