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 fails on AMD64 FreeBSD Shared 3.x: ptrace: Operation not permitted
Type: Stage: resolved
Components: Tests Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: koobs, vstinner
Priority: normal Keywords:

Created on 2020-03-11 11:56 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg363910 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-03-11 11:56
https://buildbot.python.org/all/#/builders/152/builds/384

Example:

======================================================================
FAIL: test_pycfunction (test.test_gdb.PyBtTests) [_testcapi.MethClass().meth_fastcall_keywords]
Verify that "py-bt" displays invocations of PyCFunction instances
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_gdb.py", line 896, in test_pycfunction
    self.assertIn(f'<built-in method {func_name}', gdb_output)
AssertionError: '<built-in method meth_fastcall_keywords' not found in 'Breakpoint 1 (meth_fastcall_keywords) pending.\nUnable to locate python frame\n'

Stderr:
Function "meth_varargs" not defined.
warning: Could not trace the inferior process.
warning: ptrace: Operation not permitted
During startup program exited with code 127.
No stack.
Function "meth_varargs" not defined.
warning: Could not trace the inferior process.
warning: ptrace: Operation not permitted
During startup program exited with code 127.
No stack.
(...)
Function "meth_fastcall_keywords" not defined.
warning: Could not trace the inferior process.
warning: ptrace: Operation not permitted
During startup program exited with code 127.
No stack.
msg363911 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-03-11 11:57
Same error on 3.7 and 3.8.

AMD64 FreeBSD Shared 3.7:
https://buildbot.python.org/all/#/builders/218/builds/91
msg364064 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2020-03-13 01:54
Testing with security.bsd.unprivileged_proc_debug=1
msg366907 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-21 01:09
AMD64 FreeBSD Shared 3.x is green again, I close the issue.
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84114
2020-04-21 01:09:18vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg366907

stage: resolved
2020-03-13 01:54:39koobssetmessages: + msg364064
2020-03-11 11:57:58vstinnersetversions: + Python 3.7, Python 3.8
2020-03-11 11:57:55vstinnersetmessages: + msg363911
2020-03-11 11:56:43vstinnercreate