Skip to content

Leak in typeobject.c #75589

Closed
Closed

Description

@skrah
mannequin
BPO 31408
Nosy @methane, @skrah, @ericsnowcurrently
Superseder
  • bpo-31420: Reference leaks introduced by bpo-30860
  • 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 2017-09-12.11:39:13.709>
    created_at = <Date 2017-09-10.16:04:29.183>
    labels = ['interpreter-core', '3.7', 'performance']
    title = 'Leak in typeobject.c'
    updated_at = <Date 2017-09-12.11:39:13.707>
    user = 'https://github.com/skrah'

    bugs.python.org fields:

    activity = <Date 2017-09-12.11:39:13.707>
    actor = 'skrah'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-09-12.11:39:13.709>
    closer = 'skrah'
    components = ['Interpreter Core']
    creation = <Date 2017-09-10.16:04:29.183>
    creator = 'skrah'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31408
    keywords = []
    message_count = 4.0
    messages = ['301812', '301814', '301923', '301950']
    nosy_count = 3.0
    nosy_names = ['methane', 'skrah', 'eric.snow']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '31420'
    type = 'resource usage'
    url = 'https://bugs.python.org/issue31408'
    versions = ['Python 3.7']

    Activity

    1. skrah commented on Sep 10, 2017

      skrahmannequin
      MannequinAuthor

      I traced this valgrind result down to
      2ebc5ce :

      ==23495== 240 (72 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 2,255 of 2,922
      ==23495== at 0x4C2A9A1: malloc (vg_replace_malloc.c:299)
      ==23495== by 0x42C6BC: PyMem_RawMalloc (obmalloc.c:420)
      ==23495== by 0x42C6BC: _PyObject_Alloc (obmalloc.c:975)
      ==23495== by 0x42C6BC: _PyObject_Malloc (obmalloc.c:985)
      ==23495== by 0x448B78: _PyObject_GC_Alloc (gcmodule.c:1629)
      ==23495== by 0x448B78: _PyObject_GC_Malloc (gcmodule.c:1651)
      ==23495== by 0x448B78: _PyObject_GC_New (gcmodule.c:1663)
      ==23495== by 0x4A85B6: new_dict (dictobject.c:584)
      ==23495== by 0x4A85B6: PyDict_New (dictobject.c:624)
      ==23495== by 0x4AC8F0: PyDict_Copy (dictobject.c:2510)
      ==23495== by 0x4D68A7: set_names (typeobject.c:7138)
      ==23495== by 0x4D68A7: type_new (typeobject.c:2756)
      ==23495== by 0x4CAEC4: type_call (typeobject.c:922)
      ==23495== by 0x47344B: _PyObject_FastCallDict (call.c:125)
      ==23495== by 0x5497D2: builtin___build_class__ (bltinmodule.c:165)
      ==23495== by 0x4725AF: _PyMethodDef_RawFastCallKeywords (call.c:653)
      ==23495== by 0x4725AF: _PyCFunction_FastCallKeywords (call.c:726)
      ==23495== by 0x4283E0: call_function (ceval.c:4701)
      ==23495== by 0x4283E0: _PyEval_EvalFrameDefault (ceval.c:3218)
      ==23495== by 0x54D3C6: PyEval_EvalFrameEx (ceval.c:549)
      ==23495== by 0x54D3C6: _PyEval_EvalCodeWithName (ceval.c:4049)

    2. methane commented on Sep 10, 2017

      @methane
      Member

      Maybe, PyDict_ClearFreeList() is not called?

    3. ericsnowcurrently commented on Sep 11, 2017

      @ericsnowcurrently
      Member

      @skrah, could you see if the PR for issue bpo-31420 resolves this? I'm guessing it won't, but you indicated that the two issues might be related. Thanks!

    4. skrah commented on Sep 12, 2017

      skrahmannequin
      MannequinAuthor

      It's fixed, thanks!

    5. 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.7 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions