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 — test_pyrepl leaks references · Issue #119469 · python/cpython

test_pyrepl leaks references #119469

New issue
Copy link
New issue
Copy link
Closed
Closed
test_pyrepl leaks references#119469
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dir

Description

@vstinner
vstinner
opened on May 23, 2024
Issue body actions

Since commit fe92193, test_pyrepl started to leak a lot of references.

commit fe921931a35b461fb81821a474b510f4d67c520b (HEAD)
Author: Lysandros Nikolaou <[email protected]>
Date:   Mon May 20 17:57:32 2024 -0400

    gh-111201: Add tests for unix console class in pyrepl (#118653)

Example:

$ ./python -m test test_pyrepl -u all -R 3:3
(...)
test_pyrepl leaked [8943, 8939, 8943] references, sum=26825
test_pyrepl leaked [3138, 3136, 3138] memory blocks, sum=9412
(...)

cc @lysnikolaou

Linked PRs

  • gh-119469: Fix _pyrepl reference leaks #119470
  • [3.13] gh-119469: Fix _pyrepl reference leaks (GH-119470) #119471

Activity

  1. vstinner
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on May 23, 2024
  2. vstinner commented on May 23, 2024

    @vstinner
    vstinner
    on May 23, 2024
    MemberAuthor
    More actions

    The problem comes from self.old_sigwinch = signal.signal(signal.SIGWINCH, self.__sigwinch) in UnixConsole.prepare(). The test doesn't call console.restore().

    Reacted by Łukasz Langa
  3. ambv commented on May 23, 2024

    @ambv
    ambv
    on May 23, 2024
    Contributor
    More actions

    thanks for the super quick investigation, Victor

    Reacted by Victor Stinner
    Reacted by Victor Stinner and Erlend E. Aasland
  4. vstinner commented on May 23, 2024

    @vstinner
    vstinner
    on May 23, 2024
    MemberAuthor
    More actions

    Python 3.13 is also affected. Example:

    $ ./python -m test test_pyrepl -u all -R 3:3 -m test_simple_addition
    (...)
    test_pyrepl leaked [851, 851, 851] references, sum=2553
    test_pyrepl leaked [289, 289, 289] memory blocks, sum=867
    
    Reacted by Łukasz Langa
  5. ambv commented on May 23, 2024

    @ambv
    ambv
    on May 23, 2024
    Contributor
    More actions

    Will backport.

  6. ambv
    added 2 commits that reference this issue on May 23, 2024

    pythongh-119469: Fix _pyrepl reference leaks

    3be2a86

    gh-119469: Fix _pyrepl reference leaks (#119470)

    6e012ce
  7. miss-islington
    added a commit that references this issue on May 23, 2024

    pythongh-119469: Fix _pyrepl reference leaks (pythonGH-119470)

    f283166
  8. ambv
    added a commit that references this issue on May 23, 2024

    [3.13] gh-119469: Fix _pyrepl reference leaks (GH-119470) (#119471)

    8fd8cc5
  9. Eclips4
    closed this as completedon May 23, 2024
  10. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythongh-119469: Fix _pyrepl reference leaks (python#119470)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dir

    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.