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

test_sendfile_fallback_close_peer_in_the_middle_of_receiving false failure on macOS #98174

Closed
fancidev opened this issue Oct 11, 2022 · 5 comments
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@fancidev
Copy link
Contributor

The test_sendfile_fallback_close_peer_in_the_middle_of_receiving test in test.test_asyncio.test_sendfile.SelectEventLoopTests fails with error “OSError: [Errno 41] Protocol wrong type for socket” intermittently on macOS.

I have seen this error multiple times across Python 3.8-3.11rc1 CI test runs on GitHub Actions. For a recent example, see https://github.com/fancidev/qtinter/actions/runs/3219024415/jobs/5263887528 (this is a custom build run, but the test steps involves no custom code)

This is in fact nothing new — a similar issue was reported and fixed in #88395

Maybe a similar fix to the test case would suit.

@fancidev fancidev added the type-bug An unexpected behavior, bug, or error label Oct 11, 2022
@fancidev
Copy link
Contributor Author

Another CI test run with the same error (Python 3.7):
Python-3.7-PySide2-macos-latest

@sobolevn
Copy link
Member

sobolevn commented Oct 12, 2022

Can you please try the latest version? Will it still fail for you?
Refs #97546

@gvanrossum
Copy link
Member

If it does still fail in 3.11 or main, could you suggest a PR? We're short of experts in this area for sure! And I think our main SSL expert works primarily (only?) on Linux.

@akulakov
Copy link
Contributor

I could not reproduce locally on MacOS 11.5.2 M1, I did a few hundred test runs on both Py 3.9 and latest dev version.

@fancidev
Copy link
Contributor Author

@sobolevn: The issue still exists in recent code -- here is a CI run error example on 3.11.0-rc1: https://github.com/fancidev/qtinter/actions/runs/3219024415/jobs/5263887528#logs

@gvanrossum: I proposed a PR just now. Thanks for reviewing!

@akulakov: Neither can I reproduce the issue on my dev machine, though I've seen it a few times on CI runs. I suppose the load on CI server makes the issue easier to occur.

gvanrossum pushed a commit that referenced this issue Oct 17, 2022
…se_peer_in_the_middle_of_receiving (#98316)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 17, 2022
…ck_close_peer_in_the_middle_of_receiving (pythonGH-98316)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <fancidev@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 17, 2022
…ck_close_peer_in_the_middle_of_receiving (pythonGH-98316)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <fancidev@gmail.com>
miss-islington added a commit that referenced this issue Oct 17, 2022
…se_peer_in_the_middle_of_receiving (GH-98316)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <fancidev@gmail.com>
carljm added a commit to carljm/cpython that referenced this issue Oct 17, 2022
* main: (31 commits)
  pythongh-95913: Move subinterpreter exper removal to 3.11 WhatsNew (pythonGH-98345)
  pythongh-95914: Add What's New item describing PEP 670 changes (python#98315)
  Remove unused arrange_output_buffer function from zlibmodule.c. (pythonGH-98358)
  pythongh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving (python#98316)
  pythonGH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport (python#98333)
  pythongh-93691: Compiler's code-gen passes location around instead of holding it on the global compiler state (pythonGH-98001)
  pythongh-97669: Create Tools/build/ directory (python#97963)
  pythongh-95534: Improve gzip reading speed by 10% (python#97664)
  pythongh-95913: Forward-port int/str security change to 3.11 What's New in main (python#98344)
  pythonGH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (pythonGH-98336)
  pythongh-97930: Merge with importlib_resources 5.9 (pythonGH-97929)
  pythongh-85525: Remove extra row in doc (python#98337)
  pythongh-85299: Add note warning about entry point guard for asyncio example (python#93457)
  pythongh-97527: IDLE - fix buggy macosx patch (python#98313)
  pythongh-98307: Add docstring and documentation for SysLogHandler.createSocket (pythonGH-98319)
  pythongh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, `PyFunction_GetModule` (python#98158)
  pythonGH-94597: Deprecate child watcher getters and setters (python#98215)
  pythongh-98254: Include stdlib module names in error messages for NameErrors (python#98255)
  Improve speed. Reduce auxiliary memory to 16.6% of the main array. (pythonGH-98294)
  [doc] Update logging cookbook with an example of custom handling of levels. (pythonGH-98290)
  ...
gvanrossum pushed a commit that referenced this issue Oct 18, 2022
…ack_close_peer_in_the_middle_of_receiving (GH-98316) (#98357)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <fancidev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

5 participants