Skip to content

Vector similarity index: Fix uncaught exception during serialization/deserialization - #87803

Merged
azat merged 2 commits into
ClickHouse:masterfrom
azat:usearch-uncaught-exception-fix
Sep 29, 2025
Merged

azat merged 2 commits into
ClickHouse:masterfrom
azat:usearch-uncaught-exception-fix

Conversation

@azat

@azat azat commented Sep 29, 2025 •

Copy link
Copy Markdown
Member

Found on CI 1:

    ./ci/tmp/build/./src/Common/SignalHandlers.cpp:0: terminate_handler() @ 0x00000000163e9be6
    ./ci/tmp/build/./contrib/llvm-project/libcxxabi/src/cxa_handlers.cpp:59: std::__terminate(void (*)()) @ 0x000000001ffade03
    ./ci/tmp/build/./contrib/llvm-project/libcxxabi/src/cxa_handlers.cpp:88: std::terminate() @ 0x000000001ffaddef
    ? @ 0x000000000cad88db
    . inlined from ./contrib/usearch/include/usearch/index.hpp:3333: unum::usearch::serialization_result_t unum::usearch::index_gt<float, unsigned long, unsigned int, unum::usearch::aligned_allocator_gt<char, 64ul>, unum::usearch::memory_mapping_allocator_gt<8ul>>::load_from_stream<DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::dummy_progress_t>(DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::dummy_progress_t&&)
    . inlined from ./contrib/usearch/include/usearch/index_dense.hpp:1168: unum::usearch::serialization_result_t unum::usearch::index_dense_gt<unsigned long, unsigned int>::load_from_stream<DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::dummy_progress_t>(DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::index_dense_serialization_config_t, unum::usearch::dummy_progress_t&&)
    . inlined from ./ci/tmp/build/./src/Storages/MergeTree/MergeTreeIndexVectorSimilarity.cpp:147: DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Don't crash if a vector similarity index cannot be saved to / loaded from persistence

@clickhouse-gh

clickhouse-gh Bot commented Sep 29, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [04e8711]

Summary: ❌

job_name test_name status info comment
Integration tests (arm_binary, distributed plan, 3/4) failure
test_keeper_memory_soft_limit/test.py::test_soft_limit_create FAIL

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 29, 2025
@devcrafter devcrafter self-assigned this Sep 29, 2025
@alexey-milovidov alexey-milovidov changed the title Fix uncaught exception in case of MEMORY_LIMIT_EXCEEDED from USeach Fix uncaught exception in case of MEMORY_LIMIT_EXCEEDED from USearch Sep 29, 2025
@azat azat added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Sep 29, 2025
Found on CI [1]:

    ./ci/tmp/build/./src/Common/SignalHandlers.cpp:0: terminate_handler() @ 0x00000000163e9be6
    ./ci/tmp/build/./contrib/llvm-project/libcxxabi/src/cxa_handlers.cpp:59: std::__terminate(void (*)()) @ 0x000000001ffade03
    ./ci/tmp/build/./contrib/llvm-project/libcxxabi/src/cxa_handlers.cpp:88: std::terminate() @ 0x000000001ffaddef
    ? @ 0x000000000cad88db
    . inlined from ./contrib/usearch/include/usearch/index.hpp:3333: unum::usearch::serialization_result_t unum::usearch::index_gt<float, unsigned long, unsigned int, unum::usearch::aligned_allocator_gt<char, 64ul>, unum::usearch::memory_mapping_allocator_gt<8ul>>::load_from_stream<DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::dummy_progress_t>(DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::dummy_progress_t&&)
    . inlined from ./contrib/usearch/include/usearch/index_dense.hpp:1168: unum::usearch::serialization_result_t unum::usearch::index_dense_gt<unsigned long, unsigned int>::load_from_stream<DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::dummy_progress_t>(DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)::$_0&, unum::usearch::index_dense_serialization_config_t, unum::usearch::dummy_progress_t&&)
    . inlined from ./ci/tmp/build/./src/Storages/MergeTree/MergeTreeIndexVectorSimilarity.cpp:147: DB::USearchIndexWithSerialization::deserialize(DB::ReadBuffer&)

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=87765&sha=1c7134af77cea73c514cb9e257b260010241c5f1&name_0=PR&name_1=Upgrade%20check%20%28amd_debug%29
@azat
azat force-pushed the usearch-uncaught-exception-fix branch from 87afd83 to 4402168 Compare September 29, 2025 12:16
@azat
azat enabled auto-merge September 29, 2025 13:03
@rschu1ze

Copy link
Copy Markdown
Member

CC: @shankar-iyer

@rschu1ze rschu1ze changed the title Fix uncaught exception in case of MEMORY_LIMIT_EXCEEDED from USearch Vector similarity index: Fix uncaught exception in case of OOM during serialization/deserialization Sep 29, 2025
@rschu1ze rschu1ze changed the title Vector similarity index: Fix uncaught exception in case of OOM during serialization/deserialization Vector similarity index: Fix uncaught exception during serialization/deserialization Sep 29, 2025
@azat
azat added this pull request to the merge queue Sep 29, 2025
@azat

azat commented Sep 29, 2025

Copy link
Copy Markdown
Member Author

robot-clickhouse added a commit that referenced this pull request Sep 29, 2025
…ion during serialization/deserialization
robot-clickhouse added a commit that referenced this pull request Sep 29, 2025
…ion during serialization/deserialization
robot-clickhouse added a commit that referenced this pull request Sep 29, 2025
…ion during serialization/deserialization
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Sep 29, 2025
rschu1ze added a commit that referenced this pull request Sep 29, 2025
Backport #87803 to 25.9: Vector similarity index: Fix uncaught exception during serialization/deserialization
rschu1ze added a commit that referenced this pull request Sep 29, 2025
Backport #87803 to 25.8: Vector similarity index: Fix uncaught exception during serialization/deserialization
rschu1ze added a commit that referenced this pull request Sep 29, 2025
Backport #87803 to 25.7: Vector similarity index: Fix uncaught exception during serialization/deserialization
rschu1ze added a commit that referenced this pull request Sep 29, 2025
Backport #87803 to 25.3: Vector similarity index: Fix uncaught exception during serialization/deserialization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants