This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_gdb failures on os x 10.9.2
Type: Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Bryce Miller, dmalcolm, lys.nikolaou, ned.deily, ronaldoussoren, sam.kimbrel, vyas45
Priority: normal Keywords: easy, patch

Created on 2014-04-16 18:50 by sam.kimbrel, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10318 merged lys.nikolaou, 2018-11-04 14:09
PR 10325 merged miss-islington, 2018-11-04 21:21
PR 10326 merged miss-islington, 2018-11-04 21:24
Messages (9)
msg216551 - (view) Author: Sam Kimbrel (sam.kimbrel) * Date: 2014-04-16 18:50
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)
msg216577 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-04-16 20:08
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?
msg259761 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-02-07 04:06
See also duplicate Issue25992.  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.
msg304402 - (view) Author: Aniket Vyas (vyas45) * Date: 2017-10-14 21:04
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 !
msg328767 - (view) Author: Lysandros Nikolaou (lys.nikolaou) * (Python committer) Date: 2018-10-28 23:01
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?
msg329259 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-11-04 21:21
New changeset 59668aa8b7f174b59304eab833c1c1181886c3c6 by Ned Deily (Lysandros Nikolaou) in branch 'master':
bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318)
https://github.com/python/cpython/commit/59668aa8b7f174b59304eab833c1c1181886c3c6
msg329261 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-11-04 21:40
New changeset 96fb350bfd2c9b66d7804ae27ea8c4adbfabad5b 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)
https://github.com/python/cpython/commit/96fb350bfd2c9b66d7804ae27ea8c4adbfabad5b
msg329262 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-11-04 21:40
New changeset f574ce79729ecb01f1f5b3e1a34c8aa7480b79e8 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)
https://github.com/python/cpython/commit/f574ce79729ecb01f1f5b3e1a34c8aa7480b79e8
msg329263 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-11-04 21:42
Thanks, everyone! Fixed for 3.8.0, 3.7.2, and 3.6.8.
History
Date User Action Args
2022-04-11 14:58:02adminsetgithub: 65462
2018-11-04 21:42:41ned.deilysetstatus: open -> closed
versions: + Python 3.7, Python 3.8, - Python 2.7, Python 3.5
messages: + msg329263

resolution: fixed
stage: patch review -> resolved
2018-11-04 21:40:28ned.deilysetmessages: + msg329262
2018-11-04 21:40:05ned.deilysetmessages: + msg329261
2018-11-04 21:24:03miss-islingtonsetpull_requests: + pull_request9629
2018-11-04 21:21:48miss-islingtonsetpull_requests: + pull_request9628
2018-11-04 21:21:30ned.deilysetmessages: + msg329259
2018-11-04 14:09:11lys.nikolaousetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request9619
2018-10-28 23:01:11lys.nikolaousetnosy: + lys.nikolaou
messages: + msg328767
2017-10-14 21:04:17vyas45setnosy: + vyas45
messages: + msg304402
2016-02-07 04:07:05ned.deilysetkeywords: + easy
2016-02-07 04:06:03ned.deilysetversions: + Python 2.7, Python 3.6, - Python 3.4
nosy: + Bryce Miller

messages: + msg259761

stage: needs patch
2016-02-07 04:02:48ned.deilylinkissue25992 superseder
2014-04-16 20:08:54ned.deilysetcomponents: - macOS
2014-04-16 20:08:34ned.deilysetassignee: ronaldoussoren ->

messages: + msg216577
nosy: + dmalcolm, ned.deily
2014-04-16 18:50:57sam.kimbrelcreate