Bug 1378940

Summary: [abrt] setroubleshoot-server: server.py:706:RunFaultServer:SystemError: <built-in function init> returned a result with an error set
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: setroubleshootAssignee: Petr Lautrbach <plautrba>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: aloner, dimapunk80, dwalsh, ermakow, levglonti, mastaizawfm, mgrepl, noobusinghacks, plautrba, thenscheid, unixi, vmojzis, wgianopoulos
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/b5ed2a8bfbf1173b365db754ed8ba7d6ef6d54e3
Whiteboard: abrt_hash:f46a46ef2f13f3026df32eb0fc0a38bd3c6f71d3;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-08 13:24:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Joachim Frieben 2016-09-23 14:49:29 UTC
Version-Release number of selected component:
setroubleshoot-server-3.3.11-1.fc25

Additional info:
reporter:       libreport-2.8.0
cmdline:        /usr/bin/python3 -Es /usr/sbin/setroubleshootd -f ''
executable:     /usr/sbin/setroubleshootd
kernel:         4.8.0-0.rc6.git0.1.fc25.x86_64
pkg_fingerprint: 4089 D8F2 FDB1 9C98
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           Python3
uid:            994

Truncated backtrace:
server.py:706:RunFaultServer:SystemError: <built-in function init> returned a result with an error set

ValueError: unable to open /sys/fs/selinux/policy:  Device or resource busy


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/setroubleshootd", line 107, in <module>
    RunFaultServer(timeout)
  File "/usr/lib/python3.5/site-packages/setroubleshoot/server.py", line 706, in RunFaultServer
    audit2why.init()
SystemError: <built-in function init> returned a result with an error set

Local variables in innermost frame:
timeout: 10

Potential duplicate: bug 1360477

Comment 1 Joachim Frieben 2016-09-23 14:49:36 UTC
Created attachment 1204195 [details]
File: backtrace

Comment 2 Joachim Frieben 2016-09-23 14:49:37 UTC
Created attachment 1204196 [details]
File: environ

Comment 3 Bill Gianopoulos 2016-12-07 12:15:08 UTC
I am getting this on booting current rawhide with the following found via ausearch --raw | audit2why | grep setroubleshoot:

type=AVC msg=audit(1481111084.432:190): avc:  denied  { open } for  pid=1235 comm="rpm" path="/var/lib/rpm/Packages" dev="sdb2" ino=658403 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file permissive=1
type=AVC msg=audit(1481111084.432:191): avc:  denied  { lock } for  pid=1235 comm="rpm" path="/var/lib/rpm/Packages" dev="sdb2" ino=658403 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file permissive=1
type=AVC msg=audit(1481111084.432:189): avc:  denied  { read } for  pid=1235 comm="rpm" name="Packages" dev="sdb2" ino=658403 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file permissive=1

Comment 4 Daniel Walsh 2016-12-08 13:24:16 UTC
restorecon -R -v /var/lib/rpm

Should fix the issue.

For some reason the /var/lib/rpm directory is mislabled.

matchpathcon /var/lib/rpm
/var/lib/rpm	system_u:object_r:rpm_var_lib_t:s0