Bug 1306211 - restorecond -u consumes almost 100% of CPU after kill
Summary: restorecond -u consumes almost 100% of CPU after kill
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glib2
Version: 6.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Colin Walters
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-10 10:34 UTC by Milos Malik
Modified: 2017-12-06 10:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-06 10:25:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

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/


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