python / python/cpython

[MSVC][ASAN] Cpython failed to run test_call test_functools tests with ASAN using MSVC on windows

Offen
#135,830 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

OS-windows tests type-bug
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Hi,

Cpython failed to run test_call test_functools tests with ASAN using MSVC on windows, it can be reproduced on 151d1bf commit on main branch. Could you please help look at this issue? Thanks in advance.

Steps to reproduce the behavior:

  1. git clone https://github.com/python/cpython
  2. Open VS2022 x64 CMD & set CL= /fsanitize=address /GS- /wd5072 & set LINK= /InferASanLibs /incremental:no /debug
  3. cd /d C:\gitP\python\cpython\PCBuild
  4. get_externals.bat --clean-only
  5. build -e -p x64 -r --no-tkinter -v "/p:PlatformToolset=v143" "/p:WindowsTargetPlatformVersion=10.0.26100.0"
  6. rt -p x64 -q -x test_asyncio test_distutils test_importlib test_peg_generator test_tools test_socket test_compileall test_int test_sys test_venv test_embed test_urllib2net test_capi test_userdict

ErrorMessage:
For test_call:

  • python.exe -u -W default -bb -E -m test --fast-ci -q test_call --dont-add-python-opts
    Using random seed: 567836749
    0:00:00 Run 1 test in parallel using 1 worker process (timeout: 10 min, worker timeout: 15 min)

    test_varargs_keywords (test.test_call.TestCallingConventionsInstance.test_varargs_keywords) ... ok
    test_varargs_key
    1 test failed again:
    test_call
    == Tests result: FAILURE then FAILURE ==
    10 slowest tests:
    1 re-run test:
    test_call
    1 test failed:
    test_call
    Total duration: 3.7 sec
    Total tests: run=0
    Total test files: run=2/1 failed=1 rerun=1
    Result: FAILURE then FAILURE

For test_functools

  • python.exe -u -W default -bb -E -m test --fast-ci -q test_functools --dont-add-python-opts
    Using random seed: 2525602501
    0:00:00 Run 1 test in parallel using 1 worker process (timeout: 10 min, worker timeout: 15 min)
    test_cache (test.test_functools.TestCacheC.test_cache) ... ok
    ...
    File "C:\gitP\python\linkrepro\test\test_functools.py", line 2088 in fib
    =================================================================
    ==7220==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc04c2ea82 (pc 0x7ffc04c2ea82 bp 0x0083a26041b0 sp 0x0083a2604000 T0)

    SUMMARY: AddressSanitizer: stack-overflow
    == Tests result: FAILURE ==
    10 slowest tests:
    1 test failed:
    test_functools
    0:00:01 Re-running 1 failed tests in verbose mode in subprocesses
    0:00:01 Run 1 test in parallel using 1 worker process (timeout: 10 min, worker timeout: 15 min)
    Re-running test_functools in verbose mode
    test_lru_recursion (test.test_functools.TestLRUC.test_lru_recursion) ... Windows fatal exception: stack overflow
    ...
    File "C:\gitP\python\linkrepro\test\test_functools.py", line 2088 in fib
    =================================================================
    ==2268==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc04ca47f7 (pc 0x7ffc04ca47f7 bp 0x007b59a04320 sp 0x007b59a042a8 T0)

    SUMMARY: AddressSanitizer: stack-overflow
    ==2268==ABORTING
    1 test failed again:
    test_functools
    == Tests result: FAILURE then FAILURE ==
    10 slowest tests:
    1 re-run test:
    test_functools
    1 test failed:
    test_functools
    Total duration: 2.2 sec
    Total tests: run=0
    Total test files: run=2/1 failed=1 rerun=1
    Result: FAILURE then FAILURE

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere die Fehler aus den aufgeführten PCBuild-Befehlen mit der MSVC-ASAN-Konfiguration, beginnend mit test_call und test_functools. Untersuche test/test_functools.py um Zeile 2088 herum sowie die Ausgabe des fehlgeschlagenen Tests, um den Umfang des Stack-Overflow-Verhaltens zu bestimmen. Als erledigt gilt die Aufgabe, wenn die betroffenen Tests unter dieser Konfiguration zuverlässig ohne die gemeldeten ASAN-Fehler bestehen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system, operating-systems, testing-qa
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.