Bug 1370038

Summary: Crashes in setroubleshootd and sealert due to missing attribute 'selinux_snapperd_contexts_path'
Product: [Fedora] Fedora Reporter: John Obaterspok <john.obaterspok>
Component: setroubleshootAssignee: Vit Mojzis <vmojzis>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dwalsh, mgrepl, plautrba, vmojzis
Target Milestone: ---   
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: 2016-09-25 18:40:47 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 John Obaterspok 2016-08-25 06:48:52 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Using kernel 4.6.7-300.fc24.x86_64

setroubleshoot-plugins-3.3.5.1-1.fc24.noarch
setroubleshoot-3.3.10-1.fc24.x86_64
setroubleshoot-server-3.3.10-1.fc24.x86_64

selinux-policy-targeted-3.13.1-191.12.fc24.noarch
selinux-policy-3.13.1-191.12.fc24.noarch

libselinux-2.5-9.fc24.x86_64
libselinux-utils-2.5-9.fc24.x86_64
libselinux-python3-2.5-9.fc24.x86_64
libselinux-python-2.5-9.fc24.x86_64
libselinux-2.5-3.fc24.x86_64
libselinux-python3-2.5-3.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Run sealert

Actual results:
$ sealert
Traceback (most recent call last):
  File "/usr/bin/sealert", line 39, in <module>
    import selinux
  File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 1441, in <module>
    selinux_snapperd_contexts_path = _selinux.selinux_snapperd_contexts_path
AttributeError: module '_selinux' has no attribute 'selinux_snapperd_contexts_path'

Additional info:
journalctl -b has this:

python3[3999]: detected unhandled Python exception in '/usr/sbin/setroubleshootd'
abrt-server[4001]: Not saving repeating crash in '/usr/sbin/setroubleshootd'
org.fedoraproject.Setroubleshootd[673]: Traceback (most recent call last):
org.fedoraproject.Setroubleshootd[673]:   File "/usr/sbin/setroubleshootd", line 30, in <module>
org.fedoraproject.Setroubleshootd[673]:     import selinux
org.fedoraproject.Setroubleshootd[673]:   File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 1441, in <module>
org.fedoraproject.Setroubleshootd[673]:     selinux_snapperd_contexts_path = _selinux.selinux_snapperd_contexts_path
org.fedoraproject.Setroubleshootd[673]: AttributeError: module '_selinux' has no attribute 'selinux_snapperd_contexts_path'
dbus-daemon[673]: [system] Activated service 'org.fedoraproject.Setroubleshootd' failed: Launch helper exited with unknown return code 1
au

Comment 1 Vit Mojzis 2016-08-25 08:19:37 UTC
Why do you have two different versions of "libselinux" and "libselinux-python3"?
Please try to remove the older versions if possible (and check if all dnf transactions are finished). 
If the problem persists, please attach the output of the following commands:

#rpm -qf /usr/lib64/python3.5/site-packages/selinux/_selinux.so
#python3 -c 'import selinux'

Comment 2 John Obaterspok 2016-09-10 19:43:14 UTC
bahh, the response from you ended up in the Promotions tab in gmail so I didnt see it until now.

# rpm -e libselinux-python3
# dnf update

Solved the problem for me. Strange I had two versions of libselinux-python3.

Comment 3 John Obaterspok 2016-09-25 18:40:47 UTC
Closing bug as the problem was due to duplicate package installed.