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_close_peer_in_the_middle_of_receiving fails with Linux 6.10 release candidates and non-4KiB page size #120226

Closed
xry111 opened this issue Jun 7, 2024 · 1 comment
Labels
type-bug An unexpected behavior, bug, or error

Comments

@xry111
Copy link
Contributor

xry111 commented Jun 7, 2024

Bug report

Bug description:

With Linux-6.10-rc2 configured to use 16KiB page:

$ python3 -m test test.test_asyncio.test_sendfile -m test_sendfile_close_peer_in_the_middle_of_receiving -v 
== CPython 3.12.4 (main, Jun 7 2024, 14:39:05) [GCC 14.1.0]
== Linux-6.10.0-rc2+-loongarch64-with-glibc2.39 little-endian
== Python build: release shared LTO+PGO
== cwd: /tmp/test_python_worker_1673æ
== CPU count: 8
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 3315485672
0:00:00 load avg: 0.03 Run 1 test sequentially
0:00:00 load avg: 0.03 [1/1] test.test_asyncio.test_sendfile
test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.EPollEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving) ... FAIL
test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.PollEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving) ... FAIL
test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.SelectEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving) ... FAIL

======================================================================
FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.EPollEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.12/test/test_asyncio/test_sendfile.py", line 466, in test_sendfile_close_peer_in_the_middle_of_receiving
    with self.assertRaises(ConnectionError):
AssertionError: ConnectionError not raised

======================================================================
FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.PollEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.12/test/test_asyncio/test_sendfile.py", line 466, in test_sendfile_close_peer_in_the_middle_of_receiving
    with self.assertRaises(ConnectionError):
AssertionError: ConnectionError not raised

======================================================================
FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.SelectEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.12/test/test_asyncio/test_sendfile.py", line 466, in test_sendfile_close_peer_in_the_middle_of_receiving
    with self.assertRaises(ConnectionError):
AssertionError: ConnectionError not raised

----------------------------------------------------------------------
Ran 3 tests in 0.028s

FAILED (failures=3)
test test.test_asyncio.test_sendfile failed
test.test_asyncio.test_sendfile failed (3 failures)

== Tests result: FAILURE ==

1 test failed:
    test.test_asyncio.test_sendfile

Total duration: 88 ms
Total tests: run=3 (filtered) failures=3
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE

I have to raise DATA to 272KiB to make the test pass. On an AArch64 system I configured the kernel to use 64KiB page I have to raise it to 1088KiB.

Bisection shows torvalds/linux@8ee602c is the first commit triggering the issue but frankly I've no idea why.

CPython versions tested on:

3.12, CPython main branch

Operating systems tested on:

Linux

Linked PRs

@xry111 xry111 added the type-bug An unexpected behavior, bug, or error label Jun 7, 2024
@xry111 xry111 changed the title Test failure with Linux 6.10 release candidates and non-4KiB page size test_sendfile_close_peer_in_the_middle_of_receiving fails with Linux 6.10 release candidates and non-4KiB page size Jun 7, 2024
gvanrossum pushed a commit that referenced this issue Jun 7, 2024
… Linux >= 6.10 (#120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
…ing on Linux >= 6.10 (python#120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
…ing on Linux >= 6.10 (python#120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
@hroncok
Copy link
Contributor

hroncok commented Aug 27, 2024

Thank you. This probably needs backports for all the Python versions.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 28, 2024
…ing on Linux >= 6.10 (pythonGH-120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a758424)

Co-authored-by: Xi Ruoyao <xry111@xry111.site>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 28, 2024
…ing on Linux >= 6.10 (pythonGH-120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a758424)

Co-authored-by: Xi Ruoyao <xry111@xry111.site>
vstinner pushed a commit that referenced this issue Aug 28, 2024
…ving on Linux >= 6.10 (GH-120227) (#123422)

gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a758424)

Co-authored-by: Xi Ruoyao <xry111@xry111.site>
Yhg1s pushed a commit that referenced this issue Sep 2, 2024
…ving on Linux >= 6.10 (GH-120227) (#123421)

gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a758424)

Co-authored-by: Xi Ruoyao <xry111@xry111.site>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants