Linux: //valdi:test_runtime crashes in gtest's XML writer at exit (all tests pass)

Aperta
#201 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, github-actions

Direzione di ricerca

Start by reading the Linux test step and its comment in tools/ci/run_tests.sh, then compare it with the direct binary invocation in tools/ci/sanitizer_tests.sh. Reproduce with bzl test //valdi:test_runtime --test_output=errors on Linux x86_64 and inspect the static teardown path involving gtest's XML writer and runtime globals. Done when the test passes through bzl test without crashing at exit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/runtime bug

On Linux, bzl test //valdi:test_runtime fails even though every test in it passes. The test binary segfaults during static destruction, in gtest's XML result writer, when it's linked against valdi_standalone_runtime. Only the process teardown crashes.

Where it shows up
  • tools/ci/run_tests.sh runs //valdi:test_runtime on macOS only, for this reason. See the comment above that step.
  • tools/ci/sanitizer_tests.sh builds //valdi:test_runtime and runs the binary directly instead of using bzl test, to avoid the same crash.
Reproduce

On Linux x86_64:

bzl test //valdi:test_runtime --test_output=errors

Expected: the test passes. Actual: all test cases pass, then the binary crashes (SIGSEGV) at exit while gtest writes its XML report. Running the built binary directly, as sanitizer_tests.sh does, avoids the crash.

Notes
  • This looks like a static-destruction order problem between gtest's XML output and globals in the runtime. It isn't a failing test.
  • Until it's fixed, Linux coverage for these tests depends on running the binary directly (as sanitizer_tests.sh does). RFC 0001 (#196) and RFC 0002 (#197) should not rely on bzl test //valdi:test_runtime on Linux.

Part of #6 (Linux support).

Lingua principale
C++
Stelle
16.4k
Fork
538
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Snapchat/Valdi

Tutte le issue di Snapchat/Valdi

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.