Server crash (nil pointer in collationCompare) when filtering dolt_diff by a text primary key
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by reproducing the setup SQL and the w.to_id <> 'r5' filter against dolt_diff on a text primary key. The nil dereference is in schema.collationCompare, reached from prolly.Range.belowStop and prolly.RangeDiffMaps in the diff iterator, so read how the collation is passed into those range checks. Done means the filter returns a count of 1 without the server exiting, and the uuid and cast-to-text cases still behave the same.
索引モデルが issue の本文から書いたものです。
説明
Doltgres version: 1.5.1
Setup, on a fresh database:
CREATE TABLE objects (id text PRIMARY KEY, body text);
INSERT INTO objects VALUES ('r5', 'a'), ('r6', 'b');
SELECT dolt_commit('-Am', 'base');
UPDATE objects SET body = 'c' WHERE id = 'r6';
Then, with <base> the hash of the commit above:
SELECT count(*) FROM dolt_diff('<base>', 'WORKING', 'objects') AS w WHERE w.to_id <> 'r5';
Expected: one row, with a count of 1.
Actual: the server process exits, and every open session is disconnected. The log shows a nil pointer dereference in schema.collationCompare, reached from prolly.Range.belowStop and prolly.RangeDiffMaps in the diff iterator.
Other shapes on the same table (for the commit-to-commit rows, also run SELECT dolt_commit('-Am', 'head'); after the update):
filter on dolt_diff(...) AS w |
result |
|---|---|
none (LIMIT $1), WORKING, commit to commit, or STAGED |
served |
w.to_id = 'r5', w.to_id = $1, w.from_id = 'r5' |
XX000 recovered panic; the server stays up |
correlated NOT EXISTS (SELECT 1 FROM dolt_diff(...) d WHERE d.to_id = h.id) |
XX000 "DoltgresHandler caught panic: nil pointer dereference" |
w.to_id <> 'r5', WORKING or commit to commit |
server process exits |
w.diff_type <> 'removed' AND w.to_id NOT IN ($1) |
server process exits |
w.to_id::text IS NOT DISTINCT FROM s.to_id::text (correlated) |
served |
dolt_history_objects WHERE id = $1 |
served |
With a uuid primary key, the same <>, = and NOT IN filters are served. Casting the key column to text before comparing avoids the panic.
- 主要言語
- Go
- スター
- 2.2k
- フォーク
- 93
- 平均マージ
- 19時間 38分
- マージ済み PR(30日)
- 132
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dolthub/doltgresql のほかの issue
-
customer issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dolthub/doltgresql#3969 ·
メンテナーはふだん 1 日以内に返信
-
`CREATE TABLE ... TABLESPACE pg_default` fails: TABLESPACE is not yet supported対応中かも @draarivpatel-ui が 1 日前に担当しました。 オープンcustomer issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dolthub/doltgresql#3818 ·
メンテナーはふだん 1 日以内に返信
-
customer issue
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
dolthub/doltgresql#3817 ·
メンテナーはふだん 1 日以内に返信
-
customer issue
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
dolthub/doltgresql#3979 ·
メンテナーはふだん 1 日以内に返信
-
customer issue
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
dolthub/doltgresql#3978 ·
メンテナーはふだん 1 日以内に返信
dolthub/doltgresql の issue をすべて見る
似ている issue
-
good first issue spec
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-telemetry/opentelemetry.io#12846 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hivecommons/hive#19912 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信