Bug 1433396

Summary: [FC25] python-pthreading fails tests on fedora 25
Product: [oVirt] ovirt-distribution Reporter: Sandro Bonazzola <sbonazzo>
Component: python-pthreadingAssignee: Yaniv Bronhaim <ybronhei>
python-pthreading sub component: General QA Contact: Lukas Svaty <lsvaty>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: medium    
Priority: unspecified CC: bugs, lsvaty, nsoffer
Version: python-pthreading-0.1.3Keywords: CodeChange, Regression
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
lsvaty: testing_ack+
Target Release: python-pthreading-0.1.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 10:55:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1460625    

Description Sandro Bonazzola 2017-03-17 14:46:41 UTC
Description of problem:
pthreading fails test on fc25:

00:01:59.987 =================================== FAILURES ===================================
00:01:59.987 ______________________ TestMonkeyPatch.test_monkey_patch _______________________
00:01:59.987 
00:01:59.988 self = <tests.TestMonkeyPatch object at 0x7f713f4b9518>
00:01:59.988 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f4b9da0>
00:01:59.989 
00:01:59.989     def test_monkey_patch(self, monkeypatch):
00:01:59.989 >       monkeypatch.delitem(sys.modules, "thread")
00:01:59.990 
00:01:59.990 tests.py:37: 
00:01:59.991 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
00:01:59.991 
00:01:59.991 self = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f4b9da0>
00:01:59.992 dic = {'__future__': <module '__future__' from '/home/jenkins/workspace/pthreading_master_check-patch-fc25-x86_64/pthreading...heck-patch-fc25-x86_64/pthreading/.tox/test/lib64/python3.5/lib-dynload/_bisect.cpython-35m-x86_64-linux-gnu.so'>, ...}
00:01:59.992 name = 'thread', raising = True
00:01:59.993 
00:01:59.993     def delitem(self, dic, name, raising=True):
00:01:59.993         """ Delete ``name`` from dict. Raise KeyError if it doesn't exist.
00:01:59.994     
00:01:59.994             If ``raising`` is set to False, no exception will be raised if the
00:01:59.994             key is missing.
00:01:59.995             """
00:01:59.995         if name not in dic:
00:01:59.995             if raising:
00:01:59.996 >               raise KeyError(name)
00:01:59.996 E               KeyError: 'thread'
00:01:59.997 
00:01:59.997 .tox/test/lib/python3.5/site-packages/_pytest/monkeypatch.py:183: KeyError
00:01:59.998 ___________________ TestMonkeyPatch.test_monkey_patch_twice ____________________
00:01:59.998 
00:01:59.998 self = <tests.TestMonkeyPatch object at 0x7f713f4b98d0>
00:01:59.999 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f4b96d8>
00:01:59.999 
00:01:59.999     def test_monkey_patch_twice(self, monkeypatch):
00:02:00.000 >       monkeypatch.delitem(sys.modules, "thread")
00:02:00.000 
00:02:00.000 tests.py:43: 
00:02:00.001 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
00:02:00.001 
00:02:00.002 self = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f4b96d8>
00:02:00.002 dic = {'__future__': <module '__future__' from '/home/jenkins/workspace/pthreading_master_check-patch-fc25-x86_64/pthreading...heck-patch-fc25-x86_64/pthreading/.tox/test/lib64/python3.5/lib-dynload/_bisect.cpython-35m-x86_64-linux-gnu.so'>, ...}
00:02:00.003 name = 'thread', raising = True
00:02:00.003 
00:02:00.003     def delitem(self, dic, name, raising=True):
00:02:00.004         """ Delete ``name`` from dict. Raise KeyError if it doesn't exist.
00:02:00.004     
00:02:00.004             If ``raising`` is set to False, no exception will be raised if the
00:02:00.005             key is missing.
00:02:00.005             """
00:02:00.006         if name not in dic:
00:02:00.006             if raising:
00:02:00.006 >               raise KeyError(name)
00:02:00.007 E               KeyError: 'thread'
00:02:00.007 
00:02:00.007 .tox/test/lib/python3.5/site-packages/_pytest/monkeypatch.py:183: KeyError
00:02:00.008 _______________ TestMonkeyPatch.test_monkey_patch_raises_thread ________________
00:02:00.009 
00:02:00.009 self = <tests.TestMonkeyPatch object at 0x7f713f063588>
00:02:00.009 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f0634e0>
00:02:00.010 
00:02:00.010     def test_monkey_patch_raises_thread(self, monkeypatch):
00:02:00.010 >       monkeypatch.delitem(sys.modules, "thread")
00:02:00.010 
00:02:00.011 tests.py:50: 
00:02:00.012 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
00:02:00.012 
00:02:00.012 self = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f0634e0>
00:02:00.013 dic = {'__future__': <module '__future__' from '/home/jenkins/workspace/pthreading_master_check-patch-fc25-x86_64/pthreading...heck-patch-fc25-x86_64/pthreading/.tox/test/lib64/python3.5/lib-dynload/_bisect.cpython-35m-x86_64-linux-gnu.so'>, ...}
00:02:00.013 name = 'thread', raising = True
00:02:00.013 
00:02:00.013     def delitem(self, dic, name, raising=True):
00:02:00.014         """ Delete ``name`` from dict. Raise KeyError if it doesn't exist.
00:02:00.014     
00:02:00.015             If ``raising`` is set to False, no exception will be raised if the
00:02:00.015             key is missing.
00:02:00.016             """
00:02:00.016         if name not in dic:
00:02:00.016             if raising:
00:02:00.017 >               raise KeyError(name)
00:02:00.017 E               KeyError: 'thread'
00:02:00.017 
00:02:00.018 .tox/test/lib/python3.5/site-packages/_pytest/monkeypatch.py:183: KeyError
00:02:00.018 ______________ TestMonkeyPatch.test_monkey_patch_raises_threading ______________
00:02:00.019 
00:02:00.019 self = <tests.TestMonkeyPatch object at 0x7f713f4bcda0>
00:02:00.019 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f713f4bc0b8>
00:02:00.019 
00:02:00.020     def test_monkey_patch_raises_threading(self, monkeypatch):
00:02:00.020         monkeypatch.delitem(sys.modules, "threading")
00:02:00.021 >       assert 'thread' in sys.modules
00:02:00.021 E       AssertionError: assert 'thread' in {'__future__': <module '__future__' from '/home/jenkins/workspace/pthreading_master_check-patch-fc25-x86_64/pthreading...heck-patch-fc25-x86_64/pthreading/.tox/test/lib64/python3.5/lib-dynload/_bisect.cpython-35m-x86_64-linux-gnu.so'>, ...}
00:02:00.022 E        +  where {'__future__': <module '__future__' from '/home/jenkins/workspace/pthreading_master_check-patch-fc25-x86_64/pthreading...heck-patch-fc25-x86_64/pthreading/.tox/test/lib64/python3.5/lib-dynload/_bisect.cpython-35m-x86_64-linux-gnu.so'>, ...} = sys.modules
00:02:00.022 
00:02:00.022 tests.py:56: AssertionError
00:02:00.022 ===================== 4 failed, 26 passed in 8.56 seconds ======================
00:02:00.060 ERROR: InvocationError: '/home/jenkins/workspace/pthreading_master_check-patch-fc25-x86_64/pthreading/.tox/test/bin/py.test -v tests.py'
00:02:00.060 ___________________________________ summary ____________________________________
00:02:00.060   pep8: commands succeeded
00:02:00.060   py27: commands succeeded
00:02:00.060 ERROR:   test: commands failed
00:02:00.081 Took 35 seconds

Comment 1 Red Hat Bugzilla Rules Engine 2017-03-17 14:46:50 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Nir Soffer 2017-03-19 23:57:42 UTC
Fixed in:
https://github.com/oVirt/pthreading/commit/40ad63987fe48bc25581feeb59132e6df3cbde8c

Since this is 4.2 bugs, I think we can move it to modified.

Comment 4 Sandro Bonazzola 2017-12-20 10:55:09 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.