yahoojapan / NGT

Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data
Apache License 2.0
1.26k stars 115 forks source link

Segmentation fault while building index on NGT-QG #170

Open abhishekukmeesho opened 1 month ago

abhishekukmeesho commented 1 month ago

Hi, I was trying to build a NGT-QG index on top of an ANNG index. The qbg create-qg <<index_path>> works fine. But when I run the qbg build-qg <<index_path>>, it leads to segmentation fault. I tried to capture the backtrace via GDB and this was the output:

root@mac1:/mnt/disks/disk3/index# gdb /usr/local/bin/qbg
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/qbg...
(No debugging symbols found in /usr/local/bin/qbg)

(gdb) run build_qg <<index_path>>
.
.
.
Thread 1 "qbg" received signal SIGSEGV, Segmentation fault.
0x00007ffff7d44a41 in NGTQG::QuantizedGraphRepository::construct(NGT::GraphRepository&, NGTQ::Index&, unsigned long) () from /usr/local/lib/libngt.so.2

Any help is appreciated, TIA.

masajiro commented 1 month ago

If you provide me with the ANNG index, I'll take a look at it for you.

abhishekukmeesho commented 1 month ago

If you provide me with the ANNG index, I'll take a look at it for you.

My ANNG index is quite large ( ~70G). So I'm not sure how to share it.

masajiro commented 1 month ago

Can't you generate a small index that can reproduce the segmentation fault?