Bug 1261445

Summary: Potential bug in threading
Product: [Fedora] Fedora Reporter: Václav Pavlín <vpavlin>
Component: pythonAssignee: Charalampos Stratakis <cstratak>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: bkabrda, dmalcolm, ivazqueznet, jberan, jonathansteffan, ncoghlan, pviktori, redhat-bugzilla, tomspur, tradej
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 17:50:15 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:
Embargoed:

Description Václav Pavlín 2015-09-09 10:49:19 UTC
Description of problem:
When running a test suite for cached-property project, I noticed a test for multi-threaded environment fails randomly.

For the reference see the issue I filed against the project: 

https://github.com/pydanny/cached-property/issues/24


Version-Release number of selected component (if applicable):
python-2.7.9-6.fc22.x86_64

How reproducible:
Always, if the test runs are repeated long enough.

Steps to Reproduce:
1. Clone & install deps from https://github.com/pydanny/cached-property
2. fail=0; pass=0; while [ $fail -lt 5 ]; do py.test && pass=$(( $pass + 1 )) || fail=$(( $fail + 1 )); done; echo "Fail: $fail, Passed: $pass"

Actual results:
1st run: Fail: 5, Passed: 9
2nd run: Fail: 5, Passed: 105

Expected results:
All passed

Additional info:

Comment 1 Václav Pavlín 2015-09-11 14:58:19 UTC
I ran it also on Ubuntu userspace (in a Docker container, so with the Fedora Kernel) and the results are basically the same: Fail: 7, Passed: 200

Comment 2 Petr Viktorin (pviktori) 2015-09-11 17:18:06 UTC
This boils down to Python not being able to start 5 threads in 1 second.
A quicker reproducer is to run several copies of the testsuite in parallel, e.g.

    seq 500 | parallel --bar --halt 2 -j20 "echo {}; py.test"

Comment 3 Nick Coghlan 2015-11-25 04:56:25 UTC
Petr, I tried the original reproducer with a modified test implementation that waits for an event to be signaled, so it's only timing the threads waking up, rather than starting them in the first place: https://github.com/pydanny/cached-property/issues/24#issuecomment-138815633

That modified version still failed.

Audrey also just posted to the upstream issue noting that they're now seeing the failure when using Travis CI's containerised builders: https://github.com/pydanny/cached-property/issues/24#issuecomment-159461592

Comment 4 Fedora Admin XMLRPC Client 2016-01-29 13:05:09 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2016-07-19 17:50:15 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.