Skip to content

test_datetime leaks references #119655

Description

@vstinner

Example:

$ ./python -m test -R 3:3 test_datetime -m test.datetimetester.TestDateTime_Pure.test_compat_unpickle
(...)
test_datetime leaked [8, 8, 8] references, sum=24
test_datetime leaked [8, 8, 8] memory blocks, sum=24

Regression: commit 3e8b609

commit 3e8b60905e97a4fe89bb24180063732214368938
Author: Erlend E. Aasland <erlend@python.org>
Date:   Tue May 28 00:02:46 2024 +0200

    gh-117398: Add multiphase support to _datetime (gh-119373)
    
    This is minimal support.  Subinterpreters are not supported yet.  That will be addressed in a later change.
    
    Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

 Lib/test/datetimetester.py | 21 +++++++++++++++++++++
 Modules/_datetimemodule.c  | 26 +++++++++++---------------
 2 files changed, 32 insertions(+), 15 deletions(-)

cc @erlend-aasland @ericsnowcurrently

Linked PRs

Activity

  1. encukou commented on May 28, 2024

    @encukou
    Member

    I'm looking into it.

  2. encukou commented on May 28, 2024

    @encukou
    Member

    See: #119662

  3. added a commit that references this issue on May 28, 2024
  4. added a commit that references this issue on May 28, 2024
  5. erlend-aasland commented on May 28, 2024

    @erlend-aasland
    Contributor

    Thanks for fixing this, Petr!

  6. Eclips4 commented on May 29, 2024

    @Eclips4
    Member

    Unfortunately, there's a new leaks in the test_datetime:

    ./python.exe -m test -R 3:3 test_datetime
    Using random seed: 1167096647
    0:00:00 load avg: 15.47 Run 1 test sequentially
    0:00:00 load avg: 15.47 [1/1] test_datetime
    beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
    123:456
    XXX XXX
    test_datetime leaked [39, 39, 39] references, sum=117
    test_datetime leaked [29, 29, 29] memory blocks, sum=87
    test_datetime failed (reference leak)
    
    == Tests result: FAILURE ==
    
    1 test failed:
        test_datetime
    
    Total duration: 26.5 sec
    Total tests: run=972 skipped=8
    Total test files: run=1/1 failed=1
    Result: FAILURE

    Bisected to the 548a11d

  7. added a commit that references this issue on May 29, 2024
  8. added 2 commits that reference this issue on May 29, 2024
  9. ericsnowcurrently commented on May 29, 2024

    @ericsnowcurrently
    Member

    Sorry about the leaks, all. I'll be extra careful from here on out.

  10. added a commit that references this issue on Jul 11, 2024
  11. added 2 commits that reference this issue on Jul 17, 2024
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions