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

オープン
#201 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp, github-actions

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
C++
スター
16.4k
フォーク
538
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Snapchat/Valdi のほかの issue

Snapchat/Valdi の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。