classification
Title: 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, arcivanov, dino.viehland, lukasz.langa, vstinner
Priority: Keywords:

Created on 2020-07-09 18:25 by arcivanov, last changed 2020-08-10 13:57 by vstinner. This issue is now closed.

Messages (12)
msg373418 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-07-09 18:25
"Short" reproducer:


repro.py:

```
import sys
from os import getcwd, chdir
from runpy import run_path


def smoke_test(script, *args):
    old_argv = list(sys.argv)
    del sys.argv[:]
    sys.argv.append(script)
    sys.argv.extend(args)

    old_modules = dict(sys.modules)
    old_meta_path = list(sys.meta_path)
    old_cwd = getcwd()

    try:
        return run_path(script, run_name="__main__")
    except SystemExit as e:
        if e.code:
            print("Test did not exit successfully")
    finally:
        del sys.argv[:]
        sys.argv.extend(old_argv)

        sys.modules.clear()
        sys.modules.update(old_modules)

        del sys.meta_path[:]
        sys.meta_path.extend(old_meta_path)
        chdir(old_cwd)


smoke_test("script.py")

smoke_test("script.py")
```

script.py:

```
import sys
import subprocess    
import ast

_PYTHON_INFO_SCRIPT = """import platform, sys, os, sysconfig
_executable = os.path.normcase(os.path.abspath(getattr(sys, "_base_executable", sys.executable)))
_platform = sys.platform
if _platform == "linux2":
    _platform = "linux"
print({
    "_platform": _platform,
    "_os_name": os.name,
    "_executable": (_executable, ),
    "_exec_dir": os.path.normcase(os.path.abspath(os.path.dirname(_executable))),
    "_name": platform.python_implementation(),
    "_type": platform.python_implementation().lower(),
    "_version": tuple(sys.version_info),
    "_is_pypy": "__pypy__" in sys.builtin_module_names,
    "_is_64bit": (getattr(sys, "maxsize", None) or getattr(sys, "maxint")) > 2 ** 32,
    "_versioned_dir_name": "%s-%s" % (platform.python_implementation().lower(), ".".join(str(f) for f in sys.version_info)),
    "_environ": dict(os.environ),
    "_darwin_python_framework": sysconfig.get_config_var("PYTHONFRAMEWORK")
})
"""

result = subprocess.check_output([sys.executable, "-c", _PYTHON_INFO_SCRIPT], universal_newlines=True)
python_info = ast.literal_eval(result)
print(python_info)

```
msg373419 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-07-09 18:26
$ PYTHONWARNINGS=ignore gdb --args /home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python ./repro.py 
GNU gdb (GDB) Fedora 9.1-5.fc32
Copyright (C) 2020 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 "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 /home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python...
(gdb) run
Starting program: /home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python ./repro.py
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.31-2.fc32.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after fork from child process 185113]
{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/jdk', 'SSH_AUTH_SOCK': '/tmp/ssh-2nZCuLIsvvyW/agent.5125', 'SHELL_SESSION_ID': '1fe1a56ee9dd4fac8589a5eebfb3e6b0', 'DEV_HOME': '/home/arcivanov/devhome/current', 'MY_RUBY_HOME': '/home/arcivanov/.rvm/rubies/ruby-2.4.3', 'ANT_HOME': '/home/arcivanov/devhome/current/ant', 'XDM_MANAGED': 'method=classic', 'DESKTOP_SESSION': 'default', 'RBENV_SHELL': 'bash', 'SSH_AGENT_PID': '5854', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/arcivanov/.gtkrc:/home/arcivanov/.config/gtkrc', 'GDK_CORE_DEVICE_EVENTS': '1', 'XCURSOR_SIZE': '32', 'RUBY_VERSION': 'ruby-2.4.3', 'XDG_SEAT': 'seat0', 'PWD': '/home/arcivanov/Documents/src/arcivanov/pybuilder', 'PYENV_VIRTUALENV_INIT': '1', 'LOGNAME': 'arcivanov', 'XDG_SESSION_TYPE': 'x11', 'MODULESHOME': '/usr/share/Modules', 'rvm_version': '1.29.10 (latest)', 'MANPATH': '/home/arcivanov/devhome/current/jdk/man:/home/arcivanov/devhome/current/postgres-xl/share/man:/home/arcivanov/devhome/current/haproxy/share/man:/home/arcivanov/devhome/current/jdk/man:/home/arcivanov/devhome/current/postgres-xl/share/man:/home/arcivanov/devhome/current/haproxy/share/man::', '_': '/usr/bin/gdb', 'XAUTHORITY': '/tmp/xauth-1000-_0', 'SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS': '0', 'WINDOWPATH': '1', 'LINES': '221', 'GTK2_RC_FILES': '/etc/gtk-2.0/gtkrc:/home/arcivanov/.gtkrc-2.0:/home/arcivanov/.gtkrc-2.0-kde4:/home/arcivanov/.config/gtkrc-2.0', 'HOME': '/home/arcivanov', 'SSH_ASKPASS': '/usr/bin/ksshaskpass', 'LANG': 'en_US.UTF-8', 'LS_COLORS': 'rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.webp=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'XDG_CURRENT_DESKTOP': 'KDE', 'KONSOLE_DBUS_SERVICE': ':1.34', 'COLUMNS': '267', 'VIRTUAL_ENV': '/home/arcivanov/.pyenv/versions/3.9-dev-debug/envs/pyb-3.9-dev-d', 'KONSOLE_DBUS_SESSION': '/Sessions/7', 'PROFILEHOME': '', 'M2_HOME': '/home/arcivanov/devhome/current/maven', 'KONSOLE_VERSION': '200401', 'STEAM_FRAME_FORCE_CLOSE': '1', 'KDE_SESSION_UID': '1000', 'rvm_bin_path': '/home/arcivanov/.rvm/bin', 'GEM_PATH': '/home/arcivanov/.rvm/gems/ruby-2.4.3:/home/arcivanov/.rvm/gems/ruby-2.4.3@global', 'GEM_HOME': '/home/arcivanov/.rvm/gems/ruby-2.4.3', 'MODULEPATH_modshare': '/usr/share/modulefiles:1:/usr/share/Modules/modulefiles:1:/etc/modulefiles:1', 'XDG_SESSION_CLASS': 'user', 'TERM': 'xterm-256color', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'USER': 'arcivanov', 'COLORFGBG': '15;0', 'MODULES_RUN_QUARANTINE': 'LD_LIBRARY_PATH', 'KDE_SESSION_VERSION': '5', 'PAM_KWALLET5_LOGIN': '/run/user/1000/kwallet5.socket', 'MAVEN_HOME': '/home/arcivanov/devhome/current/maven', 'LOADEDMODULES': '', 'DISPLAY': ':0', 'SHLVL': '1', 'XDG_VTNR': '1', 'XDG_SESSION_ID': '1', 'XDG_RUNTIME_DIR': '/run/user/1000', 'DM_CONTROL': '/var/run/xdmctl', 'PYENV_ROOT': '/home/arcivanov/.pyenv', 'KDEDIRS': '/usr', 'MAVEN_OPTS': '', 'QT_AUTO_SCREEN_SCALE_FACTOR': '0', 'XCURSOR_THEME': 'Adwaita', 'XDG_DATA_DIRS': '/home/arcivanov/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share', 'KDE_FULL_SESSION': 'true', 'PATH': '/home/arcivanov/.pyenv/versions/3.9-dev-debug/envs/pyb-3.9-dev-d/bin:/home/arcivanov/.pyenv/plugins/pyenv-virtualenv/shims:/home/arcivanov/.pyenv/shims:/home/arcivanov/.pyenv/bin:/home/arcivanov/.rbenv/shims:/home/arcivanov/.rbenv/bin:/home/arcivanov/.rvm/gems/ruby-2.4.3/bin:/home/arcivanov/.rvm/gems/ruby-2.4.3@global/bin:/home/arcivanov/.rvm/rubies/ruby-2.4.3/bin:/home/arcivanov/devhome/current/jdk/bin:/home/arcivanov/devhome/current/ant/bin:/home/arcivanov/devhome/current/maven/bin:/home/arcivanov/.pyenv/plugins/pyenv-virtualenv/shims:/home/arcivanov/.pyenv/shims:/home/arcivanov/.pyenv/bin:/home/arcivanov/.rbenv/shims:/home/arcivanov/.rbenv/bin:/home/arcivanov/devhome/current/jdk/bin:/home/arcivanov/devhome/current/ant/bin:/home/arcivanov/devhome/current/maven/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/home/arcivanov/.rvm/gems/ruby-2.4.3/bin:/home/arcivanov/.rvm/gems/ruby-2.4.3@global/bin:/home/arcivanov/.rvm/rubies/ruby-2.4.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/arcivanov/.rvm/bin:/usr/local/sbin:/usr/sbin', 'MODULEPATH': '/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'PYTHONWARNINGS': 'ignore', 'MAIL': '/var/spool/mail/arcivanov', 'IRBRC': '/home/arcivanov/.rvm/rubies/ruby-2.4.3/.irbrc', 'rvm_path': '/home/arcivanov/.rvm', 'OLDPWD': '/home/arcivanov/Documents/src', 'MODULES_CMD': '/usr/share/Modules/libexec/modulecmd.tcl', 'BASH_FUNC_switchml%%': '() {  typeset swfound=1;\n if [ "${MODULES_USE_COMPAT_VERSION:-0}" = \'1\' ]; then\n typeset swname=\'main\';\n if [ -e /usr/share/Modules/libexec/modulecmd.tcl ]; then\n typeset swfound=0;\n unset MODULES_USE_COMPAT_VERSION;\n fi;\n else\n typeset swname=\'compatibility\';\n if [ -e /usr/share/Modules/libexec/modulecmd-compat ]; then\n typeset swfound=0;\n MODULES_USE_COMPAT_VERSION=1;\n export MODULES_USE_COMPAT_VERSION;\n fi;\n fi;\n if [ $swfound -eq 0 ]; then\n echo "Switching to Modules $swname version";\n source /usr/share/Modules/init/bash;\n else\n echo "Cannot switch to Modules $swname version, command not found";\n return 1;\n fi\n}', 'BASH_FUNC_module%%': '() {  _module_raw "$@" 2>&1\n}', 'BASH_FUNC_scl%%': '() {  if [ "$1" = "load" -o "$1" = "unload" ]; then\n eval "module $@";\n else\n /usr/bin/scl "$@";\n fi\n}', 'BASH_FUNC__module_raw%%': '() {  unset _mlshdbg;\n if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = \'1\' ]; then\n case "$-" in \n *v*x*)\n set +vx;\n _mlshdbg=\'vx\'\n ;;\n *v*)\n set +v;\n _mlshdbg=\'v\'\n ;;\n *x*)\n set +x;\n _mlshdbg=\'x\'\n ;;\n *)\n _mlshdbg=\'\'\n ;;\n esac;\n fi;\n unset _mlre _mlIFS;\n if [ -n "${IFS+x}" ]; then\n _mlIFS=$IFS;\n fi;\n IFS=\' \';\n for _mlv in ${MODULES_RUN_QUARANTINE:-};\n do\n if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then\n if [ -n "`eval \'echo ${\'$_mlv\'+x}\'`" ]; then\n _mlre="${_mlre:-}${_mlv}_modquar=\'`eval \'echo ${\'$_mlv\'}\'`\' ";\n fi;\n _mlrv="MODULES_RUNENV_${_mlv}";\n _mlre="${_mlre:-}${_mlv}=\'`eval \'echo ${\'$_mlrv\':-}\'`\' ";\n fi;\n done;\n if [ -n "${_mlre:-}" ]; then\n eval `eval ${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash \'"$@"\'`;\n else\n eval `/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash "$@"`;\n fi;\n _mlstatus=$?;\n if [ -n "${_mlIFS+x}" ]; then\n IFS=$_mlIFS;\n else\n unset IFS;\n fi;\n unset _mlre _mlv _mlrv _mlIFS;\n if [ -n "${_mlshdbg:-}" ]; then\n set -$_mlshdbg;\n fi;\n unset _mlshdbg;\n return $_mlstatus\n}'}, '_darwin_python_framework': ''}
[Detaching after fork from child process 185114]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000623339 in _Py_IS_TYPE (ob=0x0, type=0x8609e0 <PyType_Type>) at ./Include/object.h:128
128         return ob->ob_type == type;
Missing separate debuginfos, use: dnf debuginfo-install libxcrypt-4.4.16-3.fc32.x86_64
(gdb) 
(gdb) bt
#0  0x0000000000623339 in _Py_IS_TYPE (ob=0x0, type=0x8609e0 <PyType_Type>) at ./Include/object.h:128
#1  0x0000000000623487 in _PyType_CheckExact (op=0x0) at ./Include/object.h:641
#2  0x0000000000628d85 in object_recursive_isinstance (tstate=0x8b19a0, 
    inst="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/jdk', 'SSH_AUTH_SOCK': '/tmp/ssh-2nZCuLIsvvyW/agent.5125', 'SHELL_SESSION_ID': '1fe1a56ee9dd4fac85", cls=0x0) at Objects/abstract.c:2495
#3  0x0000000000628fdc in PyObject_IsInstance (
    inst="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/jdk', 'SSH_AUTH_SOCK': '/tmp/ssh-2nZCuLIsvvyW/agent.5125', 'SHELL_SESSION_ID': '1fe1a56ee9dd4fac85", cls=0x0) at Objects/abstract.c:2551
#4  0x0000000000682420 in PyAST_Check (
    obj="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/jdk', 'SSH_AUTH_SOCK': '/tmp/ssh-2nZCuLIsvvyW/agent.5125', 'SHELL_SESSION_ID': '1fe1a56ee9dd4fac85") at Python/Python-ast.c:10356
#5  0x000000000069c754 in builtin_compile_impl (module=<module at remote 0x7fffeabc3a10>, 
    source="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/jdk', 'SSH_AUTH_SOCK': '/tmp/ssh-2nZCuLIsvvyW/agent.5125', 'SHELL_SESSION_ID': '1fe1a56ee9dd4fac85", filename='<unknown>', mode=0x7fffeabc42f0 "eval", 
    flags=1024, dont_inherit=0, optimize=-1, feature_version=-1) at Python/bltinmodule.c:784
#6  0x000000000069aa72 in builtin_compile (module=<module at remote 0x7fffeabc3a10>, args=0x7fffffff02b0, nargs=4, kwnames=('_feature_version',)) at Python/clinic/bltinmodule.c.h:274
#7  0x0000000000655297 in cfunction_vectorcall_FASTCALL_KEYWORDS (func=<built-in method compile of module object at remote 0x7fffeabc3a10>, args=0x9c8a00, nargsf=9223372036854775812, kwnames=('_feature_version',)) at Objects/methodobject.c:440
#8  0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<built-in method compile of module object at remote 0x7fffeabc3a10>, args=0x9c8a00, nargsf=9223372036854775812, kwnames=('_feature_version',)) at ./Include/cpython/abstract.h:118
#9  0x0000000000509a90 in PyObject_Vectorcall (callable=<built-in method compile of module object at remote 0x7fffeabc3a10>, args=0x9c8a00, nargsf=9223372036854775812, kwnames=('_feature_version',)) at ./Include/cpython/abstract.h:127
#10 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff0518, oparg=5, kwnames=('_feature_version',)) at Python/ceval.c:5044
#11 0x00000000005197ff in _PyEval_EvalFrameDefault (tstate=0x8b19a0, 
    f=Frame 0x9c8850, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 306, in parse (source="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/j...(truncated), throwflag=0)
    at Python/ceval.c:3507
#12 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, 
    f=Frame 0x9c8850, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 306, in parse (source="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/j...(truncated), throwflag=0)
    at ./Include/internal/pycore_ceval.h:40
#13 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffea863ee0>, 
    globals={'__name__': 'ast', '__doc__': '\n    ast\n    ~~~\n\n    The `ast` module helps Python applications to process trees of the Python\n    abstract syntax grammar.  The abstract syntax itself might change with\n    each Python release; this module helps to find out programmatically what\n    the current grammar looks like and allows modifications of it.\n\n    An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as\n    a flag to the `compile()` builtin function or by using the `parse()`\n    function from this module.  The result will be a tree of objects whose\n    classes all inherit from `ast.AST`.\n\n    A modified abstract syntax tree can be compiled into a Python code object\n    using the built-in `compile()` function.\n\n    Additionally various helper functions are provided that make working with\n    the trees simpler.  The main intention of the helper functions and this\n    module in general is to provide an easy to use interface for libraries\n    that work tightly with the pyth...(truncated), locals=0x0, 
    args=0x7fffea8161e8, argcount=1, kwnames=0x7fffea7fc3d8, kwargs=0x7fffea8161f0, kwcount=1, kwstep=1, defs=0x7fffea8ab978, defcount=2, kwdefs={'type_comments': False, 'feature_version': None}, closure=0x0, name='parse', qualname='parse') at Python/ceval.c:4299
#14 0x0000000000431853 in _PyFunction_Vectorcall (func=<function at remote 0x7fffea7cc410>, stack=0x7fffea8161e8, nargsf=9223372036854775809, kwnames=('mode',)) at Objects/call.c:395
#15 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<function at remote 0x7fffea7cc410>, args=0x7fffea8161e8, nargsf=9223372036854775809, kwnames=('mode',)) at ./Include/cpython/abstract.h:118
#16 0x0000000000509a90 in PyObject_Vectorcall (callable=<function at remote 0x7fffea7cc410>, args=0x7fffea8161e8, nargsf=9223372036854775809, kwnames=('mode',)) at ./Include/cpython/abstract.h:127
#17 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff1d38, oparg=2, kwnames=('mode',)) at Python/ceval.c:5044
#18 0x00000000005197ff in _PyEval_EvalFrameDefault (tstate=0x8b19a0, 
    f=Frame 0x7fffea816050, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 62, in literal_eval (node_or_string="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivan...(truncated), throwflag=0)
    at Python/ceval.c:3507
#19 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, 
    f=Frame 0x7fffea816050, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 62, in literal_eval (node_or_string="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivan...(truncated), throwflag=0)
    at ./Include/internal/pycore_ceval.h:40
#20 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffea876930>, 
    globals={'__name__': 'ast', '__doc__': '\n    ast\n    ~~~\n\n    The `ast` module helps Python applications to process trees of the Python\n    abstract syntax grammar.  The abstract syntax itself might change with\n    each Python release; this module helps to find out programmatically what\n    the current grammar looks like and allows modifications of it.\n\n    An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as\n    a flag to the `compile()` builtin function or by using the `parse()`\n    function from this module.  The result will be a tree of objects whose\n    classes all inherit from `ast.AST`.\n\n    A modified abstract syntax tree can be compiled into a Python code object\n    using the built-in `compile()` function.\n\n    Additionally various helper functions are provided that make working with\n    the trees simpler.  The main intention of the helper functions and this\n    module in general is to provide an easy to use interface for libraries\n    that work tightly with the pyth...(truncated), locals=0x0, 
    args=0x7fffea9321c8, argcount=1, kwnames=0x0, kwargs=0x7fffea9321d0, kwcount=0, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='literal_eval', qualname='literal_eval') at Python/ceval.c:4299
#21 0x0000000000431853 in _PyFunction_Vectorcall (func=<function at remote 0x7fffea7f7e10>, stack=0x7fffea9321c8, nargsf=9223372036854775809, kwnames=0x0) at Objects/call.c:395
#22 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<function at remote 0x7fffea7f7e10>, args=0x7fffea9321c8, nargsf=9223372036854775809, kwnames=0x0) at ./Include/cpython/abstract.h:118
#23 0x0000000000509a90 in PyObject_Vectorcall (callable=<function at remote 0x7fffea7f7e10>, args=0x7fffea9321c8, nargsf=9223372036854775809, kwnames=0x0) at ./Include/cpython/abstract.h:127
#24 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff3578, oparg=1, kwnames=0x0) at Python/ceval.c:5044
#25 0x00000000005193a1 in _PyEval_EvalFrameDefault (tstate=0x8b19a0, f=Frame 0x7fffea932050, for file script.py, line 27, in <module> (), throwflag=0) at Python/ceval.c:3459
#26 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, f=Frame 0x7fffea932050, for file script.py, line 27, in <module> (), throwflag=0) at ./Include/internal/pycore_ceval.h:40
#27 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffeaab9450>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), 
    locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), args=0x0, 
    argcount=0, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4299
#28 0x000000000051d051 in _PyEval_EvalCodeWithName (_co=<code at remote 0x7fffeaab9450>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), 
    locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), args=0x0, 
    argcount=0, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4331
#29 0x000000000051d0d9 in PyEval_EvalCodeEx (_co=<code at remote 0x7fffeaab9450>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), 
    locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:4347
#30 0x000000000050bbc0 in PyEval_EvalCode (co=<code at remote 0x7fffeaab9450>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), 
    locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated))
    at Python/ceval.c:809
