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

test_gdb failures on os x 10.9.2 #65462

Closed
samkimbrel mannequin opened this issue Apr 16, 2014 · 9 comments
Closed

test_gdb failures on os x 10.9.2 #65462

samkimbrel mannequin opened this issue Apr 16, 2014 · 9 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes easy tests Tests in the Lib/test dir

Comments

@samkimbrel
Copy link
Mannequin

samkimbrel mannequin commented Apr 16, 2014

BPO 21263
Nosy @ronaldoussoren, @ned-deily, @davidmalcolm, @lysnikolaou, @vyas45
PRs
  • bpo-21263: Skip test_gdb when python has been compiled with LLVM clang #10318
  • [3.7] bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318) #10325
  • [3.6] bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318) #10326
  • 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 2018-11-04.21:42:41.641>
    created_at = <Date 2014-04-16.18:50:57.406>
    labels = ['easy', '3.8', '3.7', 'tests']
    title = 'test_gdb failures on os x 10.9.2'
    updated_at = <Date 2018-11-04.21:42:41.638>
    user = 'https://bugs.python.org/samkimbrel'

    bugs.python.org fields:

    activity = <Date 2018-11-04.21:42:41.638>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-11-04.21:42:41.641>
    closer = 'ned.deily'
    components = ['Tests']
    creation = <Date 2014-04-16.18:50:57.406>
    creator = 'sam.kimbrel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 21263
    keywords = ['patch', 'easy']
    message_count = 9.0
    messages = ['216551', '216577', '259761', '304402', '328767', '329259', '329261', '329262', '329263']
    nosy_count = 7.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'dmalcolm', 'sam.kimbrel', 'Bryce Miller', 'lys.nikolaou', 'vyas45']
    pr_nums = ['10318', '10325', '10326']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue21263'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @samkimbrel
    Copy link
    Mannequin Author

    samkimbrel mannequin commented Apr 16, 2014

    test_gdb fails under OS X 10.9.2 and gdb 7.6.1 (built with homebrew on Apple LLVM version 5.1 (clang-503.0.40)):

    FAIL: test_pycfunction (test.test_gdb.PyBtTests)
    Verify that "py-bt" displays invocations of PyCFunction instances
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Users/skimbrel/cpython/Lib/test/test_gdb.py", line 789, in test_pycfunction
        cmds_after_breakpoint=['bt', 'py-bt'],
      File "/Users/skimbrel/cpython/Lib/test/test_gdb.py", line 182, in get_stack_trace
        self.assertEqual(unexpected_errlines, [])
    AssertionError: Lists differ: ['No stack.', "Python Exception <class 'gd[109 chars]ed.'] != []

    First list contains 3 additional elements.
    First extra element 0:
    No stack.

    + []
    - ['No stack.',
    -  "Python Exception <class 'gdb.error'> No frame is currently selected.: ",
    -  'Error occurred in Python command: No frame is currently selected.']

    ======================================================================
    FAIL: test_threads (test.test_gdb.PyBtTests)
    Verify that "py-bt" indicates threads that are waiting for the GIL
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Users/skimbrel/cpython/Lib/test/test_gdb.py", line 736, in test_threads
        self.assertIn('Waiting for the GIL', gdb_output)
    AssertionError: 'Waiting for the GIL' not found in 'Breakpoint 1 at 0x1001c78f0: file Python/bltinmodule.c, line 991.\n[New Thread 0x170b of process 41733]\n[New Thread 0x1803 of process 41733]\n[New Thread 0x1903 of process 41733]\n[New Thread 0x1a03 of process 41733]\n\nBreakpoint 1, builtin_id (self=<module at remote 0x100603358>, v=42) at Python/bltinmodule.c:991\n991\t    return PyLong_FromVoidPtr(v);\n\nThread 5 (Thread 0x1a03 of process 41733):\nTraceback (most recent call first):\n\nThread 4 (Thread 0x1903 of process 41733):\nTraceback (most recent call first):\n\nThread 3 (Thread 0x1803 of process 41733):\nTraceback (most recent call first):\n\nThread 2 (Thread 0x170b of process 41733):\nTraceback (most recent call first):\n\nThread 1 (Thread 0x1503 of process 41733):\nTraceback (most recent call first):\n  File "<string>", line 18, in <module>\n'

    Ran 45 tests in 19.277s

    FAILED (failures=2)

    @samkimbrel samkimbrel mannequin added OS-mac tests Tests in the Lib/test dir labels Apr 16, 2014
    @ned-deily
    Copy link
    Member

    Since Apple no longer ships gdb or GNU gcc as part of Xcode and since lldb is the native debugger for clang/LLVM, this test is usually skipped on OS X these days unless you go to the trouble of explicitly installing gdb. Does anyone know if python support works when using gdb with clang?

    @ned-deily
    Copy link
    Member

    See also duplicate bpo-25992. Unless someone has a better idea, I suggest we just disable test_gdb on OS X or, somewhat more precisely, when Python has been compiled with LLVM clang.

    @ned-deily ned-deily added the easy label Feb 7, 2016
    @vyas45
    Copy link
    Mannequin

    vyas45 mannequin commented Oct 14, 2017

    Hi ! I am willing to take a look into this. I am pretty new to the community and would appreciate some pointers relating to the issue which can give me a head-start to resolving it.

    Thanks in advance !

    @lysnikolaou
    Copy link
    Contributor

    I am trying to create a PR for this and was thinking of somehow updating test.support, in order for someone to be able to find out what compiler was used to build python. Would that make sense?

    Also, in case this is indeed something we'd like in test.support, what would be the correct sysconfig variables to read, in order to find that out?

    @ned-deily
    Copy link
    Member

    New changeset 59668aa by Ned Deily (Lysandros Nikolaou) in branch 'master':
    bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318)
    59668aa

    @ned-deily
    Copy link
    Member

    New changeset 96fb350 by Ned Deily (Miss Islington (bot)) in branch '3.7':
    bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318) (GH-10325)
    96fb350

    @ned-deily
    Copy link
    Member

    New changeset f574ce7 by Ned Deily (Miss Islington (bot)) in branch '3.6':
    bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318) (GH-10326)
    f574ce7

    @ned-deily
    Copy link
    Member

    Thanks, everyone! Fixed for 3.8.0, 3.7.2, and 3.6.8.

    @ned-deily ned-deily added 3.7 (EOL) end of life 3.8 only security fixes labels Nov 4, 2018
    @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 3.8 only security fixes easy tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants