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 — On Windows, test_distutils and test_peg_generator leak a temporary file: Microsoft · Issue #93919 · python/cpython

On Windows, test_distutils and test_peg_generator leak a temporary file: Microsoft #93919

New issue
Copy link
New issue
Copy link
Closed
Closed
On Windows, test_distutils and test_peg_generator leak a temporary file: Microsoft#93919
Copy link
Assignees
zware
Labels
OS-windowstestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Jun 16, 2022
Issue body actions

Running test_distutils on Windows leaks a temporary file: Microsoft.

0:08:46 load avg: 7.14 [231/436/3] test_distutils failed (env changed) (49.1 sec) -- running: test_socket (59.3 sec), test_urllib2_localnet (33.2 sec)
(...)
Warning -- test_distutils leaked temporary files (1): Microsoft

The test should be run with -jN, like: python -m test -j1 test_distutils -v --fail-env-changed.

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 16, 2022
  2. vstinner commented on Jun 16, 2022

    @vstinner
    vstinner
    on Jun 16, 2022
    MemberAuthor
    More actions

    Same issue with test_peg_generator:

    0:15:37 load avg: 5.75 [424/436/5] test_peg_generator failed (env changed) (5 min 51 sec) -- running: test_largefile (38.2 sec), test_mmap (1 min 42 sec)
    (...)
    Warning -- test_peg_generator leaked temporary files (1): Microsoft
    
  3. Fidget-Spinner commented on Jun 17, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on Jun 17, 2022
    Member
    More actions
    Warning -- test_distutils leaked temporary files (1): Microsoft
    
    == Tests result: ENV CHANGED ==
    
    1 test altered the execution environment:
        test_distutils
    
    Total duration: 2.8 sec
    Tests result: ENV CHANGED
    ran 1 tests/3
    exit 3
    Tests failed: continuing with this subtest
    
    Tests (1):
    * distutils.tests.test_build_ext.BuildExtTestCase.test_build_ext
    
    Bisection completed in 16 iterations and 0:00:38
    
  4. Fidget-Spinner commented on Jun 17, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on Jun 17, 2022
    Member
    More actions

    I think there's a race condition somewhere, when I run the command you gave me multiple times (python_d.exe -m test.bisect_cmd -j1 test_distutils -v --fail-env-changed), I get different results:

    Tests (1):
    * distutils.tests.test_msvccompiler.msvccompilerTestCase.test_get_vc_env_unicode
    
    Tests (1):
    * distutils.tests.test_build_ext.ParallelBuildExtTestCase.test_build_ext
    
    Tests (1):
    * distutils.tests.test_build_ext.ParallelBuildExtTestCase.test_optional_extension
    
    Tests (1):
    * distutils.tests.test_build_ext.ParallelBuildExtTestCase.test_get_outputs
    
  5. AlexWaygood
    added
    OS-windows
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Jun 17, 2022
  6. vstinner commented on Jun 17, 2022

    @vstinner
    vstinner
    on Jun 17, 2022
    MemberAuthor
    More actions

    I get different results:

    bisect_cmd picks any test which reproduces the issue. So at least 4 tests leak a temporary file :-)

  7. vstinner
    changed the title [-]On Windows, test_distutils leaks a temporary file: Microsoft[/-] [+]On Windows, test_distutils and test_peg_generator leak a temporary file: Microsoft[/+] on Oct 10, 2022
  8. vstinner commented on Oct 10, 2022

    @vstinner
    vstinner
    on Oct 10, 2022
    MemberAuthor
    More actions

    I marked my issue #98168 as a duplicate of this issue.

  9. vstinner commented on Nov 3, 2022

    @vstinner
    vstinner
    on Nov 3, 2022
    MemberAuthor
    More actions

    Sadly, I don't have the bandwidth to work on this issue, I just close it.

  10. vstinner
    closed this as completedon Nov 3, 2022
  11. zware commented on May 29, 2023

    @zware
    zware
    on May 29, 2023
    Member
    More actions

    I've had a chance to look into this, and it looks like what is actually left is an empty directory tree: Microsoft\VSApplicationInsights\vstelAIF-312cbd79-9dbb-4c48-a7da-3cc1a931cb70\ (that last part may not be the same every time).

    I've searched around and found no way to disable this, but it may or may not be related to the worker being deployed on Azure. @zooba or @eryksun, if you have any suggestions for making this go away I'm open to them, but I wonder if it wouldn't be better to just ignore a directory called Microsoft in the leaked temporary files check.

  12. zware
    reopened this on May 29, 2023
  13. zware
    self-assigned this
    on May 29, 2023
  14. zware commented on May 29, 2023

    @zware
    zware
    on May 29, 2023
    Member
    More actions

    Hmm. It turns out that an update to VS (and an attempt to trim down the installed components) seems like it may have resolved this; the latest build (which was a rebuild of the previous failure) passed.

  15. zware
    closed this as completedon May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @zware
    zware

Labels

OS-windowstestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.