Skip to content

squid: log: concatenate thread names and print once per thread#61287

Merged
batrick merged 4 commits intoceph:squidfrom
batrick:wip-68926-squid
Apr 30, 2025
Merged

squid: log: concatenate thread names and print once per thread#61287
batrick merged 4 commits intoceph:squidfrom
batrick:wip-68926-squid

Conversation

@batrick
Copy link
Copy Markdown
Member

@batrick batrick commented Jan 9, 2025

backport tracker: https://tracker.ceph.com/issues/68926


backport of #60464
parent tracker: https://tracker.ceph.com/issues/68691

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

Fixes: 0be8d01
Fixes: https://tracker.ceph.com/issues/68691
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 1f40d0c)
This provides common ceph entrypoints for the pthread_[gs]name functions which
will also cache a thread_local copy. This also removes the pthread_t parameter
which precipitated the bug i50743.

Obviously, the overall goal here is to avoid system calls.

See-also: https://tracker.ceph.com/issues/50743
Fixes: 0be8d01
Fixes: https://tracker.ceph.com/issues/68691
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 7de5af5)

Conflicts:
	src/ceph_nvmeof_monitor_client.cc: not present
	src/mds/Beacon.cc: trivial
In general, a pthread implementation reuses thread ids routinely so the
circular_buffer is there to help us see what the thread name was historically
(capped at 4 entries).

However, to guard against this map from growing without bound, discard entries
that are more than a day old. This would happen if a thread logged an Entry and
has since disappeared for more than a day.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit bfe489e)
To be consistent and sensical.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a2a989a)
@batrick batrick requested review from a team as code owners January 9, 2025 16:18
@batrick batrick added this to the squid milestone Jan 9, 2025
@batrick
Copy link
Copy Markdown
Member Author

batrick commented Jan 9, 2025

jenkins test make check

@hkadam134
Copy link
Copy Markdown
Contributor

PR is under test - https://tracker.ceph.com/issues/70262

@hkadam134
Copy link
Copy Markdown
Contributor

No New Issues found,
QA Run Analysis - https://tracker.ceph.com/issues/70262#note-4
wiki page for existing Issues - https://tracker.ceph.com/issues/70262#note-5

PR is Tested and needs approval to merge.

@hkadam134
Copy link
Copy Markdown
Contributor

This PR requires Core and RGW Test coverage: Triggered runs here : https://tracker.ceph.com/issues/70262#note-8

Copy link
Copy Markdown
Member

@ljflores ljflores left a comment

Choose a reason for hiding this comment

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

@batrick batrick merged commit e36ca7b into ceph:squid Apr 30, 2025
@batrick batrick deleted the wip-68926-squid branch April 30, 2025 12:37
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