Skip to content

crimson/os/seastore: make laddr_t block aligned - #59182

Merged
cyx1231st merged 11 commits into
ceph:mainfrom
zhscn:wip-4k-laddr
Aug 30, 2024
Merged

cyx1231st merged 11 commits into
ceph:mainfrom
zhscn:wip-4k-laddr

Conversation

@zhscn

@zhscn zhscn commented Aug 13, 2024

Copy link
Copy Markdown
Member

This PR converts laddr_t to a struct and make it block aligned, as the basic part of static 128-bits laddr design described at #55291 (comment) .

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@zhscn
zhscn requested a review from a team as a code owner August 13, 2024 04:54
@xxhdx1985126

Copy link
Copy Markdown
Member

jenkins test make check

@xxhdx1985126
xxhdx1985126 requested a review from cyx1231st August 14, 2024 05:16
@cyx1231st

Copy link
Copy Markdown
Member

jenkins test make check

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still looking, thanks to split this into smaller PRs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this the only difference?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, the bottom of this file has one alias:

using laddr_interval_set_t = details::interval_set<laddr_t, extent_len_t>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's reasonable to decouple this PR from classic CI tests to accelerate merging.

The change looks general and reasonable -- probably we still need to drop the duplicated code -- can you send another PR to update the common interval_set and remove the crimson version after this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ok, this change will be extracted to a standalone PR.

@cyx1231st cyx1231st Aug 15, 2024 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@athanatos @rzarzynski

Might need your confirm that it is safe to assume the disk block size >= 4KiB since Crimson, because after this change, the extent laddr cannot support the alignment under 4KiB.

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.

Yeah, I'm fine with that. I can't think of a situation where we'd want to deal in smaller blocks.

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be enough comments to proceed.

The change of "make laddr_t block aligned" is foundamental, I'm still looking at it.

Let me know if any comment looks confusing.

@zhscn

zhscn commented Aug 16, 2024 •

Copy link
Copy Markdown
Member Author

I could not follow your comments about loffset_t, let me explain the the relation between laddr_t and loffset_t at first.

The laddr_t is the logical address of LogicalCachedExtent and stored in the LBA btree, now it's always block aligned.

The loffset_t or laddr_offset_t literally means one laddr_t plus one offset which might not be block aligned. It is also be used as the return type of arithmetic operations between laddr_t and offset(objaddr_t), it works like:

alignment is 4096
laddr(0x01) + offset(2048) -> laddr_offset_t(base=0x01, offset=2048)
laddr(0x01) + offset(8192) -> laddr_offset_t(base=0x03, offset=0)

The point here is that the value of offset is usually 0, except when handling the input from client at the object data handler where the offset might not be 0, see the latest changes in object_data_handler.cc::overwrite_plan_t::data_start/end, and the usages of laddr_t::get_aligned_range(base, offset, length) are also located at there, the offset and length might not be block alinged.

After the ObjectDataHandler finishing the construction of extents, the offset of loffset_t is always zero, so I made loffset_t could convert to laddr_t implicitly.

Of course we can make this cast explicit for soundness.

For += overload, I think it's better to assume the paratmeter is always block aligned and return the laddr_t itself, or just delete it and handle it manually.


Seems C++ standard doesn't require the return value of += overload should be the adder itself, I think it's not a good idea to do so.

@cyx1231st

cyx1231st commented Aug 19, 2024 •

Copy link
Copy Markdown
Member

The loffset_t or laddr_offset_t literally means one laddr_t plus one offset which might not be block aligned. It is also be used as the return type of arithmetic operations between laddr_t and offset(objaddr_t)

Yeah, I think I get the idea, and I generally agree this direction is reasonable to introduce a combined type. There are some adjustment I think might be worthing for different reasons, though.

and the usages of laddr_t::get_aligned_range(base, offset, length) are also located at there, the offset and length might not be block alinged.

I didn't mean it is wrong, will elaborate in that thread.


I'm not sure if you follow several comments around the encodable type extent_len_t usage, e.g. #59182 (comment), #59182 (comment). I think we should not abuse the type extent_len_t to represent the offset among extents, this usage is incorrect to me.

Specifically, for example, at some time, we might want to optimize the width of extent_len_t to save writes, we can hardcode the max-possible extent size and shrink its width to achieve the goal, but only if its usages are correct, but misusing extent_len_t further than that will make things challenge and error-prone.

A reasonable way might be to introduce a different uint64_t type (renamed as loffset_t from comments) to generally represent offset across extents, which was a part of the responsibility of uint64_t laddr_t.

What do you think?

@zhscn

zhscn commented Aug 19, 2024 •

Copy link
Copy Markdown
Member Author

Specifically, for example, at some time, we might want to optimize the width of extent_len_t to save writes, we can hardcode the max-possible extent size to achieve the goal, but only if its usages are correct, but misusing extent_len_t further than that will make things challenge and error-prone.

I get it.

A reasonable way might be to introduce a different uint64_t type (renamed as loffset_t from comments) to generally represent offset across extents, which was a part of the responsibility of uint64_t laddr_t.

IIUC, there will be three types:

struct laddr_t; // the logical address used in LogicalCachedExtent and LBAManager
using loffset_t = uint64_t; // the "distance" or "offset" across different extents
struct laddr_offset_t {
  laddr_t base;
  extent_len_t offset; // block not aligned part
};

Here is one subtle thing that the laddr_t is block addressed, but the loffset_t is byte addressed, which caused the loffset_t could not represtent all offsets between two laddr_t.

  // the difference between two laddrs usually works as byte distance,
  // assume the result won't overflow and convert it into the byte
  // addressing result automatically.
  friend Int operator-(const laddr_t &l, const laddr_t &r) { // Int should be replaced with loffset_t
    auto diff = l.value - r.value;
    assert(diff <= (std::numeric_limits<Int>::max() >> UNIT_SHIFT));
    return diff << UNIT_SHIFT;
  }

I found that most of subtraction between two laddr_t values actually happens within a single object, so I think it's safe to assume the difference won't overflow the loffset_t.

The implementation of 128 laddr_t also has this problem.

@zhscn

zhscn commented Aug 19, 2024 •

Copy link
Copy Markdown
Member Author

Seems most of comments are about the implicit conversion, I will remove them and repush

@zhscn

zhscn commented Aug 19, 2024 •

Copy link
Copy Markdown
Member Author

I think one thing about subtraction of 128 laddr_t also needs to be noticed before opening the 128 laddr_t PR:

To handle the different compilers and platforms, laddr_t uses different uint128_t internally:

class laddr_t {
public:
  // the type of underlying integer
#if defined (__SIZEOF_INT128__) && !TEST_SEASTORE_BOOST_U128_LADDR
  using Int = unsigned __int128;
  using MinusResultType = Int;
#else
  using Int = boost::multiprecision::uint128_t;
  // The boost version uint128_t doesn't downcast to shorter integer implicitly.
  // Using MinusResultType as return type for the minus overloads could reduce
  // explicit casts.
  using MinusResultType = uint64_t;
#endif

  friend MinusResultType operator-(const laddr_t &l, const laddr_t &r) {
    auto diff = l.value - r.value;
    assert(diff <= (std::numeric_limits<MinusResultType>::max() >> UNIT_SHIFT));
    return static_cast<MinusResultType>(diff << UNIT_SHIFT);
  }
}

The boost uint128_t might use 24 bytes in some platforms.

As the comments shows, the boost uint128 couldn't downcast to shorter integer and in consideration of the fact that the subtraction is not likely to overflow, here the MinusResultType is introdued to reduce to counts of static_cast at the caller side.

What do you think about this approach, should we replace it to the explicit way?

@cyx1231st

cyx1231st commented Aug 19, 2024 •

Copy link
Copy Markdown
Member

I found that most of subtraction between two laddr_t values actually happens within a single object, so I think it's safe to assume the difference won't overflow the loffset_t.

Yeah, I also think we won't calculate laddr difference larger than a uint64_t -- looks it is only used when related to the object data offset objaddr_t.

To handle the different compilers and platforms, laddr_t uses different uint128_t internally
...
What do you think about this approach, should we replace it to the explicit way?

Good to know! Is unsigned __int128 much faster than a boost::multiprecision::uint128_t?

Probably we can introduce a basic version only with boost::multiprecision::uint128_t, then optimze it later with a conditional unsigned __int128. And this way, it is easy to understand the benefits in case of SeaStore.

@zhscn

zhscn commented Aug 19, 2024 •

Copy link
Copy Markdown
Member Author

Good to know! Is unsigned __int128 much faster than a boost::multiprecision::uint128_t?

