Skip to content

test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks #82331

Closed

Description

@vstinner
BPO 38150
Nosy @vstinner, @matrixise, @miss-islington, @eduardo-elizondo
PRs
  • bpo-38150 Fix refleak in the finalizer of a _testcapimodule type #16115
  • [3.8] bpo-38150 Fix refleak in the finalizer of a _testcapimodule type (GH-16115) #16118
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-09-13.17:16:28.678>
    created_at = <Date 2019-09-13.09:15:22.434>
    labels = ['3.8', 'tests', '3.9']
    title = 'test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks'
    updated_at = <Date 2019-09-13.17:16:28.678>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-09-13.17:16:28.678>
    actor = 'matrixise'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-13.17:16:28.678>
    closer = 'matrixise'
    components = ['Tests']
    creation = <Date 2019-09-13.09:15:22.434>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38150
    keywords = ['patch']
    message_count = 9.0
    messages = ['352249', '352343', '352346', '352347', '352350', '352354', '352364', '352371', '352374']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'matrixise', 'miss-islington', 'eelizondo']
    pr_nums = ['16115', '16118']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38150'
    versions = ['Python 3.8', 'Python 3.9']

    Activity

    1. vstinner commented on Sep 13, 2019

      @vstinner
      MemberAuthor

      vstinner@apu$ ./python -m test test_capi -R 3:3 -m test.test_capi.CAPITest.test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once
      Run tests sequentially
      0:00:00 load avg: 0.57 [1/1] test_capi
      beginning 6 repetitions
      123456
      ......
      test_capi leaked [2, 2, 2] references, sum=6
      test_capi failed

      == Tests result: FAILURE ==

      1 test failed:
      test_capi

      Total duration: 153 ms
      Tests result: FAILURE

      Note: Can't we find a shorter test name please?

    2. added
      3.8 (EOL)
      3.9 (EOL)
      tests
      on Sep 13, 2019
    3. vstinner commented on Sep 13, 2019

      @vstinner
      MemberAuthor

      The new test was added by:

      commit ff023ed
      Author: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
      Date: Wed Sep 11 05:17:13 2019 -0400

      bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323)
      
    4. eduardo-elizondo commented on Sep 13, 2019

      eduardo-elizondomannequin
      Mannequin

      On it.

      Also, I thought that the PR build bots already ran refleak tests by default? Do you know why this it's not integrated to the PR flow?

    5. vstinner commented on Sep 13, 2019

      @vstinner
      MemberAuthor

      Also, I thought that the PR build bots already ran refleak tests by default? Do you know why this it's not integrated to the PR flow?

      Checking for refleak takes between 2 and 6 hours. We would like to keep our pre-commit CI fast enough (less than 30 minutes).

    6. matrixise commented on Sep 13, 2019

      @matrixise
      Member

      Eddie,

      For the next time, when you change something in the C part, you could run the tests with this command:

      ./python -m test test_capi -R 3:3

    7. eduardo-elizondo commented on Sep 13, 2019

      eduardo-elizondomannequin
      Mannequin

      Checking for refleak takes between 2 and 6 hours.

      Ouch! Makes sense then.

      We could potentially add a pre-merge job that only runs once the merge starts to get executed. Anyways, that's a conversation for another time :-)

      ---

      Thanks Stephane I'm very aware of that, I just thought that the build bots did that automatically at PR time. I rather have those drive the signal and letting my slow machine run for hours! Anyways, I'll just have to slightly change my workflow now

    8. miss-islington commented on Sep 13, 2019

      @miss-islington
      Contributor

      New changeset a67ac2f by Miss Islington (bot) (Eddie Elizondo) in branch 'master':
      bpo-38150 Fix refleak in the finalizer of a _testcapimodule type (GH-16115)
      a67ac2f

    9. matrixise commented on Sep 13, 2019

      @matrixise
      Member

      New changeset 53ff2ca by Stéphane Wirtel in branch '3.8':
      [3.8] bpo-38150: Fix refleak in the finalizer of a _testcapimodule type (GH-16115) (GH-16118)
      53ff2ca

    10. matrixise commented on Sep 13, 2019

      @matrixise
      Member

      Thank you, I close this issue.

    11. transferred this issue fromon Apr 10, 2022
    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

      3.8 (EOL)3.9 (EOL)tests

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions