From 8136ffe8d4cf500df2dbd06a9d3bf847b43cf311 Mon Sep 17 00:00:00 2001 From: "A.Shakhmatov" Date: Mon, 10 Aug 2026 18:21:14 +0300 Subject: [PATCH] plan: drop segfaults when dispatched in-process Found while writing the positional-refusal tests and not caused by them -- it reproduces at 3c5eee2 with that work stashed. One insert followed by one drop against a TestDb engine terminates with SIGSEGV and no stack trace, while 25 insert/update/distinct/drop cycles over the wire are clean, so what differs is the in-process caller rather than the command. Worth more than it looks: D1's architecture is "in-process server now, library + C API later", and this is that path. `drop` has no unit test in the tree at all, which is why it went unseen. --- PLAN.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PLAN.md b/PLAN.md index 081d6c2..684928c 100644 --- a/PLAN.md +++ b/PLAN.md @@ -1045,6 +1045,19 @@ has to be its own commit with its own re-recorded scorecard. `$out`/`$merge` durability semantics, whether the expression evaluator is shared with M3's pipeline updates, and whether `allowDiskUse` has to stop being a lie. +- **`drop` segfaults when dispatched in-process** — found while writing the + positional-refusal tests, unrelated to them, and **reproduces at `3c5eee2` + with the change stashed**, so it is not caused by that work. A single + `insert` followed by a single `drop` against a `TestDb` engine terminates + with SIGSEGV and no stack trace; dropping a collection that never existed is + fine. The wire path is clean — 25 insert / refused-update / distinct / drop + cycles against a live server on `:27020` all passed — so what differs is the + in-process caller, not the command. That matters more than it looks: D1's + whole architecture is "in-process server now, library + C API later", and + this is the embedding path. **`drop` has no unit test at all** — the only + `parse_fake_msg("drop", ...)` calls in the tree were the scratch ones written + to find this — which is why it went unseen. Needs its own commit: reproduce + it in a committed test first, then fix. - **M3 update operators** — open. `distinct` landed first because it was a whole missing command with no dependencies, and measuring it turned up three things worth keeping, none of which are `distinct`'s to fix: