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

Fix http client segfault in metrics_reporter #21579

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented Jul 23, 2024

In case of exceptions, destroying the client may not be safe because the underlying output stream may not be fully flushed.

An alternative fix would be to ensure that http::client can always be destroyed if no method calls are in progress, but that seems complicated and other usage sites seem to follow the convention of always stopping it anyway.

Fixes https://github.com/redpanda-data/core-internal/issues/1323
Fixes https://github.com/redpanda-data/core-internal/issues/1325

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

@vbotbuildovich
Copy link
Collaborator

dotnwat
dotnwat previously approved these changes Jul 23, 2024
Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

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

lgtm. does this close a core internal ticket?

@dotnwat dotnwat requested a review from travisdowns July 23, 2024 17:46
ztlpn added 2 commits July 23, 2024 22:20
In case of exceptions, destroying the client may not be safe because the
underlying output stream may not be fully flushed.
It just calls client->stop() (which will make the client unusable and
we need to call anyway before the client is destroyed), so remove it
to avoid confusion.
@ztlpn ztlpn merged commit 332d1d3 into redpanda-data:dev Jul 24, 2024
20 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v24.2.x

@vbotbuildovich
Copy link
Collaborator

/backport v24.1.x

@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

@vbotbuildovich
Copy link
Collaborator

Failed to create a backport PR to v23.3.x branch. I tried:

git remote add upstream https://github.com/redpanda-data/redpanda.git
git fetch --all
git checkout -b backport-pr-21579-v23.3.x-814 remotes/upstream/v23.3.x
git cherry-pick -x 31f127ccd297a9c46c307a8b56358d44b16824c7 35fa28ba002a4511b33991099fc5d488a65a1a1e 59a42de66f09b51593197d043087e687ce4bf37b

Workflow run logs.

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.

5 participants