Bug 1570907 - Polkit leaks zombies following timeout events
Summary: Polkit leaks zombies following timeout events
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: polkit
Version: 7.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Polkit Maintainers
QA Contact: Frantisek Sumsal
Depends On:
Blocks: 1616282
TreeView+ depends on / blocked
Reported: 2018-04-23 16:54 UTC by Kyle Walker
Modified: 2020-09-21 09:27 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)
Last Closed: 2018-10-30 10:30:20 UTC
Target Upstream Version:

Attachments (Terms of Use)

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):

How reproducible:

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']);                                                    
        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 

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.


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