-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
gh-140193: Forward port test_exec_set_nomemory_hang from 3.13 #140187
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
base: main
Are you sure you want to change the base?
gh-140193: Forward port test_exec_set_nomemory_hang from 3.13 #140187
Conversation
Signed-off-by: yihong0618 <[email protected]>
Can you make an issue for that change please? |
of course Done |
Signed-off-by: yihong0618 <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but let's run buildbots before merging this.
🤖 New build scheduled with the buildbot fleet by @ZeroIntensity for commit 3f31156 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F140187%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
2000 is too long for windows... |
Can you figure out which number will get the |
will do it tomorrow~ good night. |
will be 60 times for 59 times [hyi@rocky cpython]$ gdb ./python
GNU gdb (Rocky Linux) 14.2-3.el9
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./python...
warning: File "/home/hyi/cpython/python-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/hyi/cpython/python-gdb.py
line to your configuration file "/home/hyi/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/hyi/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) b ceval.c:913 if $has_import_traceback()
Breakpoint 1 at 0x6ae4dc: file Python/ceval.c, line 913.
(gdb) set args ttt.py
(gdb) run
Starting program: /home/hyi/cpython/python ttt.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, _PyEval_EvalFrameDefault (tstate=0xaf5020 <_PyRuntime+299056>, frame=0xfffff7cf5020, throwflag=0) at Python/ceval.c:913
913 PyObject *lasti = PyLong_FromLong(frame_lasti);
(gdb) p frame_lasti
$1 = 933 for 60 times
for gdb script python
import gdb
class has_import_traceback(gdb.Function):
"""Return 1 if 'import traceback' appears in py-bt output, else 0."""
def __init__(self):
super().__init__("has_import_traceback")
def invoke(self):
try:
out = gdb.execute("py-bt", to_string=True)
except gdb.error:
return gdb.Value(0)
return gdb.Value(1 if "import traceback" in out else 0)
has_import_traceback()
end |
Signed-off-by: yihong0618 <[email protected]>
as discuss in #140103 (comment)
chore the test from branch 3.13 and need backport to 3.14
since main and 3.14 do not have the issue only test(so change the comments)
cc @ZeroIntensity