meilisearch / meilisearch/heed

[bug] test failure on 32-bit arches

Open
#282 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
914
Forks
82
PR merge metrics
No merged PRs in 30d

Description

heed was packaged for Debian; its testsuite fails on 32-bit arches:

470s running 20 tests
470s test env::tests::open_already_existing_database ... ok
470s test env::tests::open_database_with_writemap_flag ... ok
470s test env::tests::create_database_without_commit ... ok
470s test mdb::lmdb_error::test::test_description ... ok
470s test iterator::tests::rev_range_iter_last ... ok
470s test tests::error_is_send_sync ... ok
470s test env::tests::open_env_with_named_path ... ok
470s test iterator::tests::range_iter_last_with_byte_255 ... ok
470s test iterator::tests::iter_last ... ok
470s test env::tests::open_database_with_nosubdir ... ok
470s test env::tests::resize_database ... ok
470s test iterator::tests::rev_prefix_iter_last ... ok
470s test iterator::tests::prefix_iter_last_with_byte_255 ... ok
470s test iterator::tests::range_iter_last ... ok
470s test iterator::tests::rev_prefix_iter_last_with_byte_255 ... ok
470s test iterator::tests::prefix_iter_last ... ok
470s test env::tests::reopen_env_with_different_options_is_err ... ok
470s test iterator::tests::rev_range_iter_last_with_byte_255 ... ok
470s test env::tests::open_read_only_without_no_env_opened_before ... FAILED
471s test env::tests::close_env ... ok
471s 
471s failures:
471s 
471s ---- env::tests::open_read_only_without_no_env_opened_before stdout ----
471s thread 'env::tests::open_read_only_without_no_env_opened_before' panicked at src/env.rs:1030:27:
471s attempt to multiply with overflow
471s stack backtrace:
471s    0: rust_begin_unwind
471s              at /usr/src/rustc-1.80.1/library/std/src/panicking.rs:652:5
471s    1: core::panicking::panic_fmt
471s              at /usr/src/rustc-1.80.1/library/core/src/panicking.rs:72:14
471s    2: core::panicking::panic_const::panic_const_mul_overflow
471s              at /usr/src/rustc-1.80.1/library/core/src/panicking.rs:179:21
471s    3: heed::env::tests::open_read_only_without_no_env_opened_before
471s              at ./src/env.rs:1030:27
471s    4: heed::env::tests::open_read_only_without_no_env_opened_before::{{closure}}
471s              at ./src/env.rs:1023:53
471s    5: core::ops::function::FnOnce::call_once
471s              at /usr/src/rustc-1.80.1/library/core/src/ops/function.rs:250:5
471s    6: core::ops::function::FnOnce::call_once
471s              at /usr/src/rustc-1.80.1/library/core/src/ops/function.rs:250:5
471s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
471s 
471s 
471s failures:
471s     env::tests::open_read_only_without_no_env_opened_before
471s 
471s test result: FAILED. 19 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.01s

Looks like this test exceeds the limit on those arches causing it to overflow.

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 with src/env.rs around lines 1023-1030 and run env::tests::open_read_only_without_no_env_opened_before on a 32-bit target. Trace the multiplication that overflows, then verify the test completes successfully on 32-bit architectures while the existing tests continue to pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.