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

classification
Title: test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x
Type: Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, eric.snow, erlendaasland, nanjekyejoannah, vstinner
Priority: normal Keywords:

Created on 2021-05-21 10:48 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg394103 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-21 10:48
AMD64 Arch Linux Asan 3.x:
https://buildbot.python.org/all/#/builders/582/builds/157

See also:

* bpo-37224: [subinterpreters] test__xxsubinterpreters fails randomly 
* bpo-44100: test__xxsubinterpreters: test_one() fails in AMD64 Fedora Stable 3.x: "Fatal Python error: Py_EndInterpreter: thread still has a frame" 

0:37:59 load avg: 1.07 Re-running test__xxsubinterpreters in verbose mode
(...)
test_from_sibling (test.test__xxsubinterpreters.DestroyTests) ... ok
test_main (test.test__xxsubinterpreters.DestroyTests) ... ok
test_one (test.test__xxsubinterpreters.DestroyTests) ... ok
=================================================================
==16132==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x608000783694 at pc 0x7f20abecb577 bp 0x7fff392627b0 sp 0x7fff392627a0
READ of size 1 at 0x608000783694 thread T0
    #0 0x7f20abecb576 in _PyFrame_IsExecuting Include/cpython/frameobject.h:53
    #1 0x7f20abecb576 in _is_running /buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:1842
    #2 0x7f20abecb576 in interp_is_running /buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:2255
    #3 0x55a7ff1daa4f in cfunction_call Objects/methodobject.c:539
    (...)
    #194 0x55a7fed361f4 in Py_BytesMain Modules/main.c:720

0x608000783694 is located 12 bytes to the left of 96-byte region [0x6080007836a0,0x608000783700)
allocated by thread T0 here:
    #0 0x7f20b27b2459 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55a7ff035572 in _PyObject_GC_Alloc Modules/gcmodule.c:2250
    (...)
    #8 0x55a7ff24eedd in builtin___build_class__ Python/bltinmodule.c:225
    (...)
    #17 0x55a7fef8dd90 in exec_code_in_module Python/import.c:771
    (...)
    #20 0x55a7fefc33f6 in init_importlib Python/pylifecycle.c:141
    #21 0x55a7fefc33f6 in pycore_interp_init Python/pylifecycle.c:811
    #22 0x55a7fefccf03 in new_interpreter Python/pylifecycle.c:1916
    #23 0x55a7fefccf03 in _Py_NewInterpreter Python/pylifecycle.c:1946
    #24 0x7f20abec613c in interp_create /buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:2022
    (...)

(...)
make: *** [Makefile:1255: buildbottest] Error 1
msg402354 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-21 20:06
On the latest build 564, there is no more error:

0:17:51 load avg: 2.50 [169/421] test__xxsubinterpreters passed
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88369
2021-09-21 20:06:38vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg402354

stage: resolved
2021-05-22 13:36:26corona10setnosy: + corona10
2021-05-21 14:33:58erlendaaslandsetnosy: + erlendaasland
2021-05-21 10:48:37vstinnercreate