python / python/cpython

test_tracemalloc: test_tracemalloc_track_race() crashs on GHA iOS CI

Ouverte
#150,485 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

interpreter-core OS-android OS-ios tests type-crash
Langage dominant
Python
Étoiles
77.2k
Forks
35.9k
Métriques de merge des PR
Métriques de PR en attente

Description

Crash report

iOS: https://github.com/python/cpython/actions/runs/26457870719/job/77897032289?pr=150441

This issue is likely the same as issue gh-143143, but I'm not 100% sure so I created a separated issue.

    0:11:19 load avg: 2.79 [435/505] test_tracemalloc
  Fatal Python error: Segmentation fault
  
  Current thread 0x0000000322193000 (most recent call first):
  
  Thread 0x0000000321187000 (most recent call first):
  
  Thread 0x000000032017b000 (most recent call first):
  
  (...)
  
  Thread 0x00000003100bb000 (most recent call first):
  
  <freed thread state>
  
  Current thread's C stack trace (most recent call first):
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at _Py_DumpStack+0x44 [0x102407804]
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at faulthandler_fatal_error+0x264 [0x10241e4a0]
    Binary file "/usr/lib/system/libsystem_platform.dylib", at _sigtramp+0x34 [0x100a6f7e0]
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at PyGILState_Ensure+0xf8 [0x1023eab50]
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at PyGILState_Ensure+0xf8 [0x1023eab50]
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at tracemalloc_alloc+0xa8 [0x1024097a4]
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at PyGILState_Ensure+0x58 [0x1023eaab0]
    Binary file "/Users/runner/work/cpython/cpython/cross-build/iOS-testbed.1779809388208/DerivedData/Build/Products/Debug-iphonesimulator/Python.framework/Python", at PyTraceMalloc_Track+0x34 [0x1024088ec]
    Binary file "/Users/runner/Library/Developer/CoreSimulator/Devices/D3F1CE55-196D-4DC8-9D1F-6D2D3AB3D118/data/Containers/Bundle/Application/130788EC-7B24-4534-8FF0-89C57EC65B80/iOSTestbed.app/Frameworks/_testcapi.framework/_testcapi", at tracemalloc_track_race_thread+0x20 [0x106f251b0]
    (...)
  
  Extension modules: _testcapi, _testinternalcapi, _testlimitedcapi, _testmultiphase, _testbuffer, _ctypes_test, xxsubtype, _testsinglephase_basic_wrapper, _testsinglephase_basic_copy, _testsinglephase_with_reinit, _testsinglephase_with_state, _test_non_isolated, _test_shared_gil_only, _test_no_multiple_interpreter_slot, _testsinglephase (total: 15)
  
  Restarting after unexpected exit, crash, or test timeout in -[TestbedTests testPython]; summary will include totals from previous launches.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par test_tracemalloc_track_race() et reproduisez le crash du job iOS GitHub Actions lié. Comparez l’échec avec l’issue gh-143143 et examinez les frames de pile signalées PyGILState_Ensure, tracemalloc_alloc et PyTraceMalloc_Track. C’est terminé lorsque la race condition ne provoque plus de crash du testbed iOS et que test_tracemalloc passe.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github-actions, ios, python
Domaine
ci-cd, operating-systems, testing-qa
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.