8000 [3.8] bpo-38356: Fix ThreadedChildWatcher thread leak in test_asyncio (GH-16552) by miss-islington · Pull Request #17963 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.8] bpo-38356: Fix ThreadedChildWatcher thread leak in test_asyncio (GH-16552) #17963

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

Merged
merged 1 commit into from
Jan 12, 2020

Conversation

miss-islington
Copy link
Contributor
@miss-islington miss-islington commented Jan 12, 2020

Motivation for this PR (comment from @vstinner in bpo issue):

Warning seen o AMD64 Ubuntu Shared 3.x buildbot:
https://buildbot.python.org/all/GH-/builders/141/builds/2593

test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ...
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)

The following implementation details for the new method are TBD:

  1. Public vs private

  2. Inclusion in close()

  3. Name

  4. Coroutine vs subroutine method

  5. timeout parameter

If it's a private method, 3, 4, and 5 are significantly less important.

I started with the most minimal implementation that fixes the dangling threads without modifying the regression tests, which I think is particularly important. I typically try to avoid directly modifying existing tests as much as possible unless it's necessary to do so. However, I am open to changing any part of this.

https://bugs.python.org/issue38356
(cherry picked from commit 0ca7cc7)

Co-authored-by: Kyle Stanley aeros167@gmail.com

https://bugs.python.org/issue38356

…onGH-16552)

Motivation for this PR (comment from @vstinner in bpo issue):
```
Warning seen o AMD64 Ubuntu Shared 3.x buildbot:
https://buildbot.python.org/all/GH-/builders/141/builds/2593

test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ...
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
```
The following implementation details for the new method are TBD:

1) Public vs private

2) Inclusion in `close()`

3) Name

4) Coroutine vs subroutine method

5) *timeout* parameter

If it's a private method, 3, 4, and 5 are significantly less important.

I started with the most minimal implementation that fixes the dangling threads without modifying the regression tests, which I think is particularly important. I typically try to avoid directly modifying existing tests as much as possible unless it's necessary to do so. However, I am open to changing any part of this.

https://bugs.python.org/issue38356
(cherry picked from commit 0ca7cc7)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
@miss-islington
Copy link
Contributor Author

@aeros: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 33dd75a into python:3.8 Jan 12, 2020
@miss-islington miss-islington deleted the backport-0ca7cc7-3.8 branch January 12, 2020 11:21
@miss-islington
Copy link
Contributor Author

@aeros: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@aeros: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0