-
Notifications
You must be signed in to change notification settings - Fork 230
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
Cache execnet gateway rinfo during WorkerController setup #1072
Conversation
This change LGTM, pending pytest-dev/execnet#274 (comment) (and if we decide to fix in xdist instead of execnet, should update the "Remove this after execnet is fixed" comment) |
80f9254
to
0a7755d
Compare
# accesses rinfo while the main thread is busy executing our | ||
# remote_exec call, which triggers a deadlock error for the | ||
# main_thread_only execmodel if the rinfo has not been cached. | ||
self.gateway._rinfo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change LGTM, pending pytest-dev/execnet#274 (comment) (and if we decide to fix in xdist instead of execnet, should update the "Remove this after execnet is fixed" comment)
Okay, comment updated. Noted the change here: #1071 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
If there are no further comments, I'll merge this and release 3.6.1.
Cache execnet gateway info during WorkerController setup for backward compatibility, in order to avoid a later main_thread_only deadlock error triggered when pytest-cov calls rinfo after the main thread is already busy. See pytest-dev/execnet#274 for corresponding test case. Fixes: 20e3ac7 ("Use execnet main_thread_only execmodel (pytest-dev#1027)")
0a7755d
to
12b3cce
Compare
Cache execnet gateway info during WorkerController setup for backward
compatibility, in order to avoid a later main_thread_only deadlock
error triggered when pytest-cov calls rinfo after the main thread is
already busy. See pytest-dev/execnet#274 for corresponding test case.
Fixes: 20e3ac7 ("Use execnet main_thread_only execmodel (#1027)")
I was able not able to reproduce the issue using a small project with pytest-xdist and pytest-cov.
I was able to reproduce it by running tox in a checkout of setuptools, after using pip to install pytest-xdist-3.6.0 into the .tox/py virtualenv. Then I applied this PR to the virtualenv and that fixed the issue, with pytest-cov successfully producing coverage results.