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 — gh-101758: Fix Refleak Testing With test_singlephase_variants by ericsnowcurrently · Pull Request #101969 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Feb 16, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

gh-101891 is causing failures under $> ./python -m test test_imp -R 3:3. Furthermore, with that fixed, "test_singlephase_variants" is leaking references. This change addresses the first part, but skips the leaking tests until we can follow up with a fix.

  • Issue: Isolate PyModuleDef to Each Interpreter for Extension/Builtin Modules #101758

Sorry, something went wrong.

Uh oh!

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

All reactions
ericsnowcurrently added 2 commits February 16, 2023 16:04
@ericsnowcurrently
Hide the test comment.
a88e9bd
@ericsnowcurrently
Get test_singlephase_variants working under refleak detection.
fc8e344
@ericsnowcurrently ericsnowcurrently added the skip news label Feb 16, 2023
@bedevere-bot bedevere-bot added the awaiting core review label Feb 16, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 16, 2023
Isolate PyModuleDef to Each Interpreter for Extension/Builtin Modules #101758
Closed
@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Feb 16, 2023
@ericsnowcurrently ericsnowcurrently mentioned this pull request Feb 16, 2023
gh-101766: Fix refleak for _BlockingOnManager resources #101942
Merged
@ericsnowcurrently
Temporarily skip the tests.
0d98bde
@ericsnowcurrently
ericsnowcurrently marked this pull request as ready for review February 16, 2023 23:53
@ericsnowcurrently
Merge branch 'main' into fix-refleak-in-single-phase-test
bb2b40a
@ericsnowcurrently
ericsnowcurrently merged commit 984f8ab into python:main Feb 17, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label Feb 17, 2023
@ericsnowcurrently
ericsnowcurrently deleted the fix-refleak-in-single-phase-test branch February 17, 2023 00:21
@bedevere-bot

bedevere-bot commented Feb 17, 2023

Copy link
Copy Markdown

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

Hi! The buildbot ARM64 macOS 3.x has failed when building commit 984f8ab.

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/all/#builders/725/builds/3764) and take a look at the build logs.
  4. Check if the failure is related to this commit (984f8ab) 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/all/#builders/725/builds/3764

Failed tests:

  • test_asyncio

Failed subtests:

  • test_wait_for_race_condition - test.test_asyncio.test_waitfor.AsyncioWaitForTest.test_wait_for_race_condition

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

== Tests result: FAILURE then FAILURE ==

405 tests OK.

10 slowest tests:

  • test_signal: 4 min 10 sec
  • test_concurrent_futures: 2 min 34 sec
  • test_multiprocessing_spawn: 2 min 9 sec
  • test_ssl: 1 min 43 sec
  • test_multiprocessing_forkserver: 1 min 38 sec
  • test_asyncio: 1 min 29 sec
  • test_logging: 1 min 10 sec
  • test_math: 1 min 8 sec
  • test_capi: 47.0 sec
  • test_tokenize: 39.7 sec

1 test failed:
test_asyncio

25 tests skipped:
test_check_c_globals test_devpoll test_epoll test_gdb test_idle
test_ioctl test_launcher test_msilib test_multiprocessing_fork
test_ossaudiodev test_peg_generator test_perf_profiler test_spwd
test_startfile test_tcl test_tix test_tkinter test_ttk
test_ttk_textonly test_turtle test_winconsoleio test_winreg
test_winsound test_wmi test_zipfile64

1 re-run test:
test_asyncio

Total duration: 8 min 17 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/tasks.py", line 478, in wait_for
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/unittest/async_case.py", line 90, in _callTestMethod
    if self._callMaybeAsync(method) is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/unittest/async_case.py", line 112, in _callMaybeAsync
    return self._asyncioRunner.run(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_asyncio/test_waitfor.py", line 163, in test_wait_for_race_condition
    res = await task
          ^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/tasks.py", line 477, in wait_for
    async with timeouts.timeout(timeout):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/timeouts.py", line 98, in __aexit__
    raise TimeoutError
TimeoutError
All reactions

Sorry, something went wrong.

Uh oh!

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

@ericsnowcurrently ericsnowcurrently mentioned this pull request Feb 25, 2023
gh-102251: Updates to test_imp Toward Fixing Some Refleaks #102254
Merged
ericsnowcurrently added a commit that referenced this pull request Feb 27, 2023
@ericsnowcurrently
gh-102251: Updates to test_imp Toward Fixing Some Refleaks (gh-102254)
bb0cf8f
This is related to fixing the refleaks introduced by commit 096d009.  I haven't been able to find the leak yet, but these changes are a consequence of that effort.  This includes some cleanup, some tweaks to the existing tests, and a bunch of new test cases.  The only change here that might have impact outside the tests in question is in imp.py, where I update imp.load_dynamic() to use spec_from_file_location() instead of creating a ModuleSpec directly.

Also note that I've updated the tests to only skip if we're checking for refleaks (regrtest's --huntrleaks), whereas in gh-101969 I had skipped the tests entirely.  The tests will be useful for some upcoming work and I'd rather the refleaks not hold that up.  (It isn't clear how quickly we'll be able to fix the leaking code, though it will certainly be done in the short term.)

#102251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

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.

2 participants

@ericsnowcurrently @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.