Skip to content

Index DDL overflows the 2 MiB tokio worker stack (silent SIGSEGV) #312

Description

@EnRaiha

Summary

DDL/index pipeline call chains can overflow the 2 MiB tokio worker stack,
killing the node with a silent SIGSEGV: CREATE VECTOR INDEX / CREATE SORTED INDEX on a fresh node drops the connection ("server closed the
connection unexpectedly"), and several inproc tests abort with
"tokio-rt-worker has overflowed its stack".

Evidence

Expected

Either raise the tokio worker stack size for index DDL / executor tasks,
or flatten the deep synchronous planning→dispatch→execution chain.

Related: #303 (same family exposed as ABRT in inproc sorted_index tests)

Reproduction

  1. cargo build -p nodedb (any recent main; reproduced on dd2ed01 and the PR feat(sql): evaluate sequence accessors in constant contexts and kv projections #307 branch pre-fix).
  2. Start the node with an empty data dir (ephemeral ports, NODEDB_DATA_PLANE_CORES=2).
  3. Connect via psql and run:
CREATE COLLECTION vc TYPE document;
CREATE VECTOR INDEX idx ON vc (embedding) METRIC cosine DIM 3;
-- or: CREATE SORTED INDEX sidx ON vc (embedding DESC) KEY embedding;

Observed: the connection drops (server closed the connection unexpectedly);
dmesg shows tokio-rt-worker[…]: segfault … error 6 in nodedb. With
RUST_MIN_STACK=64M the same statements succeed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:sqlParser, planner, SQL semanticspriority:P1Fix in the current milestonesev:2-highMajor functionality broken; no acceptable workaroundstatus:confirmedReproduced by a maintainertype:bugA defect — broken, incorrect, or lost data

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions