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 1570907 - Polkit leaks zombies following timeout events
Summary: Polkit leaks zombies following timeout events
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: polkit
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Polkit Maintainers
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks: 1616282
TreeView+ depends on / blocked
 
Reported: 2018-04-23 16:54 UTC by Kyle Walker
Modified: 2022-03-13 14:54 UTC (History)
9 users (show)

Fixed In Version: polkit-0.112-16.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1616282 (view as bug list)
Environment:
Last Closed: 2018-10-30 10:30:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 106021 0 'high' 'RESOLVED' 'Polkitd: The utils_spawn_data_free reap timeout subprocess did not work resulting in a large number of zombie processes... 2019-12-09 09:13:46 UTC
Red Hat Product Errata RHBA-2018:3141 0 None None None 2018-10-30 10:31:02 UTC

Description Kyle Walker 2018-04-23 16:54:28 UTC
Description of problem:
  The polkit daemon leaks processes zombie processes after timeout events. This results in a large number of Zombie processes building up and can result in system failures if not addressed.

Version-Release number of selected component (if applicable):
  polkit-0.112-14.el7.x86_64

How reproducible:
  Easily

Steps to Reproduce:
1. Add the following contents to a new /etc/polkit-1/rules.d/51-test.rules file

    polkit.addRule(function(action, subject) {          
        var res = polkit.spawn(['/usr/bin/sleep', '60']);                                                    
        polkit.log(res);      
        if (res == '')        
            return null;      
    });                       


2. Stop polkit

    # systemctl stop polkit

3. As a non-root user, issue a "systemctl restart test" which just triggers the polkit authentication configuration above.

    $ systemctl restart test


Actual results:
  The sleep processes are not reaped, leaving them to build up as observed in the following output:

    # ps --forest -p $(pidof polkitd) --ppid $(pidof polkitd)| head
      PID TTY          TIME CMD
      621 ?        00:00:03 polkitd
     3351 ?        00:00:00  \_ sleep <defunct>
     3468 ?        00:00:00  \_ sleep <defunct>
     3494 ?        00:00:00  \_ sleep <defunct>
     3520 ?        00:00:00  \_ sleep <defunct>
     3546 ?        00:00:00  \_ sleep <defunct>
     3572 ?        00:00:00  \_ sleep <defunct>
     3598 ?        00:00:00  \_ sleep <defunct>
     3625 ?        00:00:00  \_ sleep <defunct>



Expected results:
  Zombie sleep processes are properly reaped.


Additional info:
  This issue is observable in the latest Fedora releases and has been reported in the upstream "PolicyKit" project bug tracker:

    106021 – Polkitd: The utils_spawn_data_free reap timeout subprocess did not work resulting in a large number of zombie processes 
    https://bugs.freedesktop.org/show_bug.cgi?id=106021

Comment 15 errata-xmlrpc 2018-10-30 10:30:20 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:3141


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