#31 0x000000000069ce37 in builtin_exec_impl (module=<module at remote 0x7fffeabc3a10>, source=<code at remote 0x7fffeaab9450>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated), 
    locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all': <built-in method all of module object at remote 0x7fffeabc3a10>, 'any': <built-in method any of module object at remote 0x7fffeabc3a10>, 'ascii': <built-in method asci...(truncated))
    at Python/bltinmodule.c:1035
#32 0x000000000069ac76 in builtin_exec (module=<module at remote 0x7fffeabc3a10>, args=0x9b3e60, nargs=2) at Python/clinic/bltinmodule.c.h:396
#33 0x00000000006551f4 in cfunction_vectorcall_FASTCALL (func=<built-in method exec of module object at remote 0x7fffeabc3a10>, args=0x9b3e60, nargsf=9223372036854775810, kwnames=0x0) at Objects/methodobject.c:424
#34 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<built-in method exec of module object at remote 0x7fffeabc3a10>, args=0x9b3e60, nargsf=9223372036854775810, kwnames=0x0) at ./Include/cpython/abstract.h:118
#35 0x0000000000509a90 in PyObject_Vectorcall (callable=<built-in method exec of module object at remote 0x7fffeabc3a10>, args=0x9b3e60, nargsf=9223372036854775810, kwnames=0x0) at ./Include/cpython/abstract.h:127
#36 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff4f18, oparg=2, kwnames=0x0) at Python/ceval.c:5044
#37 0x0000000000519598 in _PyEval_EvalFrameDefault (tstate=0x8b19a0, 
    f=Frame 0x9b3ca0, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 343, in _run_code (code=<code at remote 0x7fffeaab9450>, run_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all'...(truncated), throwflag=0)
    at Python/ceval.c:3490
#38 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, 
    f=Frame 0x9b3ca0, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 343, in _run_code (code=<code at remote 0x7fffeaab9450>, run_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all'...(truncated), throwflag=0)
    at ./Include/internal/pycore_ceval.h:40
#39 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffeaab9790>, 
    globals={'__name__': 'runpy', '__doc__': 'runpy.py - locating and running Python code using the module namespace\n\nProvides support for locating and running Python scripts using the Python\nmodule namespace instead of the native filesystem.\n\nThis allows Python code to play nicely with non-filesystem based PEP 302\nimporters when locating support scripts as well as when importing modules.\n', '__package__': '', '__loader__': <SourceFileLoader(name='runpy', path='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py') at remote 0x7fffeaa980a0>, '__spec__': <ModuleSpec(name='runpy', loader=<...>, origin='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/__pycache__/runpy.cpython-39.pyc', _initializing=False) at remote 0x7fffeaa980f0>, '__file__': '/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py', '__cached__': '/home/arciv...(truncated), locals=0x0, 
    args=0x9b3c18, argcount=7, kwnames=0x0, kwargs=0x9b3c50, kwcount=0, kwstep=1, defs=0x7fffeaaaaed8, defcount=5, kwdefs=0x0, closure=0x0, name='_run_code', qualname='_run_code') at Python/ceval.c:4299
#40 0x0000000000431853 in _PyFunction_Vectorcall (func=<function at remote 0x7fffeab9bd70>, stack=0x9b3c18, nargsf=9223372036854775815, kwnames=0x0) at Objects/call.c:395
#41 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<function at remote 0x7fffeab9bd70>, args=0x9b3c18, nargsf=9223372036854775815, kwnames=0x0) at ./Include/cpython/abstract.h:118
#42 0x0000000000509a90 in PyObject_Vectorcall (callable=<function at remote 0x7fffeab9bd70>, args=0x9b3c18, nargsf=9223372036854775815, kwnames=0x0) at ./Include/cpython/abstract.h:127
#43 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff6738, oparg=7, kwnames=0x0) at Python/ceval.c:5044
#44 0x0000000000519598 in _PyEval_EvalFrameDefault (tstate=0x8b19a0, 
    f=Frame 0x9b3a50, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 353, in _run_module_code (code=<code at remote 0x7fffeaab9450>, init_globals=None, mod_name='__main__', mod_spec=None, pkg_name='', script_name='script.py', fname='script.py', temp_module=<_TempModule(mod_name='__main__', module=<module at remote 0x7fffea7f4f50>, _saved_module=[<module at remote 0x7fffeab12b90>]) at remote 0x7fffea917aa0>, mod_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) a...(truncated), throwflag=0)
    at Python/ceval.c:3490
#45 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, 
    f=Frame 0x9b3a50, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 353, in _run_module_code (code=<code at remote 0x7fffeaab9450>, init_globals=None, mod_name='__main__', mod_spec=None, pkg_name='', script_name='script.py', fname='script.py', temp_module=<_TempModule(mod_name='__main__', module=<module at remote 0x7fffea7f4f50>, _saved_module=[<module at remote 0x7fffeab12b90>]) at remote 0x7fffea917aa0>, mod_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) a...(truncated), throwflag=0)
    at ./Include/internal/pycore_ceval.h:40
