GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-38323: Temporarily skip close_kill_running() for MultiLoopWatcher in test_asyncio by aeros · Pull Request #20013 · python/cpython

Conversation

@aeros

@aeros aeros commented May 8, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Note that @unittest.skipIf() is not an option here because the child watcher is not set until after setUp() in the mixin.

https://bugs.python.org/issue38323

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aeros
Temporarily skip close_kill_running() for MultiLoopWatcher in test_as…
8421f9f
…yncio
@aeros aeros added tests Tests in the Lib/test dir skip news labels May 8, 2020
@aeros
aeros requested review from 1st1 and asvetlov as code owners May 8, 2020 23:08
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 8, 2020
@bedevere-bot bedevere-bot added the awaiting core review label May 8, 2020
pppery
pppery reviewed May 8, 2020
View reviewed changes
Comment thread Lib/test/test_asyncio/test_subprocess.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aeros

aeros commented May 8, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Oops, that's an easy fix for the windows failure. I should be able to just use asyncio.MultiLoopWatcher instead of asyncio.unix_events.MultiLoopWatcher.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aeros and others added 2 commits May 8, 2020 19:46
@aeros
Fix MultiLoopWatcher name for Windows compatibility
12d7544
@aeros @pppery
Use self.skipTest()
842a21c
Co-authored-by: pppery <[email protected]>
@aeros

aeros commented May 9, 2020

Copy link
Copy Markdown
Contributor Author
======================================================================
ERROR: test_close_kill_running (test.test_asyncio.test_subprocess.SubprocessProactorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\a\1\s\lib\test\test_asyncio\test_subprocess.py", line 463, in test_close_kill_running
    if isinstance(asyncio.get_child_watcher(),
  File "d:\a\1\s\lib\asyncio\events.py", line 766, in get_child_watcher
    return get_event_loop_policy().get_child_watcher()
  File "d:\a\1\s\lib\asyncio\events.py", line 602, in get_child_watcher
    raise NotImplementedError
NotImplementedError

Oh, I hadn't realized that get_child_watcher() wasn't supported on Windows. I'll add a platform check.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aeros
Add Windows platform check
b210564
@aeros

aeros commented May 9, 2020

Copy link
Copy Markdown
Contributor Author

@vstinner Would you mind giving this a quick look-over before I merge it? This PR is fairly straightforward since it's just skipping a test, but I'm not quite comfortable yet with merging my own without an approval (particularly with the earlier CI failures).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aeros
aeros requested a review from vstinner May 9, 2020 00:50
cjerdonek
cjerdonek reviewed May 9, 2020
View reviewed changes
Comment thread Lib/test/test_asyncio/test_subprocess.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aeros @cjerdonek
Check self.Watcher instead of asyncio.get_child_watcher()
c42449f
Co-authored-by: Chris Jerdonek <[email protected]>
@cjerdonek

cjerdonek commented May 9, 2020

Copy link
Copy Markdown
Member

Actually, are you sure that test_close_kill_running() is the one that needs to be skipped? @asvetlov added code to address the hang in that test here: #18457

If you look at this comment of @vstinner, it seems like he might be referring to tests other than test_close_kill_running(): https://bugs.python.org/issue38323#msg368061
(like the one you mentioned test_stdin_stdout()).

Either way, it would be important to know if this test was still hanging even with Andrew's change, as that would be a new failure variant.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aeros

aeros commented May 10, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@cjerdonek Based on the following comment:

we may want to consider skipping test_close_kill_running for MultiLoopWatcher until we can find one

There are more MultiLoopWatcher tests which hang randomly, it's not only test_close_kill_running().

I'm fine with skipping tests until someone can come up with a fix.

I'm fairly certain that test_close_kill_running() was still hanging randomly, even after Andrew's fix. I was unable to reproduce the failure locally though, so I wasn't able to confirm it myself. I made this PR based on @vstinner's above comment, but if/when I find the time, I'll try to look through to buildbot logs to confirm if there were still hangs for test_close_kill_running() after Andrew merged #18457.

cjerdonek reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cjerdonek

cjerdonek commented May 10, 2020

Copy link
Copy Markdown
Member

I'll try to look through to buildbot logs to confirm if there were still hangs for test_close_kill_running()

That would be great. (In all the times I've reproduced the hang locally, Andrew's change would have prevented it.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request Apr 10, 2022
asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) #82504
Closed
@ezio-melotti ezio-melotti removed the CLA signed label Jul 13, 2022
@kumaraditya303

kumaraditya303 commented Aug 2, 2022

Copy link
Copy Markdown
Contributor

Closing as the entire SubprocessMultiLoopWatcherTests tests are currently skipped.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303 kumaraditya303 closed this Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@vstinner vstinner Awaiting requested review from vstinner
2 more reviewers
@cjerdonek cjerdonek cjerdonek left review comments
@pppery pppery pppery left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@aeros @cjerdonek @kumaraditya303 @pppery @the-knights-who-say-ni @ezio-melotti @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.