Bug #83244
closedFastEC: SIGFPE in pg_pool_t::get_relative_shard
0%
Description
the test builds a 4+2 EC pool but never sets pool.size (stays 0).
After the stretch-zone change, is_nonprimary_shard calls get_relative_shard,
which does shard.id % get_zone_size() with get_zone_size() == 0 results in div-by-zero
Introduced by main’s merge of #72260 (d9cd09f) on top of #72644’s get_relative_shard change
13:44:52 [ RUN ] PGLogTest.merge_log_skipped_partial_write_then_newer_entry
13:44:52
*** Caught signal (Floating point exception) **
13:44:52 in thread 74da9842a400 thread_name:unittest_pglog
13:44:52 ceph version Development (no_version) vampire (dev - Debug)
13:44:52 1: /ceph/build/bin/unittest_pglog(+0x1411a04) [0x5d37803e9a04]
13:44:52 2: /lib/x86_64-linux-gnu/libc.so.6(+0x424b0) [0x74da98f674b0]
13:44:52 3: (pg_pool_t::get_relative_shard(shard_id_t) const+0x56) [0x5d377fffd7d6]
13:44:52 4: (pg_pool_t::is_nonprimary_shard(shard_id_t) const+0x52) [0x5d377fffd702]
13:44:52 5: (pg_missing_set::add_next_event(pg_log_entry_t const&, pg_pool_t const&, shard_id_t)+0x461) [0x5d377ffcb871]
13:44:52 6: (bool PGLog::append_log_entries_update_missing<pg_missing_set >(hobject_t const&, std::__cxx11::list<pg_log_entry_t, mempool::pool_allocator<(mempool::pool_index_t)22, pg_log_entry_t> > const&, bool, PGLog::IndexedLog*, pg_missing_set&, PGLog::LogEntryHandler*, pg_pool_t const&, shard_id_t, DoutPrefixProvider const*)+0x394) [0x5d37800a0694]
13:44:52 7: (PGLog::merge_log(pg_info_t&, pg_log_t&&, pg_shard_t, pg_info_t&, pg_pool_t const&, pg_shard_t, PGLog::LogEntryHandler*, bool&, bool&, bool)+0x149e) [0x5d378009469e]
13:44:52 8: /ceph/build/bin/unittest_pglog(+0xfdf93e) [0x5d377ffb793e]
13:44:52 9: (PGLogTest_merge_log_skipped_partial_write_then_newer_entry_Test::TestBody()+0x2a9) [0x5d377ffb4da9]
13:44:52 10: (void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const)+0x74) [0x5d378008b564]
13:44:52 11: (void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const)+0x66) [0x5d378006a3a6]
13:44:52 12: (testing::Test::Run()+0xb7) [0x5d378004b017]
13:44:52 13: (testing::TestInfo::Run()+0x10f) [0x5d378004ba2f]
13:44:52 14: (testing::TestSuite::Run()+0x17a) [0x5d378004c24a]
13:44:52 15: (testing::internal::UnitTestImpl::RunAllTests()+0x418) [0x5d378005c0a8]
13:44:52 16: (bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::)(), char const)+0x74) [0x5d378008cd34]
13:44:52 17: (bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::)(), char const)+0x66) [0x5d378006c826]
13:44:52 18: (testing::UnitTest::Run()+0xb6) [0x5d378005bc36]
13:44:52 19: (RUN_ALL_TESTS()+0x11) [0x5d377ff69571]
13:44:52 20: main()
13:44:52 21: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x74da98f4ed90]
13:44:52 22: __libc_start_main()
13:44:52 23: _start()
13:44:52 2026-11-16T18:44:50.570+0000 74da9842a400 -1 *** Caught signal (Floating point exception) **
13:44:52 in thread 74da9842a400 thread_name:unittest_pglog
13:44:52
13:44:52 ceph version Development (no_version) vampire (dev - Debug)
13:44:52 1: /ceph/build/bin/unittest_pglog(+0x1411a04) [0x5d37803e9a04]
13:44:52 2: /lib/x86_64-linux-gnu/libc.so.6(+0x424b0) [0x74da98f674b0]
13:44:52 3: (pg_pool_t::get_relative_shard(shard_id_t) const+0x56) [0x5d377fffd7d6]
13:44:52 4: (pg_pool_t::is_nonprimary_shard(shard_id_t) const+0x52) [0x5d377fffd702]
13:44:52 5: (pg_missing_set::add_next_event(pg_log_entry_t const&, pg_pool_t const&, shard_id_t)+0x461) [0x5d377ffcb871]
13:44:52 6: (bool PGLog::append_log_entries_update_missing<pg_missing_set >(hobject_t const&, std::__cxx11::list<pg_log_entry_t, mempool::pool_allocator<(mempool::pool_index_t)22, pg_log_entry_t> > const&, bool, PGLog::IndexedLog*, pg_missing_set&, PGLog::LogEntryHandler*, pg_pool_t const&, shard_id_t, DoutPrefixProvider const*)+0x394) [0x5d37800a0694]
13:44:52 7: (PGLog::merge_log(pg_info_t&, pg_log_t&&, pg_shard_t, pg_info_t&, pg_pool_t const&, pg_shard_t, PGLog::LogEntryHandler*, bool&, bool&, bool)+0x149e) [0x5d378009469e]
13:44:52 8: /ceph/build/bin/unittest_pglog(+0xfdf93e) [0x5d377ffb793e]
13:44:52 9: (PGLogTest_merge_log_skipped_partial_write_then_newer_entry_Test::TestBody()+0x2a9) [0x5d377ffb4da9]
13:44:52 10: (void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const)+0x74) [0x5d378008b564]
13:44:52 11: (void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const)+0x66) [0x5d378006a3a6]
13:44:52 12: (testing::Test::Run()+0xb7) [0x5d378004b017]
13:44:52 13: (testing::TestInfo::Run()+0x10f) [0x5d378004ba2f]
13:44:52 14: (testing::TestSuite::Run()+0x17a) [0x5d378004c24a]
13:44:52 15: (testing::internal::UnitTestImpl::RunAllTests()+0x418) [0x5d378005c0a8]
13:44:52 16: (bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::)(), char const)+0x74) [0x5d378008cd34]
13:44:52 17: (bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::)(), char const)+0x66) [0x5d378006c826]
13:44:52 18: (testing::UnitTest::Run()+0xb6) [0x5d378005bc36]
13:44:52 19: (RUN_ALL_TESTS()+0x11) [0x5d377ff69571]
13:44:52 20: main()
13:44:52 21: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x74da98f4ed90]
13:44:52 22: __libc_start_main()
13:44:52 23: _start()
13:44:52 NOTE: a copy of the executable, or objdump -rdS <executable> is needed to interpret this.
13:44:52
13:44:52 --- begin dump of recent events ---
LF Updated by Laura Flores 14 days ago
- Assignee set to Alex Ainscow
@Alex Ainscow can you take a look?
Relevant PR: https://github.com/ceph/ceph/pull/72644
AA Updated by Alex Ainscow 13 days ago
- Status changed from New to Resolved
- Pull request ID set to 73945
Fixed by https://github.com/ceph/ceph/pull/73945 (merged to main 2026-11-17). The test built a 4+2 pool with size 0, and since #72644 get_relative_shard() divides by the zone size. The crash above is from 2026-11-16, before that merge. Only main has both changes, so no backport is needed.
Raised by Claude Code
UB Updated by Upkeep Bot 13 days ago
- Merge Commit set to 4c8da9d155321d60c71771da1d5e492b12e2a6da
- Fixed In set to v22.0.0-975-g4c8da9d155
- Upkeep Timestamp set to 2026-11-21T00:41:39+00:00