#46 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffeaab9860>, 
    globals={'__name__': 'runpy', '__doc__': 'runpy.py - locating and running Python code using the module namespace\n\nProvides support for locating and running Python scripts using the Python\nmodule namespace instead of the native filesystem.\n\nThis allows Python code to play nicely with non-filesystem based PEP 302\nimporters when locating support scripts as well as when importing modules.\n', '__package__': '', '__loader__': <SourceFileLoader(name='runpy', path='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py') at remote 0x7fffeaa980a0>, '__spec__': <ModuleSpec(name='runpy', loader=<...>, origin='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/__pycache__/runpy.cpython-39.pyc', _initializing=False) at remote 0x7fffeaa980f0>, '__file__': '/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py', '__cached__': '/home/arciv...(truncated), locals=0x0, 
    args=0x994310, argcount=3, kwnames=0x7fffeaa98568, kwargs=0x994328, kwcount=2, kwstep=1, defs=0x7fffeaab6928, defcount=5, kwdefs=0x0, closure=0x0, name='_run_module_code', qualname='_run_module_code') at Python/ceval.c:4299
#47 0x0000000000431853 in _PyFunction_Vectorcall (func=<function at remote 0x7fffea8e7af0>, stack=0x994310, nargsf=9223372036854775811, kwnames=('pkg_name', 'script_name')) at Objects/call.c:395
#48 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<function at remote 0x7fffea8e7af0>, args=0x994310, nargsf=9223372036854775811, kwnames=('pkg_name', 'script_name')) at ./Include/cpython/abstract.h:118
#49 0x0000000000509a90 in PyObject_Vectorcall (callable=<function at remote 0x7fffea8e7af0>, args=0x994310, nargsf=9223372036854775811, kwnames=('pkg_name', 'script_name')) at ./Include/cpython/abstract.h:127
#50 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff7f48, oparg=5, kwnames=('pkg_name', 'script_name')) at Python/ceval.c:5044
#51 0x00000000005197ff in _PyEval_EvalFrameDefault (tstate=0x8b19a0, 
    f=Frame 0x994140, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 524, in run_path (path_name='script.py', init_globals=None, run_name='__main__', pkg_name='', importer=None, is_NullImporter=False, code=<code at remote 0x7fffeaab9450>, fname='script.py'), throwflag=0) at Python/ceval.c:3507
