hnswlib
hnswlib copied to clipboard
deadlock when add duplicated labels by multithreads
Hello, everyone,
Some labels are duplicate in our case. We add labels by multi-thread. I found thread may lock the same mutex two times in one addPoint which lead to deadlock. The first time to lock mutex at here: https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswalg.h#L1021 The second time to lock the same mutex at here: https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswalg.h#L185
Hi @cdjingit! Thank you for reporting it. Do you have an example to reproduce it?
@cdjingit I reproduced the issue. I will take a look at this.