Bug 707666

Summary: [abrt] mock-1.1.10-1.fc15: selinux.py:74:_selinuxAtExit:AttributeError: 'SELinux' object has no attribute '_filesystems'
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: jturner, jvcelak, mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:84b548aaa52e8d0e336dcb56ce73b034cf25583b
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-08 17:57:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
0001-Correct-typo-introduced-in-4d7fa64f.patch none

Description James Laska 2011-05-25 16:57:49 UTC
abrt version: 2.0.1
architecture:   x86_64
cmdline:        
component:      mock
executable:     /usr/sbin/mock
kernel:         2.6.38.5-24.fc15.x86_64
os_release:     Fedora release 15 (Lovelock)
package:        mock-1.1.10-1.fc15
reason:         selinux.py:74:_selinuxAtExit:AttributeError: 'SELinux' object has no attribute '_filesystems'
time:           Tue May 17 11:45:09 2011
uid:            3633
username:       jlaska

backtrace:
:selinux.py:74:_selinuxAtExit:AttributeError: 'SELinux' object has no attribute '_filesystems'
:
:Traceback (most recent call last):
:  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
:    func(*targs, **kargs)
:  File "<peak.util.decorators.rewrap wrapping selinux._selinuxAtExit at 0x023F6500>", line 3, in _selinuxAtExit
:    def _selinuxAtExit(self): return __decorated(self)
:  File "/usr/lib/python2.7/site-packages/mock/trace_decorator.py", line 70, in trace
:    result = func(*args, **kw)
:  File "/usr/lib/python2.7/site-packages/mock/plugins/selinux.py", line 74, in _selinuxAtExit
:    getLog().warning("unable to delete selinux filesystems (%s): %s" % (self._filesystems, e))
:AttributeError: 'SELinux' object has no attribute '_filesystems'
:
:Local variables in innermost frame:
:self: <selinux.SELinux object at 0x24644d0>
:e: OSError(1, 'Operation not permitted')

comment:
:With the latest F15 mock package, I'm getting tracebacks when using mock to build Fedora media (boot.iso).  The procedure I'm following is described at https://fedoraproject.org/wiki/How_to_create_a_Fedora_install_ISO_for_testing
:
:Version-Release number of selected component (if applicable):
: * mock-1.1.10-1.fc15.noarch
:
:How reproducible:
:* 100% with newer mock, not at all when I downgrade
:
:Steps to Reproduce:
:1. Follow instructions at https://fedoraproject.org/wiki/How_to_create_a_Fedora_install_ISO_for_testing

Comment 1 James Laska 2011-05-25 16:59:04 UTC
Created attachment 500872 [details]
0001-Correct-typo-introduced-in-4d7fa64f.patch

The attached patch looks like it should do the trick.  I'm retesting with this fix at the moment, and will reply back when complete.

Comment 2 James Laska 2011-05-25 17:04:20 UTC
(In reply to comment #1)
> The attached patch looks like it should do the trick.  I'm retesting with this
> fix at the moment, and will reply back when complete.

This corrected the traceback introduced by commit 4d7fa64f.  However, I'm seeing the a WARNING  which I'm not yet familiar with.

State Changed: lock buildroot
Mock Version: 1.1.10
INFO: Mock Version: 1.1.10
State Changed: unlock buildroot
State Changed: end
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.wvqE2M): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.wvqE2M'
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.eRxVn4): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.eRxVn4'
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.Y6jLpF): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.Y6jLpF'
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.RMOvuZ): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.RMOvuZ'

Comment 3 Clark Williams 2011-09-03 15:54:19 UTC
The incorrect reference to _filesystems is fixed in the latest release. 

Not sure why the unlink of the faux filesystems file is failing though. Guessing that someone has an open file handle to it. 

Would you try the 1.1.12 release and make sure you don't get a traceback?

Comment 4 James Laska 2011-09-06 12:43:00 UTC
I've been using mock-1.1.12-1.fc15 since Aug 01 without any trouble.  I believe this resolves the reported problem.  Thanks!

Comment 5 Clark Williams 2011-09-08 17:57:09 UTC
Cool closing