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

Tkinter: memory leak in splitlines() and split() #75856

Closed
serhiy-storchaka opened this issue Oct 3, 2017 · 7 comments
Closed

Tkinter: memory leak in splitlines() and split() #75856

serhiy-storchaka opened this issue Oct 3, 2017 · 7 comments
Assignees
Labels
3.7 (EOL) end of life performance Performance or resource usage topic-tkinter

Comments

@serhiy-storchaka
Copy link
Member

BPO 31675
Nosy @vstinner, @serhiy-storchaka
PRs
  • bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() #3866
  • [3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) #3874
  • [2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) #3876
  • Dependencies
  • bpo-31673: Fix the name of Tkinter's adderrorinfo method
  • 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/serhiy-storchaka'
    closed_at = <Date 2017-10-04.19:02:26.560>
    created_at = <Date 2017-10-03.12:04:23.288>
    labels = ['3.7', 'expert-tkinter', 'performance']
    title = 'Tkinter: memory leak in splitlines() and split()'
    updated_at = <Date 2017-10-04.19:02:26.559>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-10-04.19:02:26.559>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2017-10-04.19:02:26.560>
    closer = 'serhiy.storchaka'
    components = ['Tkinter']
    creation = <Date 2017-10-03.12:04:23.288>
    creator = 'serhiy.storchaka'
    dependencies = ['31673']
    files = []
    hgrepos = []
    issue_num = 31675
    keywords = ['patch']
    message_count = 7.0
    messages = ['303599', '303602', '303604', '303611', '303643', '303648', '303726']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'serhiy.storchaka']
    pr_nums = ['3866', '3874', '3876']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue31675'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    There is a memory leak in Tkinter's methods splitlines() and split() when pass a string larger than 2 GiB (when encoded to UTF-8).

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life topic-tkinter performance Performance or resource usage labels Oct 3, 2017
    @serhiy-storchaka serhiy-storchaka self-assigned this Oct 3, 2017
    @vstinner
    Copy link
    Member

    vstinner commented Oct 3, 2017

    Which function? Do you mean split() and splitlist() methods of tkapp? C functions _tkinter_tkapp_split() and _tkinter_tkapp_splitlist().

    Do you know how to reproduce the memory leak?

    @serhiy-storchaka
    Copy link
    Member Author

    Just run the bigmem tests with ulimit (after fixing bpo-31673).

    (ulimit -v 4350000; ./python -m test -vuall -M4G test_tcl)
    

    @vstinner
    Copy link
    Member

    vstinner commented Oct 3, 2017

    Oh, Python splitlist() doesn't seem to be documented.

    Tcl SplitList documentation: https://www.tcl.tk/man/tcl/TclLib/SplitList.htm

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 27c623c by Serhiy Storchaka in branch 'master':
    bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (bpo-3866)
    27c623c

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset a65b242 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
    [3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (bpo-3874)
    a65b242

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 328b5d0 by Serhiy Storchaka in branch '2.7':
    [2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (bpo-3876)
    328b5d0

    @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.7 (EOL) end of life performance Performance or resource usage topic-tkinter
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants