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

gh-88118: Fix some test_multiprocessing flakiness. #116434

Merged
merged 1 commit into from Mar 6, 2024

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Mar 6, 2024

Potentially introduced by #25845

not joining that thread likely leads to recently observed "environment changed" logically passing but overall failing tests seen on some buildbots similar to:

1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes

Potentially introduced by python#25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
@gpshead gpshead added tests Tests in the Lib/test dir skip news needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Mar 6, 2024
@gpshead gpshead self-assigned this Mar 6, 2024
@gpshead gpshead merged commit ea1803e into python:main Mar 6, 2024
34 checks passed
@miss-islington-app
Copy link

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

@gpshead gpshead deleted the gh88118/test_flakiness_fixup branch March 6, 2024 21:39
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 6, 2024
…6434)

Fix some test_multiprocessing flakiness.

Potentially introduced by python#25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
(cherry picked from commit ea1803e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-app
Copy link

bedevere-app bot commented Mar 6, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Mar 6, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 6, 2024
…6434)

Fix some test_multiprocessing flakiness.

Potentially introduced by python#25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
(cherry picked from commit ea1803e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-app
Copy link

bedevere-app bot commented Mar 6, 2024

GH-116441 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Mar 6, 2024
gpshead added a commit that referenced this pull request Mar 6, 2024
…GH-116440)

Fix some test_multiprocessing flakiness.

Potentially introduced by #25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
(cherry picked from commit ea1803e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
gpshead added a commit that referenced this pull request Mar 6, 2024
…GH-116441)

Fix some test_multiprocessing flakiness.

Potentially introduced by #25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
(cherry picked from commit ea1803e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
@vstinner
Copy link
Member

vstinner commented Mar 6, 2024

thread.join()

Usually, I use join_process() or threading_helper.join_thread() which raises an exception if the operation takes longer than a default timeout (usually 30 seconds). It avoids to hang if a bug fails for any reason.

@gpshead
Copy link
Member Author

gpshead commented Mar 6, 2024

oh thanks, good to know! if it ever crops up as an issue that's a good fix. I was wondering about that, I guess I didn't look far enough out to see the other code that does it.

@vstinner
Copy link
Member

vstinner commented Mar 6, 2024

I don't think that it's worth it to write a change just for that. But it's a thing which is nice to do when writing new tests.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
Fix some test_multiprocessing flakiness.

Potentially introduced by python#25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Fix some test_multiprocessing flakiness.

Potentially introduced by python#25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
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.

None yet

2 participants