#52 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, 
    f=Frame 0x994140, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 524, in run_path (path_name='script.py', init_globals=None, run_name='__main__', pkg_name='', importer=None, is_NullImporter=False, code=<code at remote 0x7fffeaab9450>, fname='script.py'), throwflag=0) at ./Include/internal/pycore_ceval.h:40
#53 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffeaa9c040>, 
    globals={'__name__': 'runpy', '__doc__': 'runpy.py - locating and running Python code using the module namespace\n\nProvides support for locating and running Python scripts using the Python\nmodule namespace instead of the native filesystem.\n\nThis allows Python code to play nicely with non-filesystem based PEP 302\nimporters when locating support scripts as well as when importing modules.\n', '__package__': '', '__loader__': <SourceFileLoader(name='runpy', path='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py') at remote 0x7fffeaa980a0>, '__spec__': <ModuleSpec(name='runpy', loader=<...>, origin='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/__pycache__/runpy.cpython-39.pyc', _initializing=False) at remote 0x7fffeaa980f0>, '__file__': '/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py', '__cached__': '/home/arciv...(truncated), locals=0x0, 
    args=0x969508, argcount=1, kwnames=0x7fffeabcd478, kwargs=0x969510, kwcount=1, kwstep=1, defs=0x7fffeaa98608, defcount=2, kwdefs=0x0, closure=0x0, name='run_path', qualname='run_path') at Python/ceval.c:4299
#54 0x0000000000431853 in _PyFunction_Vectorcall (func=<function at remote 0x7fffea8e7eb0>, stack=0x969508, nargsf=9223372036854775809, kwnames=('run_name',)) at Objects/call.c:395
#55 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<function at remote 0x7fffea8e7eb0>, args=0x969508, nargsf=9223372036854775809, kwnames=('run_name',)) at ./Include/cpython/abstract.h:118
#56 0x0000000000509a90 in PyObject_Vectorcall (callable=<function at remote 0x7fffea8e7eb0>, args=0x969508, nargsf=9223372036854775809, kwnames=('run_name',)) at ./Include/cpython/abstract.h:127
#57 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffff9768, oparg=2, kwnames=('run_name',)) at Python/ceval.c:5044
#58 0x00000000005197ff in _PyEval_EvalFrameDefault (tstate=0x8b19a0, 
    f=Frame 0x969360, for file /home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py, line 17, in smoke_test (script='script.py', args=(), old_argv=['./repro.py'], old_modules={'sys': <module at remote 0x7fffeabba2f0>, 'builtins': <module at remote 0x7fffeabc3a10>, '_frozen_importlib': <module at remote 0x7fffeab60a70>, '_imp': <module at remote 0x7fffeab60a10>, '_thread': <module at remote 0x7fffeab6e3b0>, '_warnings': <module at remote 0x7fffeab6ef50>, '_weakref': <module at remote 0x7fffeab6f350>, '_frozen_importlib_external': <module at remote 0x7fffeab6fcb0>, 'posix': <module at remote 0x7fffeab6fb30>, '_io': <module at remote 0x7fffeab33290>, 'marshal': <module at remote 0x7fffeab3bdd0>, 'time': <module at remote 0x7fffeab47290>, 'zipimport': <module at remote 0x7fffeab3d350>, '_codecs': <module at remote 0x7fffeaaeaa10>, 'codecs': <module at remote 0x7fffeab57710>, 'encodings.aliases': <module at remote 0x7fffeaaea5f0>, 'encodings': <module at remote 0x7fffeab4d830>, 'encodings.utf_8': <module at remo...(truncated), throwflag=0)
    at Python/ceval.c:3507
#59 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, 
    f=Frame 0x969360, for file /home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py, line 17, in smoke_test (script='script.py', args=(), old_argv=['./repro.py'], old_modules={'sys': <module at remote 0x7fffeabba2f0>, 'builtins': <module at remote 0x7fffeabc3a10>, '_frozen_importlib': <module at remote 0x7fffeab60a70>, '_imp': <module at remote 0x7fffeab60a10>, '_thread': <module at remote 0x7fffeab6e3b0>, '_warnings': <module at remote 0x7fffeab6ef50>, '_weakref': <module at remote 0x7fffeab6f350>, '_frozen_importlib_external': <module at remote 0x7fffeab6fcb0>, 'posix': <module at remote 0x7fffeab6fb30>, '_io': <module at remote 0x7fffeab33290>, 'marshal': <module at remote 0x7fffeab3bdd0>, 'time': <module at remote 0x7fffeab47290>, 'zipimport': <module at remote 0x7fffeab3d350>, '_codecs': <module at remote 0x7fffeaaeaa10>, 'codecs': <module at remote 0x7fffeab57710>, 'encodings.aliases': <module at remote 0x7fffeaaea5f0>, 'encodings': <module at remote 0x7fffeab4d830>, 'encodings.utf_8': <module at remo...(truncated), throwflag=0)
    at ./Include/internal/pycore_ceval.h:40
#60 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffeaaa2a00>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals=0x0, args=0x910810, argcount=1, kwnames=0x0, kwargs=0x910818, kwcount=0, kwstep=1, 
    defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='smoke_test', qualname='smoke_test') at Python/ceval.c:4299
#61 0x0000000000431853 in _PyFunction_Vectorcall (func=<function at remote 0x7fffeaaa8190>, stack=0x910810, nargsf=9223372036854775809, kwnames=0x0) at Objects/call.c:395
#62 0x0000000000509a31 in _PyObject_VectorcallTstate (tstate=0x8b19a0, callable=<function at remote 0x7fffeaaa8190>, args=0x910810, nargsf=9223372036854775809, kwnames=0x0) at ./Include/cpython/abstract.h:118
#63 0x0000000000509a90 in PyObject_Vectorcall (callable=<function at remote 0x7fffeaaa8190>, args=0x910810, nargsf=9223372036854775809, kwnames=0x0) at ./Include/cpython/abstract.h:127
#64 0x000000000051ea52 in call_function (tstate=0x8b19a0, pp_stack=0x7fffffffaf98, oparg=1, kwnames=0x0) at Python/ceval.c:5044
#65 0x0000000000519598 in _PyEval_EvalFrameDefault (tstate=0x8b19a0, f=Frame 0x9106a0, for file /home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py, line 35, in <module> (), throwflag=0) at Python/ceval.c:3490
#66 0x0000000000509cde in _PyEval_EvalFrame (tstate=0x8b19a0, f=Frame 0x9106a0, for file /home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py, line 35, in <module> (), throwflag=0) at ./Include/internal/pycore_ceval.h:40
#67 0x000000000051cf4e in _PyEval_EvalCode (tstate=0x8b19a0, _co=<code at remote 0x7fffeaaa2d40>, 
    globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, 
    locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, args=0x0, argcount=0, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, 
    kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4299
--Type <RET> for more, q to quit, c to continue without paging--c
#68 0x000000000051d051 in _PyEval_EvalCodeWithName (_co=<code at remote 0x7fffeaaa2d40>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, args=0x0, argcount=0, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4331
#69 0x000000000051d0d9 in PyEval_EvalCodeEx (_co=<code at remote 0x7fffeaaa2d40>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:4347
#70 0x000000000050bbc0 in PyEval_EvalCode (co=<code at remote 0x7fffeaaa2d40>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}) at Python/ceval.c:809
#71 0x000000000056eaf9 in run_eval_code_obj (tstate=0x8b19a0, co=0x7fffeaaa2d40, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}) at Python/pythonrun.c:1178
#72 0x000000000056ebe2 in run_mod (mod=0x93a0d8, filename='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, flags=0x7fffffffc9a8, arena=0x7fffeaaa7b20) at Python/pythonrun.c:1199
#73 0x000000000056e971 in PyRun_FileExFlags (fp=0x8aebf0, filename_str=0x7fffeaa837e0 "/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py", start=257, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py') at remote 0x7fffeab0abe0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffeabc3a10>, '__file__': '/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py', '__cached__': None, 'sys': <module at remote 0x7fffeabba2f0>, 'getcwd': <built-in method getcwd of module object at remote 0x7fffeab6fb30>, 'chdir': <built-in method chdir of module object at remote 0x7fffeab6fb30>, 'run_path': <function at remote 0x7fffea8e7eb0>, 'smoke_test': <function at remote 0x7fffeaaa8190>}, closeit=1, flags=0x7fffffffc9a8) at Python/pythonrun.c:1116
#74 0x000000000056d447 in PyRun_SimpleFileExFlags (fp=0x8aebf0, filename=0x7fffeaa837e0 "/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py", closeit=1, flags=0x7fffffffc9a8) at Python/pythonrun.c:438
#75 0x000000000056c958 in PyRun_AnyFileExFlags (fp=0x8aebf0, filename=0x7fffeaa837e0 "/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py", closeit=1, flags=0x7fffffffc9a8) at Python/pythonrun.c:87
#76 0x000000000041e6e8 in pymain_run_file (config=0x8b0470, cf=0x7fffffffc9a8) at Modules/main.c:369
#77 0x000000000041ecd8 in pymain_run_python (exitcode=0x7fffffffc9ec) at Modules/main.c:594
#78 0x000000000041edc9 in Py_RunMain () at Modules/main.c:673
#79 0x000000000041ee43 in pymain_main (args=0x7fffffffca50) at Modules/main.c:703
#80 0x000000000041eebd in Py_BytesMain (argc=2, argv=0x7fffffffcb88) at Modules/main.c:727
#81 0x000000000041d786 in main (argc=2, argv=0x7fffffffcb88) at ./Programs/python.c:15
(gdb) py-bt-full
#7 <built-in method compile of module object at remote 0x7fffeabc3a10>
#11 Frame 0x9c8850, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 306, in parse (source="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivanov/devhome/current/j...(truncated)
    lines.append(next_line)
#18 Frame 0x7fffea816050, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 62, in literal_eval (node_or_string="{'_platform': 'linux', '_os_name': 'posix', '_executable': ('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',), '_exec_dir': '/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin', '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), '_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': '56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': '/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': '/home/arcivan...(truncated)
    node_or_string = parse(node_or_string, mode='eval')
#25 Frame 0x7fffea932050, for file script.py, line 27, in <module> ()
    python_info = ast.literal_eval(result)
#33 <built-in method exec of module object at remote 0x7fffeabc3a10>
#37 Frame 0x9b3ca0, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 343, in _run_code (code=<code at remote 0x7fffeaab9450>, run_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) at remote 0x7fffeab6a0f0>, '__build_class__': <built-in method __build_class__ of module object at remote 0x7fffeabc3a10>, '__import__': <built-in method __import__ of module object at remote 0x7fffeabc3a10>, 'abs': <built-in method abs of module object at remote 0x7fffeabc3a10>, 'all'...(truncated)
#44 Frame 0x9b3a50, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 353, in _run_module_code (code=<code at remote 0x7fffeaab9450>, init_globals=None, mod_name='__main__', mod_spec=None, pkg_name='', script_name='script.py', fname='script.py', temp_module=<_TempModule(mod_name='__main__', module=<module at remote 0x7fffea7f4f50>, _saved_module=[<module at remote 0x7fffeab12b90>]) at remote 0x7fffea917aa0>, mod_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': None, '__spec__': None, '__file__': 'script.py', '__cached__': None, '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <type at remote 0x8c35e0>, '__spec__': <ModuleSpec(name='builtins', loader=<type at remote 0x8c35e0>, origin='built-in', loader_state=None, submodule_search_locations=None, _set_fileattr=False, _cached=None) a...(truncated)
#51 Frame 0x994140, for file /home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py, line 524, in run_path (path_name='script.py', init_globals=None, run_name='__main__', pkg_name='', importer=None, is_NullImporter=False, code=<code at remote 0x7fffeaab9450>, fname='script.py')
#58 Frame 0x969360, for file /home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py, line 17, in smoke_test (script='script.py', args=(), old_argv=['./repro.py'], old_modules={'sys': <module at remote 0x7fffeabba2f0>, 'builtins': <module at remote 0x7fffeabc3a10>, '_frozen_importlib': <module at remote 0x7fffeab60a70>, '_imp': <module at remote 0x7fffeab60a10>, '_thread': <module at remote 0x7fffeab6e3b0>, '_warnings': <module at remote 0x7fffeab6ef50>, '_weakref': <module at remote 0x7fffeab6f350>, '_frozen_importlib_external': <module at remote 0x7fffeab6fcb0>, 'posix': <module at remote 0x7fffeab6fb30>, '_io': <module at remote 0x7fffeab33290>, 'marshal': <module at remote 0x7fffeab3bdd0>, 'time': <module at remote 0x7fffeab47290>, 'zipimport': <module at remote 0x7fffeab3d350>, '_codecs': <module at remote 0x7fffeaaeaa10>, 'codecs': <module at remote 0x7fffeab57710>, 'encodings.aliases': <module at remote 0x7fffeaaea5f0>, 'encodings': <module at remote 0x7fffeab4d830>, 'encodings.utf_8': <module at remo...(truncated)
    return run_path(script, run_name="__main__")
#65 Frame 0x9106a0, for file /home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py, line 35, in <module> ()
    smoke_test("script.py")
(gdb) py-bt
Traceback (most recent call first):
  <built-in method compile of module object at remote 0x7fffeabc3a10>
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py", line 306, in parse
    lines.append(next_line)
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py", line 62, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "script.py", line 27, in <module>
    python_info = ast.literal_eval(result)
  <built-in method exec of module object at remote 0x7fffeabc3a10>
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py", line 343, in _run_code
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py", line 353, in _run_module_code
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py", line 524, in run_path
  File "/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py", line 17, in smoke_test
    return run_path(script, run_name="__main__")
  File "/home/arcivanov/Documents/src/arcivanov/pybuilder/./repro.py", line 35, in <module>
    smoke_test("script.py")
(gdb)
msg373420 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-07-09 18:27
This is in the 3.9 branch as of a0a6f1167834c87f12e2eca11dd77143103e7691
msg373456 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-07-10 09:57
Ok, I can reproduce the crash on the 3.9 branch using: ./python repro.py.

The first problem is that astmodule_clear() doesn't reset the initiallized member: add "state->initialized = 0;".

The _ast module is special. Not only it has regular module function which access the module state, it also has 3 functions in C APIs which are called directly:

* PyAST_Check()
* PyAST_mod2obj()
* PyAST_obj2mod()

These functions require to have access to the _ast module. In Python 3.9, I chose to use a global state, as it was done in Python 3.8.

If sys.modules['_ast'] is cleared and then _ast is imported again, _PyState_AddModule() is called to store the new _ast module instance which calls astmodule_clear() on the old module instance.

The problem is that when astmodule_clear() is called, the new instance is already created and so exposes the "old" _ast.AST type.

1) import _ast: call init_types() which creates AST type #1
2) del sys.modules['_ast]
3) import _ast: create a new module which exposes AST type #1
3) import _ast: also clears the old module (_PyState_AddModule()) which calls astmodule_clear()
4) Calling PyAST_Check() calls init_types() which creates AST type #2: PyAST_Check() returns false, since AST type #1 and AST type #2 are different

--

In the master branch, I modified PyAST_Check(), PyAST_mod2obj() and PyAST_obj2mod() to import the _ast module and get the state from the module. The state is not global in master.

For 3.9, I'm not sure what is the best option:

* Backport master changes (not well tested yet, but is it worse than this known crash?)
* Never clear the state: leak references at Python exit.
msg373457 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-07-10 09:58
This bug is a follow-up of bpo-41194: "Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once".
msg373476 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-07-10 18:57
It would be nice to fix this 3.9 regression before 3.9 final.
msg373480 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-07-10 20:56
Yes, indeed, please, because I don't know what I would do for 3.9 if this is not fixed. :D
msg373481 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-07-10 20:59
> If sys.modules['_ast'] is cleared and then _ast is imported again, _PyState_AddModule() is called to store the new _ast module instance which calls astmodule_clear() on the old module instance.

I'm confused about this. In the repro below the sys.modules.clear() is indeed cleared, but references to all modules are retained. 

Where is the garbage collection/module re-initialization coming from? All of the references are live.
msg373482 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-07-10 21:06
Nevermind, `ast`/`_ast` is not pre-loaded by default, so it's in fact getting GC'ed after the first `run_path` is executed.
msg375097 - (view) Author: Arcadiy Ivanov (arcivanov) Date: 2020-08-10 06:00
From what I understand an RC1 is being released for 3.9. This is a gentle reminder that there is no fix for this yet.
msg375108 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-08-10 13:10
> From what I understand an RC1 is being released for 3.9. This is a gentle reminder that there is no fix for this yet.

