main · last commit
1 month ago ·
2npkec0r
tarantool-etcd-7e5 Malformed Txn compare enum leaves a dangling box transaction — poisons the JSON keep-alive connection
Lined Up
bd update tarantool-etcd-7e5 --claim
bd close tarantool-etcd-7e5
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-07-17T13:19:07Z |
| Updated | 2026-07-17T13:19:07Z |
app/etcd/txn.lua:280 runs evaluate_compares AFTER box.begin() (:278) but OUTSIDE the pcall/rollback guard (:285-289). pb.json.decode accepts an out-of-range Compare.target (e.g. {"target":99}), which raises unknown_compare_target (txn.lua:70) and leaves box.is_in_txn() == true.
The JSON gateway serves keep-alive requests on ONE per-connection fiber (lib/http1/server.lua:495), so every subsequent request on that connection then fails with INTERNAL 'Operation is not permitted when there is an active transaction'. One malformed request kills the connection permanently. gRPC self-heals (fresh fiber per request, lib/nghttp2/grpc.lua:551).
etcd returns InvalidArgument and the connection is unaffected.
This is the one finding in the sweep that was reproduced in-process rather than argued from reading. Tarantool EE config.etcd clients ride this gateway.
Validate compare target/result enums before box.begin, or move evaluate_compares + revision.next inside the pcall-with-rollback. Belt and braces: a box.rollback safety net in the wire adapters so no handler can ever leak a transaction into the next request on a pooled fiber.
POST /v3/kv/txn with {"target":99} returns InvalidArgument and the SAME connection serves the next request normally; box.is_in_txn() is false after the error; a Lua test pins it; the adapter-level rollback net is covered.
No outgoing dependencies.
Nothing depends on this issue.
| id | tarantool-etcd-7e5 |
| content_hash | 75e8819d6b6368f1f582dd0fddb210ddbab88c3d8434376cf22eda69ab8aa33b |
| title | Malformed Txn compare enum leaves a dangling box transaction — poisons the JSON keep-alive connection |
| description | app/etcd/txn.lua:280 runs evaluate_compares AFTER box.begin() (:278) but OUTSIDE the pcall/rollback guard (:285-289). pb.json.decode accepts an out-of-range Compare.target (e.g. {"target":99}), which raises unknown_compare_target (txn.lua:70) and leaves box.is_in_txn() == true. The JSON gateway serves keep-alive requests on ONE per-connection fiber (lib/http1/server.lua:495), so every subsequent request on that connection then fails with INTERNAL 'Operation is not permitted when there is an active transaction'. One malformed request kills the connection permanently. gRPC self-heals (fresh fiber per request, lib/nghttp2/grpc.lua:551). etcd returns InvalidArgument and the connection is unaffected. This is the one finding in the sweep that was reproduced in-process rather than argued from reading. Tarantool EE config.etcd clients ride this gateway. |
| design | Validate compare target/result enums before box.begin, or move evaluate_compares + revision.next inside the pcall-with-rollback. Belt and braces: a box.rollback safety net in the wire adapters so no handler can ever leak a transaction into the next request on a pooled fiber. |
| acceptance_criteria | POST /v3/kv/txn with {"target":99} returns InvalidArgument and the SAME connection serves the next request normally; box.is_in_txn() is false after the error; a Lua test pins it; the adapter-level rollback net is covered. |
| notes | |
| status | open |
| priority | 1 |
| issue_type | bug |
| assignee | NULL |
| estimated_minutes | NULL |
| created_at | 2026-07-17T13:19:07Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-07-17T13:19:07Z |
| closed_at | NULL |
| closed_by_session | |
| external_ref | NULL |
| spec_id | |
| compaction_level | 0 |
| compacted_at | NULL |
| compacted_at_commit | NULL |
| original_size | NULL |
| sender | |
| ephemeral | 0 |
| wisp_type | |
| pinned | 0 |
| is_template | 0 |
| mol_type | |
| work_type | |
| source_system | |
| metadata | <binary> |
| source_repo | |
| close_reason | |
| event_kind | |
| actor | |
| target | |
| payload | |
| await_type | |
| await_id | |
| timeout_ns | 0 |
| waiters | |
| hook_bead | |
| role_bead | |
| agent_state | |
| last_activity | NULL |
| role_type | |
| rig | |
| due_at | NULL |
| defer_until | NULL |
| no_history | 0 |
| started_at | NULL |
| is_blocked | 0 |
| issue_id | tarantool-etcd-7e5 |
| label | etcd-changelog-sweep |
| id | 019f703b-1119-7c21-a5ce-8442c5bf65ed |
| issue_id | tarantool-etcd-7e5 |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-07-17T16:19:07Z |
| id | 019f703b-111a-74e9-ad45-68cf03762445 |
| issue_id | tarantool-etcd-7e5 |
| event_type | label_added |
| actor | Eugene Blikh |
| old_value | NULL |
| new_value | NULL |
| comment | Added label: etcd-changelog-sweep |
| created_at | 2026-07-17T16:19:07Z |
No comments.