Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16693 telemetry: Avoid race between init/read #15306

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

mjmac
Copy link
Contributor

@mjmac mjmac commented Oct 12, 2024

In rare cases, a reader may attempt to access a telemetry
node after it has been added to the tree, but before it
has been fully initialized. Use an atomic to prevent
reads before the initialization has completed. Unlucky
readers will get a -DER_AGAIN instead of crashing.

Features: telemetry
Required-githooks: true
Change-Id: I12281a7db7ef70d5f827547af1233b7a6619ae6d
Signed-off-by: Michael MacDonald [email protected]

@mjmac mjmac requested a review from a team as a code owner October 12, 2024 17:14
Copy link

Ticket title is 'Race between add_metric() and d_tm_get_* causes segfaults'
Status is 'In Review'
Errors are Unknown component
https://daosio.atlassian.net/browse/DAOS-16693

In rare cases, a reader may attempt to access a telemetry
node after it has been added to the tree, but before it
has been fully initialized. Use an atomic to prevent
reads before the initialization has completed. Readers
will instead get a -DER_AGAIN instead of crashing.

Features: telemetry
Required-githooks: true
Change-Id: I12281a7db7ef70d5f827547af1233b7a6619ae6d
Signed-off-by: Michael MacDonald <[email protected]>
@mjmac mjmac requested review from a team as code owners October 13, 2024 14:03
@mjmac mjmac self-assigned this Oct 14, 2024
@mjmac mjmac requested a review from kjacque October 14, 2024 13:47
@kjacque
Copy link
Contributor

kjacque commented Oct 15, 2024

IMO this is a good candidate for backport to 2.6.x.

@mjmac mjmac merged commit 7c93b69 into master Oct 15, 2024
54 of 57 checks passed
@mjmac mjmac deleted the mjmac/DAOS-16693 branch October 15, 2024 17:43
mjmac added a commit that referenced this pull request Oct 15, 2024
In rare cases, a reader may attempt to access a telemetry
node after it has been added to the tree, but before it
has been fully initialized. Use an atomic to prevent
reads before the initialization has completed. Unlucky
readers will get a -DER_AGAIN instead of crashing.

Signed-off-by: Michael MacDonald <[email protected]>
jolivier23 pushed a commit that referenced this pull request Oct 22, 2024
In rare cases, a reader may attempt to access a telemetry
node after it has been added to the tree, but before it
has been fully initialized. Use an atomic to prevent
reads before the initialization has completed. Unlucky
readers will get a -DER_AGAIN instead of crashing.

Signed-off-by: Michael MacDonald <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants