[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-03 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +20439 pull_request: https://github.com/python/cpython/pull/21290 ___ Python tracker ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-03 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- Removed message: https://bugs.python.org/msg372915 ___ Python tracker ___ ___ Python-bugs-list

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-03 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- title: Digital India -> SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412 ___ Python tracker ___ ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 74419f0c64959bb8392fcf3659058410423038e1 by Victor Stinner in branch 'master': bpo-41194: Pass module state in Python-ast.c (GH-21284) https://github.com/python/cpython/commit/74419f0c64959bb8392fcf3659058410423038e1 --

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +20433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21284 ___ Python tracker ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the crash using the following script.py: --- import gc; gc.set_threshold(5) import sys old_modules = dict(sys.modules) sys.modules.clear() sys.modules.update(old_modules) import _ast import gc gc.collect() --- And the command: --- ./python

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: If I'm not wrong, this is the commit that introduced the regression. commit ac46eb4ad6662cf6d771b20d8963658b2186c48c (HEAD -> bpo-x) Author: Dino Viehland Date: Wed Sep 11 10:16:34 2019 -0700 bpo-38113: Update the Python-ast.c generator to PEP384

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Change by Arcadiy Ivanov : -- components: +Interpreter Core type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: > old_modules = dict(sys.modules) > sys.modules.clear() > sys.modules.update(old_modules) -- ___ Python tracker ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: That's not an entirely accurate reproducer as the references to the modules are still held in the collection when the sys.modules.clear() is called. -- ___ Python tracker

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: A shorter reproducer; >>> import sys >>> sys.modules.clear() Traceback (most recent call last): File "", line 1, in RuntimeError: lost builtins module >>> import _ast >>> import gc >>> gc.collect() Modules/gcmodule.c:114: gc_decref: Assertion

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: So as soon as I started using CPython 3.9.0b3 with debug, the stack trace changed and the corruption apparently occurs in the GC, probably because the assertion is triggered vs release-style build: Modules/gcmodule.c:114: gc_decref: Assertion

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: To complete this report, this is a regression. This exact code runs perfectly in 2.7, 3.5 - 3.8. This is the PR in Travis: https://travis-ci.org/github/pybuilder/pybuilder/builds/704312142 -- ___ Python tracker

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: My guess is that the issue is related to the sys.modules manipulation, i.e. these parts of the integration test harness: def smoke_test(self, *args): old_argv = list(sys.argv) del sys.argv[:] sys.argv.append(self.build_py)

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: How to reproduce: 1. Clone github.com/pybuilder/pybuilder 2. Checkout https://github.com/pybuilder/pybuilder/pull/724 3. Run `PYTHONWARNINGS=ignore python ./build.py -v -X` The failure occurs in the integration test smoke test in smoke_clean_tests.py

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: Once any of the integration tests run, the integration test environment is created and the test can be run directly from the command line via: '.../pybuilder/target/venv/test/cpython-3.9.0.beta.3/bin/python'

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: No C extensions, working on giving you a reproducer. -- ___ Python tracker ___ ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor
STINNER Victor added the comment: Can you please provide a reproducer? Does PyBuilder use C extensions? -- ___ Python tracker ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: If you aren't able to share some reproducer snippets, would you try a bisect? An interesting commit would be this ac46eb4ad66 to try and check if this crash happens before and after it? -- ___ Python tracker

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: I can say that it is always reproduced, both in Travis environment (Ubuntu) and in Fedora. -- ___ Python tracker ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: I'm right now rerunning the script with debug-level build of CPython and will report as soon as I have more data. Any word on limits for attaching core dump? -- ___ Python tracker

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor
STINNER Victor added the comment: Can you provide a script to reproduce the issue? -- nosy: +vstinner ___ Python tracker ___ ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: @arcivanov what kind of input do you pass to the compile function which leads this crash? -- ___ Python tracker ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: I can't seem to be able to attach a gziped coredump (7MB) -- ___ Python tracker ___ ___

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov
New submission from Arcadiy Ivanov : Built with pyenv on Fedora 32. Discovered while testing PyBuilder for 3.9 compatibility. $ abrt gdb e6ad9db GNU gdb (GDB) Fedora 9.1-5.fc32 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later