-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Regression with parallel tests on 2.7.3 and 2.8 #1083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pin pytest==2.7.2 to avoid failing tests Cf pytest-dev/pytest#1083
Bisecting indicated 330de0a as responsible cc @nicoddemus @RonnyPfannschmidt I'm wondering if https://bitbucket.org/pytest-dev/py/src/b9cdab378c58c3c07dce13ab8bb58463ae6a0bba/py/_path/local.py?at=default&fileviewer=file-view-default#local.py-791:796 should be called with a keep number higher than 3 ? |
hmm, indeed - i suspect this bug has been lingering longer, the structural change just makes it trigger more easily |
due to race conditions it seems, that the lockfile creation and the folder creation can intersect badly now, since it got a lot faster - i propose switching to a datetime+pid based folder name in order to reduce the likelihood of collisions @nicoddemus opinions? i'd suggest a folder name like |
Which folder exactly do you mean @RonnyPfannschmidt? For example, here's what Travis is creating:
|
Any new idea ? :) |
@RonnyPfannschmidt did you notice my question above? 😁 |
Any advancement ? |
i can put a focus on it next week, this has been delayed due to unrelated personal life events |
Any news ? 😿 |
Gentle ping, I'd rather not have pip indefinitely stranded on |
atm i cant promise anything wrt getting at it soonish |
@RonnyPfannschmidt could please you explain in more detail why do you think there is a race condition with the lock creation? I ask because looking at try:
udir = rootdir.mkdir(prefix + str(maxnum+1))
except py.error.EEXIST:
# race condition: another thread/process created the dir
# in the meantime. Try counting again
if lastmax == maxnum:
raise
lastmax = maxnum
continue IIUC, the lock file only exists so a directory in use won't be deleted by a new py.test session, but on Travis we only ever have one py.test session active at once (we create a temp directory for each session, with each slave reusing it). Also, the original change only changed the tmp root directory and I suspect Travis's VMs contains a very small number of files in Any hints on what's on your mind about the problem might be helpful. 😁 |
@RonnyPfannschmidt any further thoughts? Either way, we really should tackle and solve this once and for all in the upcoming pytest sprint, in a couple of weeks. |
after some more investigation it seems like the tmpdir initialization/re-initialization at slave startup happens multiple times, once with the xdist configuration, once without |
this is related to #1618 |
Re-using the built-in tmpdir fixture fixes pytest-dev/pytest#1083 Also with latest pytest there's no need to use --assert=plain on py35 anymore Fixes pypa#3699 Fixes pytest-dev/pytest#1083
Opened pypa/pip#3863 which fixes this problem, although I couldn't identify why the original code did not work in the first place. |
my current impression is that the initialization of the tmpdir handler on a remote pytest is incorrect and happens twice due to the option application happening after the pytest initialization instead of before |
Well, it's a good news that pip can now use the latest pytest. I guess you've already checked similar logs ( |
@xavfernandez agreed, @RonnyPfannschmidt has hunch that the problem might be regarding how options (specially |
@xavfernandez did some tests showing that my hunch was wrong |
@RonnyPfannschmidt I was thinking, while #1743 makes sense, that wouldn't explain why their old |
@nicoddemus yes, ever since @xavfernandez demonstrated that the issue is in fact not related to that, i do wonder what is the actual cause |
Hello,
Some tests in pip test suite started failing with latest pytest releases:
The text was updated successfully, but these errors were encountered: