Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 4, 2025

Fix a race condition in test_check_output_timeout() of test_subprocess. Don't write into stdout anymore, since there is no reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove @requires_resource('walltime') decorator.

Fix a race condition in test_check_output_timeout() of
test_subprocess. Don't write into stdout anymore, since there is no
reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove
@requires_resource('walltime') decorator.
@vstinner
Copy link
Member Author

vstinner commented Mar 4, 2025

cc @colesbury @gpshead

@vstinner vstinner enabled auto-merge (squash) March 5, 2025 10:37
@vstinner vstinner merged commit 67a942d into python:main Mar 5, 2025
52 checks passed
@vstinner vstinner deleted the test_check_output_timeout branch March 5, 2025 10:51
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2025
…-130836)

Fix a race condition in test_check_output_timeout() of
test_subprocess. Don't write into stdout anymore, since there is no
reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove
@requires_resource('walltime') decorator.
(cherry picked from commit 67a942d)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 5, 2025

GH-130873 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Mar 5, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2025
…-130836)

Fix a race condition in test_check_output_timeout() of
test_subprocess. Don't write into stdout anymore, since there is no
reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove
@requires_resource('walltime') decorator.
(cherry picked from commit 67a942d)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 5, 2025

GH-130874 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Mar 5, 2025
vstinner added a commit that referenced this pull request Mar 5, 2025
…) (#130874)

gh-116742: Fix subprocess test_check_output_timeout() (GH-130836)

Fix a race condition in test_check_output_timeout() of
test_subprocess. Don't write into stdout anymore, since there is no
reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove
@requires_resource('walltime') decorator.
(cherry picked from commit 67a942d)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this pull request Mar 5, 2025
…) (#130873)

gh-116742: Fix subprocess test_check_output_timeout() (GH-130836)

Fix a race condition in test_check_output_timeout() of
test_subprocess. Don't write into stdout anymore, since there is no
reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove
@requires_resource('walltime') decorator.
(cherry picked from commit 67a942d)

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

vstinner commented Mar 5, 2025

Merged, thanks for the review.

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD 3.13 (tier-3) has failed when building commit aa2c4e4.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1491/builds/998) and take a look at the build logs.
  4. Check if the failure is related to this commit (aa2c4e4) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1491/builds/998

Failed tests:

  • test_interpreters

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/test/test_interpreters/test_stress.py", line 47, in run
    interp = interpreters.create()
  File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k


Traceback (most recent call last):
  File "<frozen getpath>", line 357, in <module>
ValueError: embedded null byte
Warning -- Uncaught thread exception: InterpreterError
Exception in thread Thread-387 (run):
RuntimeError: error evaluating path

seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…30836)

Fix a race condition in test_check_output_timeout() of
test_subprocess. Don't write into stdout anymore, since there is no
reliable way to synchronize the parent and the child processes.

Change the timeout from 3 seconds to 0.1 seconds, and remove
@requires_resource('walltime') decorator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants