Skip to content

test_subprocess: test_pipesize_default() failed on s390x Fedora Clang 3.x buildbot #110184

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

Closed
vstinner opened this issue Oct 1, 2023 · 4 comments
Labels
tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Oct 1, 2023

s390x Fedora Clang 3.x buildbot:

FAIL: test_pipesize_default (test.test_subprocess.ProcessTestCase.test_pipesize_default)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang/build/Lib/test/test_subprocess.py", line 763, in test_pipesize_default
    self.assertEqual(
AssertionError: 65536 != 8192

build: https://buildbot.python.org/all/#/builders/3/builds/4728

Linked PRs

@vstinner vstinner added the tests Tests in the Lib/test dir label Oct 1, 2023
@vstinner
Copy link
Member Author

vstinner commented Oct 5, 2023

New fail on s390x Fedora Refleaks 3.x: https://buildbot.python.org/all/#/builders/433/builds/902

vstinner added a commit to vstinner/cpython that referenced this issue Oct 6, 2023
For proc.stdin, get the size of the read end of the pipe.

Use subprocess context manager ("with proc:").
vstinner added a commit that referenced this issue Oct 6, 2023
For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 6, 2023
)

For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
(cherry picked from commit d023d41)

Co-authored-by: Victor Stinner <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 6, 2023
)

For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
(cherry picked from commit d023d41)

Co-authored-by: Victor Stinner <[email protected]>
@vstinner vstinner closed this as completed Oct 6, 2023
vstinner added a commit that referenced this issue Oct 6, 2023
…110471)

gh-110184: Fix subprocess test_pipesize_default() (GH-110465)

For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
(cherry picked from commit d023d41)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this issue Oct 6, 2023
…110472)

gh-110184: Fix subprocess test_pipesize_default() (GH-110465)

For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
(cherry picked from commit d023d41)

Co-authored-by: Victor Stinner <[email protected]>
@vstinner
Copy link
Member Author

vstinner commented Oct 7, 2023

Oh. It seems like the test failed again when PR gh-110441 got merged: https://buildbot.python.org/all/#/builders/531/builds/4639 It's surprising since the test passed before.

0:03:25 load avg: 2.45 Re-running 1 failed tests in verbose mode in subprocesses
0:03:25 load avg: 2.45 Run 1 test in parallel using 1 worker process (timeout: 20 min, worker timeout: 25 min)
0:03:25 load avg: 2.45 [1/1/1] test_subprocess failed (2 errors, 2 failures)
Re-running test_subprocess in verbose mode (matching: test_pipesizes, test_pipesize_default)
test_pipesize_default (test.test_subprocess.ProcessTestCase.test_pipesize_default) ... FAIL
test_pipesizes (test.test_subprocess.ProcessTestCase.test_pipesizes) ... ERROR
test_pipesize_default (test.test_subprocess.ProcessTestCaseNoPoll.test_pipesize_default) ... FAIL
test_pipesizes (test.test_subprocess.ProcessTestCaseNoPoll.test_pipesizes) ... ERROR

======================================================================
ERROR: test_pipesizes (test.test_subprocess.ProcessTestCase.test_pipesizes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/test_subprocess.py", line 727, in test_pipesizes
    p = subprocess.Popen(
        ^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/subprocess.py", line 992, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/subprocess.py", line 1731, in _get_handles
    fcntl.fcntl(errwrite, fcntl.F_SETPIPE_SZ, self.pipesize)
PermissionError: [Errno 1] Operation not permitted

======================================================================
ERROR: test_pipesizes (test.test_subprocess.ProcessTestCaseNoPoll.test_pipesizes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/test_subprocess.py", line 727, in test_pipesizes
    p = subprocess.Popen(
        ^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/subprocess.py", line 992, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/subprocess.py", line 1731, in _get_handles
    fcntl.fcntl(errwrite, fcntl.F_SETPIPE_SZ, self.pipesize)
PermissionError: [Errno 1] Operation not permitted

======================================================================
FAIL: test_pipesize_default (test.test_subprocess.ProcessTestCase.test_pipesize_default)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/test_subprocess.py", line 769, in test_pipesize_default
    self.assertEqual(
AssertionError: 65536 != 8192

======================================================================
FAIL: test_pipesize_default (test.test_subprocess.ProcessTestCaseNoPoll.test_pipesize_default)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/test_subprocess.py", line 769, in test_pipesize_default
    self.assertEqual(
AssertionError: 65536 != 8192

----------------------------------------------------------------------
Ran 4 tests in 0.013s

FAILED (failures=2, errors=2)
test test_subprocess failed
1 test failed again:
    test_subprocess

== Tests result: FAILURE then FAILURE ==

@vstinner vstinner reopened this Oct 7, 2023
@vstinner
Copy link
Member Author

  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/subprocess.py", line 1731, in _get_handles
    fcntl.fcntl(errwrite, fcntl.F_SETPIPE_SZ, self.pipesize)
PermissionError: [Errno 1] Operation not permitted

The manual page says: https://man7.org/linux/man-pages/man2/fcntl.2.html

An unprivileged process can adjust the
pipe capacity to any value between the system page size
and the limit defined in /proc/sys/fs/pipe-max-size (see
proc(5)).

and:

Attempts by an unprivileged process to set the pipe
capacity above the limit in /proc/sys/fs/pipe-max-size
yield the error EPERM

@vstinner
Copy link
Member Author

vstinner commented Nov 8, 2023

I didn't see the failure failure recently on s390x Fedora Clang 3.x, so I close the issue.

@vstinner vstinner closed this as completed Nov 8, 2023
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

1 participant