Currently there is no benchmark result, but I think the difference might not be significant.

Probably we can introduce a basic version only with boost::multiprecision::uint128_t, then optimze it later with a conditional unsigned __int128. And this way, it is easy to understand the benefits in case of SeaStore.

I'd prefer the compiler intrinsics, because it works more like the integer primitive type and is simpler than boost u128, e.g. it's always 16 bytes, encode/decode via memcpy, boost uint128 should do some bitwise operations to get the low u64 value and the high u64 value.

Since the boost u128 is implemented by the magic templates, it might cause some annoying compile errors sometimes. One example is:

  // NOTE: when using boost uint128 for laddr_t, considering such code:
  //
  //   using u128 = boost::multiprecision::uint128_t;
  //   1. static_assert(std::is_nothrow_move_constructible_v<const u128>, "");
  //   2. static_assert(std::is_nothrow_move_constructible_v<const std::variant<int, u128>>, "");
  //   3. static_assert(std::is_nothrow_move_constructible_v<const boost::variant<int, u128>>, "");
  //   4. static_assert(std::is_nothrow_move_constructible_v<const boost::variant2::variant<int, u128>>, "");
  //
  // The result shows that assertion 2,3 fail so that pladdr_t is not nothrow move
  // constructible. It seems that this is the restriction of std::variant.
  // A workaround is to add noexcept declaration to make
  // pladdr_t(std::variant<laddr_t, X>) nothrow move constructible, or use
  // boost::variant2::variant instead.
  pladdr_t(const pladdr_t &) noexcept = default;

Anyway, both 128 int could work, __int128 is simpler to work with other structure, and boost::multiprecision::uint128_t is more portable.

@cyx1231st

cyx1231st commented Aug 19, 2024 •

Copy link
Copy Markdown
Member

The boost uint128_t might use 24 bytes in some platforms.

I think it should be fine as long as it won't impact the denc size (16B).

As the comments shows, the boost uint128 couldn't downcast to shorter integer and in consideration of the fact that the subtraction is not likely to overflow, here the MinusResultType is introdued to reduce to counts of static_cast at the caller side.

Almost all the platforms are 64 bits (128-bit is mostly non native from CPU perspective), and taken that we only subtract laddrs for objaddr_t, I think the 64-bit loffset_t should be used for the subtracted unsigned type in case of unsigned __int128, what do you think?

I'd prefer the compiler intrinsics, because it works more like the integer primitive type and is simpler than boost u128

OK, I suppose you mean that both versions will be implemented to make it platform compatible.

@zhscn

This comment was marked as outdated.

@cyx1231st

Copy link
Copy Markdown
Member

// A workaround is to add noexcept declaration to make
// pladdr_t(std::variant<laddr_t, X>) nothrow move constructible, or use
// boost::variant2::variant instead.

I'm not sure whether there are further side-effects. Should be fine as long as the Ceph builds keep successful.

@zhscn

zhscn commented Aug 19, 2024 •

Copy link
Copy Markdown
Member Author

I think it should be fine as long as it won't impact the denc size (16B).

It's guaranted.

we only subtract laddrs for objaddr_t, I think the 64-bit loffset_t should be used for the subtracted unsigned type in case of unsigned __int128,

It's no problem for laddr_t minus objaddr_t, 64-bit loffset_t should be enough for this case. However, it's possible for laddr_t minus laddr_t to calculate the distance of two laddrs. The code displayed at #59182 (comment) introduces implicit conversion(from the view of the caller to this substraction overload) from boost::multiprecision::uint128_t to uint64_t, so I want to determine if this behavior is acceptable.

@zhscn

zhscn commented Aug 19, 2024 •

Copy link
Copy Markdown
Member Author

// A workaround is to add noexcept declaration to make
// pladdr_t(std::variant<laddr_t, X>) nothrow move constructible, or use
// boost::variant2::variant instead.

I'm not sure whether there are further side-effects. Should be fine as long as the Ceph builds keep successful.

It's just an illustration to show the difference between __int128 and boost uint128_t.

@cyx1231st

cyx1231st commented Aug 19, 2024 •

Copy link
Copy Markdown
Member

The code displayed at #59182 (comment) introduces implicit conversion(from the view of the caller to this substraction overload) from boost::multiprecision::uint128_t to uint64_t, so I want to determine if this behavior is acceptable.

