Bug 1306211

Summary: restorecond -u consumes almost 100% of CPU after kill
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: glib2Assignee: Colin Walters <walters>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.8CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 10:25:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Milos Malik 2016-02-10 10:34:53 UTC
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):
policycoreutils-2.0.83-27.el6.x86_64

How reproducible:
always

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 10:36:35 UTC
This is not a regression. I see the same results on RHEL-6.7.

Comment 3 Petr Lautrbach 2016-02-12 23:06:54 UTC
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 10:25:18 UTC
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:

http://redhat.com/rhel/lifecycle

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:

https://access.redhat.com/