Skip to content

test/osd: set the EC pool size in the PGLog test - #73945

Merged
tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-test-osd-ec
Nov 17, 2026
Merged

tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-test-osd-ec

Conversation

@tchaikov

@tchaikov tchaikov commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The PGLog test added by d9cd09f passed when merged. b80c13f later made is_nonprimary_shard() map shards by zone, causing the test to fail while updating the missing set:

  #0 pg_pool_t::get_relative_shard() at osd_types.h:2034
  #1 pg_pool_t::is_nonprimary_shard() at osd_types.h:2002
  #2 pg_missing_set<true>::add_next_event() at osd_types.h:5158
  #3 PGLog::append_log_entries_update_missing() at PGLog.h:1456
  #4 PGLog::merge_log() at PGLog.cc:506

The test describes a 4+2 EC pool but leaves pool.size at zero. With both changes present, it reaches a modulo by zero whenever it runs. The operation is undefined behavior, so different builds may show different symptoms; builds predating b80c13f do not reach it.

Set the pool size to six.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@tchaikov
tchaikov requested a review from a team as a code owner November 17, 2026 04:30
@tchaikov

tchaikov commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

see https://jenkins.ceph.com/job/ceph-pr-pipeline/9510/testReport/junit/(root)/projectroot/unittest_pglog for an instance of the test failure

[ RUN      ] PGLogTest.merge_log_skipped_partial_write_then_newer_entry
*** Caught signal (Floating point exception) **
 in thread 75ecb3c5b3c0 thread_name:unittest_pglog
 ceph version Development (no_version) vampire (dev - Debug)
 1: /ceph/build/bin/unittest_pglog(+0x140aa34) [0x6299f2f88a34]
 2: /lib/x86_64-linux-gnu/libc.so.6(+0x424b0) [0x75ecb47944b0]
 3: (pg_pool_t::get_relative_shard(shard_id_t) const+0x56) [0x6299f2ba0516]
 4: (pg_pool_t::is_nonprimary_shard(shard_id_t) const+0x52) [0x6299f2ba0442]
 5: (pg_missing_set<true>::add_next_event(pg_log_entry_t const&, pg_pool_t const&, shard_id_t)+0x461) [0x6299f2b6e5b1]
 6: (bool PGLog::append_log_entries_update_missing<pg_missing_set<true> >(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<true>&, PGLog::LogEntryHandler*, pg_pool_t const&, shard_id_t, DoutPrefixProvider const*)+0x394) [0x6299f2c43504]
 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) [0x6299f2c3750e]
 8: /ceph/build/bin/unittest_pglog(+0xfdc67e) [0x6299f2b5a67e]
 9: (PGLogTest_merge_log_skipped_partial_write_then_newer_entry_Test::TestBody()+0x2a9) [0x6299f2b57ae9]
 10: (void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x74) [0x6299f2c2e3d4]
 11: (void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x66) [0x6299f2c0d216]
 12: (testing::Test::Run()+0xb7) [0x6299f2bede87]
 13: (testing::TestInfo::Run()+0x10f) [0x6299f2bee89f]
 14: (testing::TestSuite::Run()+0x17a) [0x6299f2bef0ba]
 15: (testing::internal::UnitTestImpl::RunAllTests()+0x418) [0x6299f2bfef18]
 16: (bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x74) [0x6299f2c2fba4]
 17: (bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x66) [0x6299f2c0f696]
 18: (testing::UnitTest::Run()+0xb6) [0x6299f2bfeaa6]
 19: (RUN_ALL_TESTS()+0x11) [0x6299f2b0d4f1]
 20: main()
 21: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x75ecb477bd90]
 22: __libc_start_main()
 23: _start()
2026-11-17T02:49:47.245+0000 75ecb3c5b3c0 -1 *** Caught signal (Floating point exception) **
 in thread 75ecb3c5b3c0 thread_name:unittest_pglog

 ceph version Development (no_version) vampire (dev - Debug)
 1: /ceph/build/bin/unittest_pglog(+0x140aa34) [0x6299f2f88a34]
 2: /lib/x86_64-linux-gnu/libc.so.6(+0x424b0) [0x75ecb47944b0]
 3: (pg_pool_t::get_relative_shard(shard_id_t) const+0x56) [0x6299f2ba0516]
 4: (pg_pool_t::is_nonprimary_shard(shard_id_t) const+0x52) [0x6299f2ba0442]
 5: (pg_missing_set<true>::add_next_event(pg_log_entry_t const&, pg_pool_t const&, shard_id_t)+0x461) [0x6299f2b6e5b1]
 6: (bool PGLog::append_log_entries_update_missing<pg_missing_set<true> >(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<true>&, PGLog::LogEntryHandler*, pg_pool_t const&, shard_id_t, DoutPrefixProvider const*)+0x394) [0x6299f2c43504]
 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) [0x6299f2c3750e]
 8: /ceph/build/bin/unittest_pglog(+0xfdc67e) [0x6299f2b5a67e]
 9: (PGLogTest_merge_log_skipped_partial_write_then_newer_entry_Test::TestBody()+0x2a9) [0x6299f2b57ae9]
 10: (void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x74) [0x6299f2c2e3d4]
 11: (void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x66) [0x6299f2c0d216]
 12: (testing::Test::Run()+0xb7) [0x6299f2bede87]
 13: (testing::TestInfo::Run()+0x10f) [0x6299f2bee89f]
 14: (testing::TestSuite::Run()+0x17a) [0x6299f2bef0ba]
 15: (testing::internal::UnitTestImpl::RunAllTests()+0x418) [0x6299f2bfef18]
 16: (bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x74) [0x6299f2c2fba4]
 17: (bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x66) [0x6299f2c0f696]
 18: (testing::UnitTest::Run()+0xb6) [0x6299f2bfeaa6]
 19: (RUN_ALL_TESTS()+0x11) [0x6299f2b0d4f1]
 20: main()
 21: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x75ecb477bd90]
 22: __libc_start_main()
 23: _start()
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

@tchaikov
tchaikov requested a review from aainscow November 17, 2026 04:32
@tchaikov

tchaikov commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

cc @vitaly-goot . the failing test was added by #72260

@tchaikov

Copy link
Copy Markdown
Contributor Author

@aainscow hi Alex, do you mind helping review this change?

The PGLog test added by d9cd09f passed when merged.
b80c13f later made is_nonprimary_shard() map shards by zone,
causing the test to fail while updating the missing set:

  #0 pg_pool_t::get_relative_shard() at osd_types.h:2034
  #1 pg_pool_t::is_nonprimary_shard() at osd_types.h:2002
  #2 pg_missing_set<true>::add_next_event() at osd_types.h:5158
  #3 PGLog::append_log_entries_update_missing() at PGLog.h:1456
  #4 PGLog::merge_log() at PGLog.cc:506

The test describes a 4+2 EC pool but leaves pool.size at zero.
get_relative_shard() then takes a shard ID modulo the zero zone size.
With both commits present, the test reaches this path every time it
runs. Set the pool size to six.

Signed-off-by: Kefu Chai <[email protected]>

@shraddhaag shraddhaag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tchaikov for the fix. I just ran into this error in #73924.

@tchaikov
tchaikov merged commit 4c8da9d into ceph:main Nov 17, 2026
15 checks passed
@tchaikov

Copy link
Copy Markdown
Contributor Author

@aainscow hi Alex, do you mind helping review this change?

@aainscow sorry, Alex. as it's urgent, i merged it without your review / approval.

@tchaikov

Copy link
Copy Markdown
Contributor Author

Thanks @tchaikov for the fix. I just ran into this error in #73924.

thanks for your review and approval!

@aainscow

Copy link
Copy Markdown
Contributor

(claude response) Tracked as https://tracker.ceph.com/issues/83244, now resolved with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants