NVIDIA / NVIDIA/cuvs

Lucene: cuvsCagraSearch returned 0 (Reason=cudaErrorInvalidValue:invalid argument)

Open
#2,449 11 comments 0 reactions 1 assignee View on GitHub

@imotov is already working on this.

Since Aug 17, 2026.

bug Lucene non-breaking
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

Issue:

[ERROR] com.nvidia.cuvs.lucene.TestCuVSRandomizedVectorSearch.testVectorSearch -- Time elapsed: 0.157 s <<< ERROR!
java.lang.RuntimeException: 
cuvsCagraSearch returned 0[CUDA error encountered at: file=/home/narang/code/cuvs/cpp/src/neighbors/detail/cagra/search_single_cta_kernel-inl.cuh line=2207: call='cudaPeekAtLastError()', Reason=cudaErrorInvalidValue:invalid argument
Obtained 8 stack frames
NVIDIA/cuvs-lucene#1 in /home/narang/code/cuvs/cpp/build/c/libcuvs_c.so: raft::cuda_error::cuda_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) +0x6e [0x77096bf4f90e]
NVIDIA/cuvs-lucene#2 in /home/narang/code/cuvs/cpp/build/libcuvs.so(+0x1897edf) [0x77088f297edf]
NVIDIA/cuvs-lucene#3 in /home/narang/code/cuvs/cpp/build/libcuvs.so: cuvs::neighbors::cagra::detail::single_cta_search::search<float, unsigned int, float, cuvs::neighbors::filtering::none_sample_filter, unsigned int, unsigned int>::operator()(raft::resources const&, cuda::std::__4::mdspan<unsigned int const, cuda::std::__4::extents<long, 18446744073709551615ul, 18446744073709551615ul>, cuda::std::__4::layout_right, raft::host_device_accessor<cuda::std::__4::default_accessor<unsigned int const>, (raft::memory_type)2> >, std::optional<cuda::std::__4::mdspan<unsigned int const, cuda::std::__4::extents<long, 18446744073709551615ul>, cuda::std::__4::layout_right, raft::host_device_accessor<cuda::std::__4::default_accessor<unsigned int const>, (raft::memory_type)2> > >, unsigned int*, float*, float const*, unsigned int, unsigned int const*, unsigned int*, unsigned int, cuvs::neighbors::filtering::none_sample_filter) +0x16f [0x77088f2df0bf]
NVIDIA/cuvs-lucene#4 in /home/narang/code/cuvs/cpp/build/libcuvs.so(+0x18cc812) [0x77088f2cc812]
NVIDIA/cuvs-lucene#5 in /home/narang/code/cuvs/cpp/build/libcuvs.so: void cuvs::neighbors::cagra::search<float, unsigned int, unsigned int>(raft::resources const&, cuvs::neighbors::cagra::search_params const&, cuvs::neighbors::cagra::index<float, unsigned int> const&, cuda::std::__4::mdspan<float const, cuda::std::__4::extents<long, 18446744073709551615ul, 18446744073709551615ul>, cuda::std::__4::layout_right, raft::host_device_accessor<cuda::std::__4::default_accessor<float const>, (raft::memory_type)2> >, cuda::std::__4::mdspan<unsigned int, cuda::std::__4::extents<long, 18446744073709551615ul, 18446744073709551615ul>, cuda::std::__4::layout_right, raft::host_device_accessor<cuda::std::__4::default_accessor<unsigned int>, (raft::memory_type)2> >, cuda::std::__4::mdspan<float, cuda::std::__4::extents<long, 18446744073709551615ul, 18446744073709551615ul>, cuda::std::__4::layout_right, raft::host_device_accessor<cuda::std::__4::default_accessor<float>, (raft::memory_type)2> >, cuvs::neighbors::filtering::base_filter const&) +0x3e5 [0x77088f2dbe15]
NVIDIA/cuvs-lucene#6 in /home/narang/code/cuvs/cpp/build/c/libcuvs_c.so(+0xab40b) [0x77096bf8040b]
NVIDIA/cuvs-lucene#7 in /home/narang/code/cuvs/cpp/build/c/libcuvs_c.so: cuvsCagraSearch +0x51 [0x77096bf817b1]
NVIDIA/cuvs-lucene#8 in [0x7709983cf2e2]
]
	at __randomizedtesting.SeedInfo.seed([55C8B265D329C693:C1C1A0838FF56B00]:0)
	at com.nvidia.cuvs.internal.common.Util.checkCuVSError(Util.java:87)
	at com.nvidia.cuvs.internal.CagraIndexImpl.search(CagraIndexImpl.java:309)
	at com.nvidia.cuvs.lucene.CuVS2510GPUVectorsReader.search(CuVS2510GPUVectorsReader.java:453)
.
.
.

To reproduce this issue do:

mvn clean test -Dtest=TestCuVSRandomizedVectorSearch#testVectorSearch -Dtests.seed=55C8B265D329C693

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.