Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gc.collect prints debug stats incorrectly #82171

Closed
chivay mannequin opened this issue Aug 30, 2019 · 5 comments
Closed

gc.collect prints debug stats incorrectly #82171

chivay mannequin opened this issue Aug 30, 2019 · 5 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@chivay
Copy link
Mannequin

chivay mannequin commented Aug 30, 2019

BPO 37990
Nosy @ned-deily, @methane, @chivay
PRs
  • bpo-37990: fix gc stats #15626
  • [3.8] bpo-37990: fix gc stats (GH-15626) #15627
  • 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 = 'https://github.com/methane'
    closed_at = <Date 2019-08-31.01:53:18.110>
    created_at = <Date 2019-08-30.21:22:40.527>
    labels = ['interpreter-core', 'type-bug', '3.8', '3.9']
    title = 'gc.collect prints debug stats incorrectly'
    updated_at = <Date 2019-08-31.01:53:18.109>
    user = 'https://github.com/chivay'

    bugs.python.org fields:

    activity = <Date 2019-08-31.01:53:18.109>
    actor = 'methane'
    assignee = 'methane'
    closed = True
    closed_date = <Date 2019-08-31.01:53:18.110>
    closer = 'methane'
    components = ['Interpreter Core']
    creation = <Date 2019-08-30.21:22:40.527>
    creator = 'chivay'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37990
    keywords = ['patch', '3.8regression']
    message_count = 5.0
    messages = ['350890', '350892', '350900', '350905', '350906']
    nosy_count = 3.0
    nosy_names = ['ned.deily', 'methane', 'chivay']
    pr_nums = ['15626', '15627']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37990'
    versions = ['Python 3.8', 'Python 3.9']

    @chivay
    Copy link
    Mannequin Author

    chivay mannequin commented Aug 30, 2019

    Example:

    Python 3.9.0a0 (heads/master:39d87b5471, Aug 30 2019, 23:19:13) 
    [GCC 9.1.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gc
    >>> gc.set_debug(gc.DEBUG_STATS)
    >>> gc.collect()
    gc: collecting generation 2...
    gc: objects in each generation: 589 4120 0
    gc: objects in permanent generation: 0
    gc: done, 0 unreachable, 0 uncollectable, %.4fs elapsed
    0

    @chivay chivay mannequin added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Aug 30, 2019
    @ned-deily
    Copy link
    Member

    Thanks for the report. It looks like this regression was introduced by the changes for bpo-37729.

    @ned-deily ned-deily added the 3.8 only security fixes label Aug 30, 2019
    @methane
    Copy link
    Member

    methane commented Aug 31, 2019

    New changeset 013e52f by Inada Naoki in branch 'master':
    bpo-37990: fix gc stats (GH-15626)
    013e52f

    @methane
    Copy link
    Member

    methane commented Aug 31, 2019

    New changeset 97a31c7 by Inada Naoki in branch '3.8':
    [3.8] bpo-37990: fix gc stats (GH-15626)
    97a31c7

    @methane
    Copy link
    Member

    methane commented Aug 31, 2019

    Thank you for finding it!

    My eyes were too focused on portability issue of "%zd"...

    @methane methane closed this as completed Aug 31, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants