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

python-gdb.py must be updated for the new Python 3.6 compact dict #72210

Closed
vstinner opened this issue Sep 8, 2016 · 15 comments
Closed

python-gdb.py must be updated for the new Python 3.6 compact dict #72210

vstinner opened this issue Sep 8, 2016 · 15 comments
Assignees

Comments

@vstinner
Copy link
Member

vstinner commented Sep 8, 2016

BPO 28023
Nosy @jcea, @vstinner, @ned-deily, @methane
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • dict_gdb.patch
  • dict_gdb2.patch
  • 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 2016-11-22.14:53:15.985>
    created_at = <Date 2016-09-08.16:25:40.238>
    labels = ['3.7', 'release-blocker']
    title = 'python-gdb.py must be updated for the new Python 3.6 compact dict'
    updated_at = <Date 2017-05-17.17:34:55.171>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-05-17.17:34:55.171>
    actor = 'jcea'
    assignee = 'methane'
    closed = True
    closed_date = <Date 2016-11-22.14:53:15.985>
    closer = 'vstinner'
    components = ['Demos and Tools']
    creation = <Date 2016-09-08.16:25:40.238>
    creator = 'vstinner'
    dependencies = []
    files = ['44959', '45589']
    hgrepos = []
    issue_num = 28023
    keywords = ['patch', 'needs review']
    message_count = 15.0
    messages = ['275058', '275064', '278028', '278295', '280739', '281346', '281359', '281453', '281460', '281462', '281464', '281471', '281474', '281478', '281488']
    nosy_count = 5.0
    nosy_names = ['jcea', 'vstinner', 'ned.deily', 'methane', 'python-dev']
    pr_nums = ['552']
    priority = 'release blocker'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28023'
    versions = ['Python 3.6', 'Python 3.7']

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 8, 2016

    The issue bpo-27350 changed the design of Python dictionaries to make them compact. python-gdb.py must be updated for the new structure of Python dict.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 8, 2016

    New changeset 0bd618fe0639 by Victor Stinner in branch 'default':
    Implement compact dict
    https://hg.python.org/cpython/rev/0bd618fe0639

    @methane
    Copy link
    Member

    methane commented Oct 4, 2016

    I've fixed dict support of python-gdb.py.

    But I found py-bt and py-bt-full are broken. They doesn't show builtin method.
    I think it's because FASTCALL. But I'm not sure.
    I just skip the test for py-bt in attached patch.

    @methane methane self-assigned this Oct 4, 2016
    @methane
    Copy link
    Member

    methane commented Oct 8, 2016

    Could someone review this before 3.6b2?
    Without this patch, python-gdb.py causes many RuntimeError.

    @methane
    Copy link
    Member

    methane commented Nov 14, 2016

    @Haypo, would you review this patch?

    @methane methane added the 3.7 (EOL) end of life label Nov 14, 2016
    @methane
    Copy link
    Member

    methane commented Nov 21, 2016

    ping

    @vstinner
    Copy link
    Member Author

    I reviewed dict_gdb.patch.

    @vstinner
    Copy link
    Member Author

    dict_gdb2.patch LGTM. Can you please follow Ned's instructions to get this change merged into 3.6 final? python-gdb.py is an important tool and it's completly broken. The patch cannot make python-gdb.py worse :-D (More seriously, it fixes python-gdb.py.)

    @methane
    Copy link
    Member

    methane commented Nov 22, 2016

    https://mail.python.org/pipermail/python-committers/2016-November/004065.html

    The 3.6 branch in the cpython repo is now available again but, as noted, *only* for reviewed release critical fixes appropriate for the 3.6.0 final and for final 3.6.0 doc updates!

    So now I think I can commit this for now.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 22, 2016

    New changeset 4f6fb9e47f6b by INADA Naoki in branch '3.6':
    Issue bpo-28023: Fix python-gdb.py didn't support new dict implementation
    https://hg.python.org/cpython/rev/4f6fb9e47f6b

    New changeset c51045920410 by INADA Naoki in branch 'default':
    Issue bpo-28023: Fix python-gdb.py didn't support new dict implementation
    https://hg.python.org/cpython/rev/c51045920410

    @methane methane closed this as completed Nov 22, 2016
    @vstinner
    Copy link
    Member Author

    test_gdb failed on a lot of buildbots. Examples:

    Extract of the Gentoo non-debug:

    (...)
    GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
    (...)
    ======================================================================
    FAIL: test_NULL_ob_type (test.test_gdb.PrettyPrintTests)
    Ensure that a PyObject* with NULL ob_type is handled gracefully
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/buildbot/buildarea/3.6.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 490, in test_NULL_ob_type
        'set v->ob_type=0')
      File "/buildbot/buildarea/3.6.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 461, in assertSane
        cmds_after_breakpoint=cmds_after_breakpoint)
      File "/buildbot/buildarea/3.6.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 240, in get_gdb_repr
        import_site=import_site)
      File "/buildbot/buildarea/3.6.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 218, in get_stack_trace
        self.assertEqual(unexpected_errlines, [])
    AssertionError: Lists differ: ["Python Exception <class 'gdb.error'> Can[663 chars].: "] != []

    First list contains 10 additional elements.
    First extra element 0:
    "Python Exception <class 'gdb.error'> Cannot convert value to int.: "

    Diff is 745 characters long. Set self.maxDiff to None to see it.

    @vstinner vstinner reopened this Nov 22, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 22, 2016

    New changeset 9b974f988c95 by Victor Stinner in branch '3.6':
    Issue bpo-28023: Fix python-gdb.py on old GDB versions
    https://hg.python.org/cpython/rev/9b974f988c95

    @methane
    Copy link
    Member

    methane commented Nov 22, 2016

    Thanks a lot!

    I hope I can run test on multiple environment before merge,
    after we move to Github.

    @vstinner
    Copy link
    Member Author

    Ah nice, it seems like test_gdb pass again.

    @vstinner
    Copy link
    Member Author

    Thanks Naoki for the fix ;-) gdb scripts are a little bit weird sometimes, and the API has subtle changes in each minor GDB release :-/

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants