TiFlash v8.5.8: SIGSEGV in Block::cloneEmptyColumns while flushing a ColumnFileInMemory

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

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

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

評価

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

調査の方向性

Start with dbms/src/Core/Block.cpp around line 373 and trace how Block slots are created or mutated before ColumnFileInMemory::readDataForFlush calls cloneEmptyColumns(). Instrument the slot’s column and type pointers along that path to find where both become unset. Done means identifying the creation or mutation path that produces the invalid slot; the issue provides no standalone reproducer or named test.

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

説明

contribution

TiFlash crashed while flushing a Region on a production cluster. The application signal log reported a read from a null address. The service manager restarted TiFlash after the crash.

Environment: TiFlash v8.5.8, engine Git hash 3abdec8bff315647a056e6bf910abd4b59af2011, Linux x86-64.

Crash stack (caller → callee, selected frames):

TiFlashObserver::pre_exec_admin
  → TryFlushData
  → KVStore::tryFlushRegionData
  → KVStore::forceFlushRegionDataImpl
  → Segment::flushCache
  → DeltaValueSpace::flush
  → MemTableSet::buildFlushTask
  → ColumnFileInMemory::readDataForFlush
  → Block::cloneEmptyColumns() const

Evidence from the faulting thread: The application stack and core identify the same instruction offset, tiflash+0x782ea24. GDB resolved it to Block::cloneEmptyColumns() const+244, at dbms/src/Core/Block.cpp:373. The relevant source expression is:

columns[i] = data[i].column ? data[i].column->cloneEmpty() : data[i].type->createColumn();

In the disassembly, the null check on column took the fallback branch. That branch loaded type into %rsi. At the faulting instruction, mov (%rsi),%rax, %rsi was zero. The loop index was 8. This indicates that both pointers read from this in-memory Block slot were null. The crash occurred before the virtual call to createColumn().

Diagnostic limits: The core was truncated. GDB warned of a possible executable mismatch, and the TiFlash executable had no build ID. The faulting instruction offset agrees with the application stack, but the core did not retain enough accessible memory to inspect the slot independently or recover the Region ID. We do not know how the Block reached this state.

Reproduction: Observed in production. We do not have a standalone reproducer.

Is there a known issue in this version that can leave a ColumnFileInMemory Block slot with both column and type unset? Which creation or mutation path would you instrument to identify when the slot first enters this state?

主要言語
C++
スター
1k
フォーク
428
平均マージ
2日 7時間
マージ済み PR(30日)
100

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

pingcap/tiflash のほかの issue

pingcap/tiflash の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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