Bug 1306211 - restorecond -u consumes almost 100% of CPU after kill
restorecond -u consumes almost 100% of CPU after kill
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glib2 (Show other bugs)
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Colin Walters
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2016-02-10 05:34 EST by Milos Malik
Modified: 2017-12-06 05:25 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-12-06 05:25:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2016-02-10 05:34:53 EST
Description of problem:
 * it doesn't matter if you run the restorecon daemon under common user or under root, the result is the same

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. get a RHEL-6.7 machine with active targeted policy
2. start the restorecon daemon as common user from command line (or it happens automatically when you start an X session for the user)
3. kill the restorecon daemon process with kill (do not use any specific signal)

Actual results:
 * restorecond process is running and eating almost whole CPU

Expected results:
 * restorecond process terminates
Comment 1 Milos Malik 2016-02-10 05:36:35 EST
This is not a regression. I see the same results on RHEL-6.7.
Comment 3 Petr Lautrbach 2016-02-12 18:06:54 EST
It seems to be stuck somewhere in glib2:

(gdb) bt full
#0  g_main_loop_run (loop=0x7fd4d786ac10) at gmain.c:3300
        self = 0x7fd4d772c090
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#1  0x00007fd4d66598c8 in server (master_fd=4, watch_file=
    0x7fd4d665aa60 "/etc/selinux/restorecond_user.conf") at user.c:253
        loop = 0x7fd4d786ac10
        c = <value optimized out>
#2  0x00007fd4d6659148 in main (argc=2, argv=<value optimized out>)
    at restorecond.c:214
        opt = <value optimized out>
        sa = {__sigaction_handler = {sa_handler = 
    0x7fd4d6658ee0 <term_handler>, sa_sigaction = 
    0x7fd4d6658ee0 <term_handler>}, sa_mask = {__val = {
    0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0}
        uid = 0
        pwd = <value optimized out>

As there's been no change in restorecond code I guess it's related to glib2 update?
Comment 5 Jan Kurik 2017-12-06 05:25:18 EST
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:


This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:


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