Hm, I don't have a complete list of where laddr_t - laddr_t might be used, I think it's possible to identify them by commenting out operator-(const laddr_t &, const laddr_t &) after laddr_t is converted to a struct, and see how the compiler complains. Let's discuss case-by-case then.

Anyway, why not operator-(const laddr_t &, const laddr_t &) -> laddr_t, then convert the result case-by-case ?

@zhscn

zhscn commented Aug 19, 2024

Copy link
Copy Markdown
Member Author

Anyway, why not operator-(const laddr_t &, const laddr_t &) -> laddr_t,

Because the laddr_t is block addressed, when proceeding substraction, we usually want the byte distance, making laddr_t as return type looks a little strange.

then convert the result case-by-case ?

Ok, it's more like the explicit method, let's return the underlying uint128_t instead of laddr_t for now.

@zhscn

zhscn commented Aug 20, 2024 •

Copy link
Copy Markdown
Member Author

Some changes:

  1. all implicit conversion are removed.
  2. operator laddr_t() is also removed for laddr_offset_t, use checked_to_laddr() when we could ensure the offset is always aligned.
  3. laddr_t::get_aligned_range is removed.

@zhscn

zhscn commented Aug 21, 2024

Copy link
Copy Markdown
Member Author

jenkins test make check

@zhscn

zhscn commented Aug 21, 2024

Copy link
Copy Markdown
Member Author

jenkins test api

@cyx1231st

Copy link
Copy Markdown
Member

jenkins test make check

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still looking ..

Comments are mostly about type managements.

zhscn added 2 commits August 23, 2024 19:19
Use laddr_offset_t as parameter for ValueDeltaRecorder, since the
payload offset may not be block aligned.

Signed-off-by: Zhang Song <[email protected]>
@zhscn

zhscn commented Aug 24, 2024

Copy link
Copy Markdown
Member Author

jenkins test make check

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks to keep the commits well organized, LGTM!

(Looks there are some misuses of extent_len_t, though, but they are from existing code, unrelated to this PR).

@cyx1231st

Copy link
Copy Markdown
Member

To keep track ^: #59182 (comment)

@cyx1231st

Copy link
Copy Markdown
Member

@cyx1231st

Copy link
Copy Markdown
Member

https://pulpito.ceph.com/yingxin-2024-08-26_08:56:09-crimson-rados-wip-yingxin-testing-2024-08-26-1437-distro-default-smithi/

INFO  2024-08-26 09:08:50,396 [shard 0:main] seastore_device - block_open_device: path=/var/lib/ceph/osd/ceph-0/block successful, size=53687091200, block_size=4096
INFO  2024-08-26 09:08:50,396 [shard 1:main] seastore_device - block_open_device: path=/var/lib/ceph/osd/ceph-0/block successful, size=53687091200, block_size=4096
INFO  2024-08-26 09:08:50,396 [shard 1:main] seastore_device - block_open_device: path=/var/lib/ceph/osd/ceph-0/block successful, size=53687091200, block_size=4096
INFO  2024-08-26 09:08:50,396 [shard 2:main] seastore_device - block_open_device: path=/var/lib/ceph/osd/ceph-0/block successful, size=53687091200, block_size=4096
INFO  2024-08-26 09:08:50,396 [shard 2:main] seastore_device - BlockSegmentManager::shard_mount: Dev(0) read (size=17850957824, segments=266, tracker_offset=12288, first_segment_offset=357019INFO  2024-08-26 09:08:50,396 [shard 2:main] seastore_device - BlockSegmentManager::shard_mount: Dev(0) read (size=17850957824, segments=266, tracker_offset=12288, first_segment_offset=35701932032)
rd 2:main] seastore_device - block_open_device: path=/var/lib/ceph/osd/ceph-0/block successful, size=53687091200, block_size=4096
L), num_extents=0, written_to=4096)
INFO  2024-08-26 09:08:50,366 [shard 2:main] seastore_cleaner - SegmentCleaner::close_segment: closed, SegmentCleaner(should_block_io_on_clean=0, should_clean=1, projected_avail_ratio=0.947368, reclaim_ratio=0.999969, alivINFO  2024-08-26 09:08:50,396 [shard 2:main] seastore_device - BlockSegmentManager::shard_mount: Dev(0) read (size=17850957824, segments=266, tracker_offset=12288,     first_segment_offset=35701932032)
rd 2:main] seastore_device - block_open_device: path=/var/lib/ceph/osd/ceph-0/block successful, size=53687091200, block_size=4096
L), num_extents=0, written_to=4096)
INFO  2024-08-26 09:08:5INFO  2024-08-26 09:08:50,397 [shard 0:main] seastore_device - BlockSegmentManager::shard_mount: Dev(0) complete
INFO  2024-08-26 09:08:50,399 [shard 2:main] seastore_device - BlockSegmentManager::shard_mount: Dev(0) complete
e=17850957824, segments=266, tracker_offset=12288, first_segment_offset=35701932032)
rd 2:main] seastore_device -INFO  2024-08-26 09:08:50,399 [shard 2:main] seastore_device - BlockSegmentManager::shard_mount: Dev(0) complete
ERROR 2024-08-26 09:08:50,400 [shard 0:main] none - /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.0.0-6018-g8ee03c44/rpm/el9/BUILD/ceph-19.0.0-6018-g8ee03c44/src/crimson/os/seastore/seastore.cc:256 : In function 'crimson::os::seastore::SeaStore::mount()::<lambda()>',           ceph_assert(%s)
device->get_block_size() >= laddr_t::UNIT_SIZE

Somehow the block size doesn't match.

@zhscn

zhscn commented Aug 27, 2024

Copy link
Copy Markdown
Member Author

jenkins test make check

@cyx1231st

Copy link
Copy Markdown
Member

@cyx1231st

cyx1231st commented Aug 29, 2024 •

Copy link
Copy Markdown
Member

^ Only this PR is included on top of the main branch.

https://pulpito.ceph.com/yingxin-2024-08-28_07:46:58-crimson-rados-wip-yingxin-testing-2024-08-28-1249-distro-default-smithi/

Seems there are new unclassified failures (7877442, 7877443, 7877445), @zhscn @xxhdx1985126 can you also take a look?

7877438, 7877454-7 are know issues.

7877460 looks like infrastructure failure.

I'll schedule a new run based on main to compare.

@cyx1231st

cyx1231st commented Aug 29, 2024 •

Copy link
Copy Markdown
Member

@zhscn

zhscn commented Aug 29, 2024 •

Copy link
Copy Markdown
Member Author

7877442, 7877443 failed due to timeout:

...... timeout 1h /home/ubuntu/cephtest/clone.client.0/qa/workunits/rados/test_python.sh -m 'not (tier or ec or bench)'
......
2024-08-28T08:05:11.746 INFO:tasks.workunit.client.0.smithi106.stderr:+ ceph osd pool create rbd
......
2024-08-28T08:11:24.832 INFO:tasks.workunit.client.0.smithi094.stdout:../../../clone.client.0/src/test/pybind/test_rados.py::TestIoctx::test_aio_remove PASSED [ 77%]
2024-08-28T08:11:27.843 INFO:tasks.ceph.mon.a.smithi094.stderr:2024-08-28T08:11:27.842+0000 7f5560bf4640 -1 mon.a@0(leader).osd e235 definitely_dead 0
2024-08-28T09:07:47.486 DEBUG:teuthology.orchestra.run:got remote process result: 124

Seems the monitor downed.

@cyx1231st

Copy link
Copy Markdown
Member

@xxhdx1985126

xxhdx1985126 commented Aug 29, 2024 •

Copy link
Copy Markdown
Member

^ Only this PR is included on top of the main branch.

https://pulpito.ceph.com/yingxin-2024-08-28_07:46:58-crimson-rados-wip-yingxin-testing-2024-08-28-1249-distro-default-smithi/

Seems there are new unclassified failures (7877442, 7877443, 7877445), @zhscn @xxhdx1985126 can you also take a look?

7877438, 7877454-7 are know issues.

7877460 looks like infrastructure failure.

I'll schedule a new run based on main to compare.

For 7877442 and 7877443, it seems that the osdmap handling of osdmap.236 never finished, as no later committed_osd_map() after marking osd.3 down:

INFO  2024-08-28 08:08:53,240 [shard 0:main] osd - OSD::committed_osd_maps: osd.2 (236, 236)
DEBUG 2024-08-28 08:08:53,240 [shard 0:main] osd - OSDSingletonState::get_local_map: osdmap.236 found in cache
DEBUG 2024-08-28 08:08:53,240 [shard 0:main] osd - OSD::committed_osd_maps: osd.0: whoami ? true, old up ? true , now down ? false
DEBUG 2024-08-28 08:08:53,240 [shard 0:main] osd - OSD::committed_osd_maps: osd.1: whoami ? true, old up ? true , now down ? false
DEBUG 2024-08-28 08:08:53,240 [shard 0:main] osd - OSD::committed_osd_maps: osd.2: whoami ? false, old up ? true , now down ? true
DEBUG 2024-08-28 08:08:53,240 [shard 0:main] osd - OSD::committed_osd_maps: osd.3: whoami ? true, old up ? true , now down ? true
DEBUG 2024-08-28 08:08:53,240 [shard 0:main] osd - OSD::committed_osd_maps: osd.2: mark osd.3 down
INFO  2024-08-28 08:08:53,240 [shard 0:main] ms - [0x5110003cea00 osd.2(cluster) v2:172.21.15.118:6810/2286115587@53742 >> osd.3 v2:172.21.15.118:6804/1622480051] mark_down() at io_stat(io_state=open, in_seq=1269, out_seq=1229, out_pending_msgs_size=0, out_sent_msgs_size=0, need_ack=0, need_keepalive=0, need_keepalive_ack=0), send 1 notify_mark_down()
INFO  2024-08-28 08:08:53,240 [shard 0:main] ms - [0x5110003cea00 osd.2(cluster) v2:172.21.15.118:6810/2286115587@53742 >> osd.3 v2:172.21.15.118:6804/1622480051] closing: reset no, replace no
INFO  2024-08-28 08:08:53,241 [shard 0:main] ms - [0x5110003cea00 osd.2(cluster) v2:172.21.15.118:6810/2286115587@53742 >> osd.3 v2:172.21.15.118:6804/1622480051] do_in_dispatch(): fault at drop, io_stat(io_state=drop, in_seq=1269, out_seq=1229, out_pending_msgs_size=0, out_sent_msgs_size=0, need_ack=0, need_keepalive=0, need_keepalive_ack=0) -- read eof
INFO  2024-08-28 08:08:53,242 [shard 0:main] osd - Heartbeat::Peer: osd.3 removed
INFO  2024-08-28 08:08:53,242 [shard 0:main] ms - [0x5110003f63c0 osd.2(hb_back) v2:172.21.15.118:6805/2286115587 >> osd.3 v2:172.21.15.118:6806/1622480051@58695] mark_down() at io_stat(io_state=open, in_seq=96, out_seq=96, out_pending_msgs_size=0, out_sent_msgs_size=0, need_ack=0, need_keepalive=0, need_keepalive_ack=0), send 1 notify_mark_down()
INFO  2024-08-28 08:08:53,242 [shard 0:main] ms - [0x5110003f63c0 osd.2(hb_back) v2:172.21.15.118:6805/2286115587 >> osd.3 v2:172.21.15.118:6806/1622480051@58695] closing: reset no, replace no
INFO  2024-08-28 08:08:53,242 [shard 0:main] ms - [0x5110003f68c0 osd.2(hb_front) v2:172.21.15.118:6808/2286115587 >> osd.3 v2:172.21.15.118:6807/1622480051@61989] mark_down() at io_stat(io_state=open, in_seq=96, out_seq=96, out_pending_msgs_size=0, out_sent_msgs_size=0, need_ack=0, need_keepalive=0, need_keepalive_ack=0), send 1 notify_mark_down()
INFO  2024-08-28 08:08:53,242 [shard 0:main] ms - [0x5110003f68c0 osd.2(hb_front) v2:172.21.15.118:6808/2286115587 >> osd.3 v2:172.21.15.118:6807/1622480051@61989] closing: reset no, replace no
Reactor stalled for 65 ms on shard 0, in scheduling group main. Backtrace: 0x82dff 0xbb9ee2f 0xba77a81 0xba78fec 0xba79202 0xba79358 0xba79821 0x3e6ef 0x37213a0 0x39dd645 0x39ddbca 0x39ddc5e 0x39ddd0d 0x39ddd92 0x39dde2c 0x3799200 0x37992cd 0x379934c 0x37993cb 0x379944a 0x379955f 0x379969c 0x3799a3c 0x37c03be 0xba8bdfb 0xbaa3c79 0xbb5148f 0xbb52add 0xb82186d 0xb8220a5 0x37ceed8 0x2958f 0x2963f 0x35bf9b4
kernel callstack:
Reactor stalled for 123 ms on shard 0, in scheduling group main. Backtrace: 0x82dff 0xbb9ee2f 0xba77a81 0xba78fec 0xba79202 0xba79358 0xba79821 0x3e6ef 0x37582b7 0x37212ca 0x39dd645 0x39ddbca 0x39ddc5e 0x39ddd0d 0x39ddd92 0x39dde2c 0x3799200 0x37992cd 0x379934c 0x37993cb 0x379944a 0x379955f 0x379969c 0x3799a3c 0x37c03be 0xba8bdfb 0xbaa3c79 0xbb5148f 0xbb52add 0xb82186d 0xb8220a5 0x37ceed8 0x2958f 0x2963f 0x35bf9b4
kernel callstack:
Reactor stalled for 230 ms on shard 0, in scheduling group main. Backtrace: 0x82dff 0xbb9ee2f 0xba77a81 0xba78fec 0xba79202 0xba79358 0xba79821 0x3e6ef 0x3757fda 0x37582a0 0x37212ca 0x39dd645 0x39ddbca 0x39ddc5e 0x39ddd0d 0x39ddd92 0x39dde2c 0x3799200 0x37992cd 0x379934c 0x37993cb 0x379944a 0x379955f 0x379969c 0x3799a3c 0x37c03be 0xba8bdfb 0xbaa3c79 0xbb5148f 0xbb52add 0xb82186d 0xb8220a5 0x37ceed8 0x2958f 0x2963f 0x35bf9b4
kernel callstack:
Reactor stalled for 438 ms on shard 0, in scheduling group main. Backtrace: 0x82dff 0xbb9ee2f 0xba77a81 0xba78fec 0xba79202 0xba79358 0xba79821 0x3e6ef 0x373772e 0x3737940 0x37212e8 0x39dd645 0x39ddbca 0x39ddc5e 0x39ddd0d 0x39ddd92 0x39dde2c 0x3799200 0x37992cd 0x379934c 0x37993cb 0x379944a 0x379955f 0x379969c 0x3799a3c 0x37c03be 0xba8bdfb 0xbaa3c79 0xbb5148f 0xbb52add 0xb82186d 0xb8220a5 0x37ceed8 0x2958f 0x2963f 0x35bf9b4
kernel callstack:
Reactor stalled for 845 ms on shard 0, in scheduling group main. Backtrace: 0x82dff 0xbb9ee2f 0xba77a81 0xba78fec 0xba79202 0xba79358 0xba79821 0x3e6ef 0x360519d 0x375b9ca 0x375bbc5 0x37bcce8 0x371ff36 0x37213eb 0x39dd645 0x39ddbca 0x39ddc5e 0x39ddd0d 0x39ddd92 0x39dde2c 0x3799200 0x37992cd 0x379934c 0x37993cb 0x379944a 0x379955f 0x379969c 0x3799a3c 0x37c03be 0xba8bdfb 0xbaa3c79 0xbb5148f 0xbb52add 0xb82186d 0xb8220a5 0x37ceed8 0x2958f 0x2963f 0x35bf9b4
kernel callstack:

It seems that the continuation chain of OSD::committed_osd_maps() finished OSD::update_heartbeat_peers but never reached the next continuation in which OSD::check_osdmap_features() is called. This doesn't seem to relate to this PR. What do you think? @cyx1231st

Seems that OSD::update_heartbeat_peers() fell into an infinite loop as no shard 0 related logs ever since that.

Submitted a new issue for this: https://tracker.ceph.com/issues/67791

@cyx1231st

Copy link
Copy Markdown
Member

For 7877442 and 7877443, it seems that the osdmap handling of osdmap.236 never finished, as no later committed_osd_map() after marking osd.3 down:

Also appears in https://pulpito.ceph.com/yingxin-2024-08-29_03:47:01-crimson-rados-wip-yingxin-testing-2024-08-28-1249-base-distro-default-smithi/ 7879716/7879717, should be unrelated to this PR.

@cyx1231st

Copy link
Copy Markdown
Member

@cyx1231st
cyx1231st merged commit fc16b16 into ceph:main Aug 30, 2024
@cyx1231st

Copy link
Copy Markdown
Member

Submitted a new issue for this: https://tracker.ceph.com/issues/67791

@xxhdx1985126 I renamed the title of issue for easier classification.

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.

4 participants