Skip to content

Add Python regression test for #866 (SIGSEGV re-executing parameterized write via implicit cache) - #869

Merged
adsharma merged 1 commit into
mainfrom
regression/issue-866-regression-test
Aug 31, 2026
Merged

Add Python regression test for #866 (SIGSEGV re-executing parameterized write via implicit cache)#869
adsharma merged 1 commit into
mainfrom
regression/issue-866-regression-test

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Summary

Root cause analysis

The reported QUERY_VECTOR_INDEX / ARRAY_COSINE_SIMILARITY SIGSEGV is not a vector-extension bug. On 0.20.0, re-executing a parameterized write query string takes the cached-physical-plan fast path (ClientContext::executeNoLock -> PhysicalPlan::prepareForReuse() -> ResultCollector::prepareForReuse() -> FactorizedTable::clear()). A write statement's root ResultCollector has an empty result schema, and the FactorizedTable constructor skips allocating flatTupleBlockCollection / inMemOverflowBuffer entirely for empty schemas, so clear() unconditionally dereferenced null (crash at 0x8).

Evidence gathered while reproducing:

  • macOS crash report from the issue's exact script: EXC_BAD_ACCESS at 0x8 in lbug::processor::FactorizedTable::clear() under ClientContext::executeWithParams.
  • On the 0.20.0 wheel, a script containing only the repeated parameterized CREATEs segfaults; the identical vector flow (CREATE_VECTOR_INDEX + QUERY_VECTOR_INDEX + ARRAY_COSINE_SIMILARITY) with no parameterized queries runs cleanly.
  • On current main (with the empty-schema guard in FactorizedTable::clear() added in d09008e, Bug: SIGSEGV re-executing a parameterized write query string (0.20.0 regression) #862), the issue's exact script and the new test pass.

Verification

Relates to #866. No engine code changes needed (already fixed by d09008e for #862).

@adsharma
adsharma force-pushed the regression/issue-866-regression-test branch from 53d42d1 to 2f369be Compare August 31, 2026 03:56
@adsharma
adsharma merged commit 8dfe6e4 into main Aug 31, 2026
3 checks passed
@adsharma
adsharma deleted the regression/issue-866-regression-test branch August 31, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant