microsoft / microsoft/SPTAG

SaveIndex failed (Segmentation Fault) after Delete.

Open
#78 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
5k
Forks
622
Avg merge
8h 37m
Merged PRs (30d)
5

Description

Describe the bug
When I test SPTAG in python by your python test code. I find when I delete some data from Index, SaveIndex always get segmentation fault.

This is Delete and Save code:

def testDelete(index, x, out):
   i = SPTAG.AnnIndex.Load(index)
   ret = i.Delete(x.tobytes(), x.shape[0])
   print (ret)
   print("Del finished...................")
   i.Save(out)

SPTAG_save_err
After save tree.bin finished, segmentation fault.
Thanks for your favor.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Python test code's Delete-then-Save sequence on a loaded SPTAG index, watching the point after tree.bin is written where the segmentation fault occurs. Trace the Delete and Save entry points and verify that the sequence completes without a crash, ideally with a regression test for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.