Skip to content

src/crimson/osd/ec_backend.cc: improve logging - #70833

Merged
shraddhaag merged 2 commits into
ceph:mainfrom
shraddhaag:wip-shraddhaag-debugdpp-ec
Aug 8, 2026
Merged

shraddhaag merged 2 commits into
ceph:mainfrom
shraddhaag:wip-shraddhaag-debugdpp-ec

Conversation

@shraddhaag

@shraddhaag shraddhaag commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

This PR does the following to improve logging across the file src/crimson/osd/ec_backend.cc:

  1. changes to using DEBUGDPP / INFODPP instead of logger.
  2. adds hoid / tid wherever available in logs to make them easier to follow.
  3. normalises all log sites to use key=value formatting.

Examples

Logs before this PR:

DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - ECBackend::handle_rep_read_op: read requested=4096 len=4096
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - ECBackend::handle_rep_read_op: attrs_to_read 0
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - handle_rep_read_reply: reply ECSubReadReply(tid=72057594037927945, attrs_read=0, omap_headers_read=0, omap_entries_read=0, omaps_complete=[]) from 1(0)
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - handle_rep_read_reply: complete ReadOp(tid=72057594037927945, to_read={69:602f83fe:::foo:head=read_request_t(to_read=[0,8192,0], flags=0, shard_want_to_read={0:[0~4096],1:[0~4096]}, zeros_for_decode={1:[0~4096]}, shard_reads={}, want_attrs=0, want_omap_header=0, want_omap_keys=0, omap_read_from=, omap_max_bytes=0)}, complete={69:602f83fe:::foo:head=read_result_t(r=0, errors={}, noattrs, no_omap_header, no_omap_entries, omap_complete=0, buffers_read=shard_extent_map: ({0~4096}, maps={0:{0~4096(4096)}}), processed_read_requests={0:[0~4096]}, zero_length_reads={})}, priority=127, obj_to_source={69:602f83fe:::foo:head=1(0)}, source_to_obj={1(0)=69:602f83fe:::foo:head}, in_progress=, debug_log=READ_REQUEST[1(0)]->[0~4096]
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd -  pg_epoch 256 pg[69.6s0( v 256'1 (0'0,256'1] local-lis/les=255/256 n=1 ec=255/255 lis/c=255/255 les/c/f=256/256/0 sis=255) [1,0,3]p1(0) r=0 lpr=255 pct=0'0 crt=256'1 lcod 0'0 mlcod 0'0 active+clean complete_read_op completing ReadOp(tid=72057594037927945, to_read={69:602f83fe:::foo:head=read_request_t(to_read=[0,8192,0], flags=0, shard_want_to_read={0:[0~4096],1:[0~4096]}, zeros_for_decode={1:[0~4096]}, shard_reads={}, want_attrs=0, want_omap_header=0, want_omap_keys=0, omap_read_from=, omap_max_bytes=0)}, complete={69:602f83fe:::foo:head=read_result_t(r=0, errors={}, noattrs, no_omap_header, no_omap_entries, omap_complete=0, buffers_read=shard_extent_map: ({0~4096}, maps={0:{0~4096(4096)}}), processed_read_requests={0:[0~4096]}, zero_length_reads={})}, priority=127, obj_to_source={69:602f83fe:::foo:head=1(0)}, source_to_obj={1(0)=69:602f83fe:::foo:head}, in_progress=, debug_log=READ_REQUEST[1(0)]->[0~4096]
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd -  pg_epoch 256 pg[69.6s0( v 256'1 (0'0,256'1] local-lis/les=255/256 n=1 ec=255/255 lis/c=255/255 les/c/f=256/256/0 sis=255) [1,0,3]p1(0) r=0 lpr=255 pct=0'0 crt=256'1 lcod 0'0 mlcod 0'0 active+clean finish_single_request completing hoid=69:602f83fe:::foo:head res=read_result_t(r=0, errors={}, noattrs, no_omap_header, no_omap_entries, omap_complete=0, buffers_read=shard_extent_map: ({0~4096}, maps={0:{0~4096(4096)}}), processed_read_requests={0:[0~4096]}, zero_length_reads={}) req=read_request_t(to_read=[0,8192,0], flags=0, shard_want_to_read={0:[0~4096],1:[0~4096]}, zeros_for_decode={1:[0~4096]}, shard_reads={}, want_attrs=0, want_omap_header=0, want_omap_keys=0, omap_read_from=, omap_max_bytes=0)
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd -  pg_epoch 256 pg[69.6s0( v 256'1 (0'0,256'1] local-lis/les=255/256 n=1 ec=255/255 lis/c=255/255 les/c/f=256/256/0 sis=255) [1,0,3]p1(0) r=0 lpr=255 pct=0'0 crt=256'1 lcod 0'0 mlcod 0'0 active+clean finish_single_request calling complete_object with result={0~8192(8192)}
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - ECBackend::_read: offset: 0
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - ECBackend::_read: range offset: 0
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - ECBackend::_read: length: 128
DEBUG 2026-08-04 08:08:25,429 [shard 1:main] osd - ECBackend::_read: range length: 8192

Logs after changes:

DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::handle_rep_read_op: hoid=4:602f83fe:::foo:head requested=4096 len=4096
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::handle_rep_read_op: tid=35 attrs_to_read=0
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::handle_rep_read_reply: from=0(0) reply=ECSubReadReply(tid=35, attrs_read=0, omap_headers_read=0, omap_entries_read=0, omaps_complete=[])
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::handle_rep_read_reply: complete readop=ReadOp(tid=35, to_read={4:602f83fe:::foo:head=read_request_t(to_read=[0,8192,0], flags=0, shard_want_to_read={0:[0~4096],1:[0~4096]}, zeros_for_decode={1:[0~4096]}, shard_reads={}, want_attrs=0, want_omap_header=0, want_omap_keys=0, omap_read_from=, omap_max_bytes=0)}, complete={4:602f83fe:::foo:head=read_result_t(r=0, errors={}, noattrs, no_omap_header, no_omap_entries, omap_complete=0, buffers_read=shard_extent_map: ({0~4096}, maps={0:{0~4096(4096)}}), processed_read_requests={0:[0~4096]}, zero_length_reads={})}, priority=127, obj_to_source={4:602f83fe:::foo:head=0(0)}, source_to_obj={0(0)=4:602f83fe:::foo:head}, in_progress=, debug_log=READ_REQUEST[0(0)]->[0~4096]
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean complete_read_op completing ReadOp(tid=35, to_read={4:602f83fe:::foo:head=read_request_t(to_read=[0,8192,0], flags=0, shard_want_to_read={0:[0~4096],1:[0~4096]}, zeros_for_decode={1:[0~4096]}, shard_reads={}, want_attrs=0, want_omap_header=0, want_omap_keys=0, omap_read_from=, omap_max_bytes=0)}, complete={4:602f83fe:::foo:head=read_result_t(r=0, errors={}, noattrs, no_omap_header, no_omap_entries, omap_complete=0, buffers_read=shard_extent_map: ({0~4096}, maps={0:{0~4096(4096)}}), processed_read_requests={0:[0~4096]}, zero_length_reads={})}, priority=127, obj_to_source={4:602f83fe:::foo:head=0(0)}, source_to_obj={0(0)=4:602f83fe:::foo:head}, in_progress=, debug_log=READ_REQUEST[0(0)]->[0~4096]
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean finish_single_request completing hoid=4:602f83fe:::foo:head res=read_result_t(r=0, errors={}, noattrs, no_omap_header, no_omap_entries, omap_complete=0, buffers_read=shard_extent_map: ({0~4096}, maps={0:{0~4096(4096)}}), processed_read_requests={0:[0~4096]}, zero_length_reads={}) req=read_request_t(to_read=[0,8192,0], flags=0, shard_want_to_read={0:[0~4096],1:[0~4096]}, zeros_for_decode={1:[0~4096]}, shard_reads={}, want_attrs=0, want_omap_header=0, want_omap_keys=0, omap_read_from=, omap_max_bytes=0)
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean finish_single_request calling complete_object with result={0~8192(8192)}
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::_read: hoid=4:602f83fe:::foo:head offset=0
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::_read: hoid=4:602f83fe:::foo:head range_offset=0
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::_read: hoid=4:602f83fe:::foo:head length=128
DEBUG 2026-08-04 19:23:51,441 [shard 0:main] osd -  pg_epoch 25 pg[4.6s0( v 25'1 (0'0,25'1] local-lis/les=23/24 n=1 ec=23/23 lis/c=23/23 les/c/f=24/24/0 sis=23) [0,1,2]p0(0) r=0 lpr=23 pct=0'0 crt=25'1 lcod 0'0 mlcod 0'0 active+clean  ECBackend::_read: hoid=4:602f83fe:::foo:head range_length=8192

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.

This commit changes all trivial logging sites from using logger()
to using DEBUGDPP()/INFODPP(). This change will make the logs more
uniform across logging sites from ECCommon and ECBackend.

Signed-off-by: Shraddha Agrawal <[email protected]>
@shraddhaag
shraddhaag marked this pull request as ready for review August 5, 2026 04:47
@shraddhaag
shraddhaag requested a review from a team as a code owner August 5, 2026 04:47

@knrt10 knrt10 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.

LGTM overall, small NITs

Comment thread src/crimson/osd/ec_backend.cc Resolved
Comment thread src/crimson/osd/ec_backend.cc Resolved
Comment thread src/crimson/osd/ec_backend.cc Resolved
This commit adds hoid/tid to logs in key=value format such that
its easier to trace which object is the log referencing. This will
be very helpful in following logs and debugging.

Signed-off-by: Shraddha Agrawal <[email protected]>
@shraddhaag
shraddhaag force-pushed the wip-shraddhaag-debugdpp-ec branch from 2b96fdf to 907fe8f Compare August 5, 2026 06:20
@shraddhaag
shraddhaag requested a review from knrt10 August 5, 2026 06:22

@knrt10 knrt10 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.

+1, thanks

@Matan-B Matan-B added this to Crimson Aug 5, 2026
@Matan-B Matan-B moved this to Needs QA in Crimson Aug 5, 2026
@perezjosibm

perezjosibm commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor
$ PR=wip-perezjos-crimson-only-05-08-2026-PR70833
$ teuthology-suite -s crimson-rados -p 101 --force-priority -c $PR  -f debug  --filter-out rgw  --suite-branch main --suite-repo https://github.com/ceph/ceph.git

looks like an infra issue in sepia lab:
Screenshot 2026-08-06 at 10 52 18
will try again later today

@perezjosibm

Copy link
Copy Markdown
Contributor

I just tried and getting the same error, the build definitely exists 😭

@shraddhaag

Copy link
Copy Markdown
Contributor Author

@shraddhaag
shraddhaag merged commit e0826f7 into ceph:main Aug 8, 2026
7 checks passed
@perezjosibm perezjosibm moved this from QA in Progress to Merged (Main) in Crimson Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Merged (Main)

Development

Successfully merging this pull request may close these issues.

3 participants