Skip to content

Fix serialization of 'None' reprcrashes - #6412

Merged
asottile merged 2 commits into
pytest-dev:masterfrom
nicoddemus:remote-tb-5971
Jan 7, 2020
Merged

Fix serialization of 'None' reprcrashes#6412
asottile merged 2 commits into
pytest-dev:masterfrom
nicoddemus:remote-tb-5971

Conversation

@nicoddemus

@nicoddemus nicoddemus commented Jan 7, 2020

Copy link
Copy Markdown
Member

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

blueyed commented Jan 7, 2020

Copy link
Copy Markdown
Contributor

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

Comment thread testing/test_reports.py Outdated
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
Copy Markdown
Member Author

Maybe interesting in this context: ionelmc/python-tblib

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

@asottile asottile left a comment

Copy link
Copy Markdown
Member

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

Comment thread testing/test_reports.py Outdated
Comment thread testing/test_reports.py
"""
testdir.makepyfile(
"""
from concurrent.futures import ProcessPoolExecutor

@nicoddemus nicoddemus Jan 7, 2020

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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 pushed 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