I wrote PR 21807 to backport my changes from master to 3.9.

My PR fix a crash on 3.9 with the following script:
---
import sys
PyCF_ONLY_AST = 1024
tree = compile("x+y", "filename", "exec", PyCF_ONLY_AST)

import _ast
assert PyCF_ONLY_AST == _ast.PyCF_ONLY_AST

compile(tree, "filename", "exec")
del sys.modules['_ast']

import _ast
compile(tree, "filename", "exec")
---
msg375118 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-08-10 13:57
This bug should be fixed by:

New changeset d2bea2636d5f0c2b196966315790af8e79c7bf82 by Victor Stinner in branch '3.9':
[3.9] bpo-41194: Convert _ast extension to PEP 489 (GH-21807)
https://github.com/python/cpython/commit/d2bea2636d5f0c2b196966315790af8e79c7bf82

I remove the "release blocker" priority.
History
Date User Action Args
2020-08-10 13:57:11vstinnersetstatus: open -> closed
priority: release blocker ->
messages: + msg375118

resolution: fixed
stage: resolved
2020-08-10 13:10:32vstinnersetmessages: + msg375108
2020-08-10 06:15:00xtreaksetnosy: + lukasz.langa
2020-08-10 06:00:28arcivanovsetmessages: + msg375097
2020-07-10 21:06:28arcivanovsetmessages: + msg373482
2020-07-10 20:59:10arcivanovsetmessages: + msg373481
2020-07-10 20:56:39arcivanovsetmessages: + msg373480
2020-07-10 19:17:28BTaskayasetnosy: + BTaskaya
2020-07-10 18:57:32vstinnersetpriority: normal -> release blocker

messages: + msg373476
2020-07-10 10:38:18vstinnersetnosy: + dino.viehland
2020-07-10 09:58:02vstinnersetmessages: + msg373457
2020-07-10 09:57:24vstinnersetmessages: + msg373456
2020-07-09 20:14:31arcivanovsetnosy: + vstinner
2020-07-09 18:27:21arcivanovsetmessages: + msg373420
2020-07-09 18:26:31arcivanovsetmessages: + msg373419
2020-07-09 18:25:50arcivanovcreate