Skip to content
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

Fix serialization of 'None' reprcrashes #6412

Merged
merged 2 commits into from Jan 7, 2020

Conversation

nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Jan 7, 2020

Tracebacks coming from remote processes crated by the multiprocess module
will contain "RemoteTracebacks" which don't have a 'reprcrash' attribute.

I've made sure to test this fixes in xdist.

Fix #5971

@blueyed
Copy link
Contributor

blueyed commented Jan 7, 2020

Maybe interesting in this context: https://github.com/ionelmc/python-tblib

testing/test_reports.py Outdated Show resolved Hide resolved
Tracebacks coming from remote processes crated by the multiprocess module
will contain "RemoteTracebacks" which don't have a 'reprcrash' attribute

Fix pytest-dev#5971
@nicoddemus
Copy link
Member Author

Maybe interesting in this context: ionelmc/python-tblib

Very interesting, didn't know about that lib, thanks. 👍

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise looks good, feel free to ignore and ship anyway

testing/test_reports.py Outdated Show resolved Hide resolved
"""
testdir.makepyfile(
"""
from concurrent.futures import ProcessPoolExecutor
Copy link
Member Author

@nicoddemus nicoddemus Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is easier to understand the original issue IMO

@nicoddemus nicoddemus assigned asottile and unassigned asottile Jan 7, 2020
@nicoddemus
Copy link
Member Author

@asottile please merge if CI passes and you are OK with the latest changes. 🙏

@asottile asottile merged commit cff7843 into pytest-dev:master Jan 7, 2020
@nicoddemus nicoddemus deleted the remote-tb-5971 branch January 14, 2020 21:18
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jan 14, 2020
Somehow in Python 3.5 on Windows this test fails with:
   File "c:\hostedtoolcache\windows\python\3.5.4\x64\Lib\multiprocessing\connection.py", line 302, in _recv_bytes
     overlapped=True)
OSError: [WinError 6] The handle is invalid

This only happens in this platform and Python version, decided to use
a dummy traceback as originally done in pytest-dev#6412.
blueyed pushed a commit to blueyed/pytest that referenced this pull request Jan 16, 2020
Somehow in Python 3.5 on Windows this test fails with:
   File "c:\hostedtoolcache\windows\python\3.5.4\x64\Lib\multiprocessing\connection.py", line 302, in _recv_bytes
     overlapped=True)
OSError: [WinError 6] The handle is invalid

This only happens in this platform and Python version, decided to use
a dummy traceback as originally done in pytest-dev#6412.

(cherry picked from commit b9c136b)
blueyed pushed a commit to blueyed/pytest that referenced this pull request Jan 21, 2020
Somehow in Python 3.5 on Windows this test fails with:
   File "c:\hostedtoolcache\windows\python\3.5.4\x64\Lib\multiprocessing\connection.py", line 302, in _recv_bytes
     overlapped=True)
OSError: [WinError 6] The handle is invalid

This only happens in this platform and Python version, decided to use
a dummy traceback as originally done in pytest-dev#6412.

(cherry picked from commit b9c136b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test involving multiprocessing crashes when pytest 5.1.2 and xdist are used
3 participants