Skip to content

Conversation

@WRABZY
Copy link

@WRABZY WRABZY commented Jan 24, 2026

Main problem: The fetch goroutine in some cases ends with a sleep and freezes all allocated objects in its runtime context, even if the cancelChannel was triggered.

This fix is essentially a follow-up to PR 1644. That PR fixed the goroutine leak for read requests, but the issue still persists for write requests. This fix applies the same pattern already used for read requests in PR 1644 to the write requests.

Reproduction of the most severe case:

  • The Vault agent config field exit_after_auth must be false.
  • Set TokenTtl in the agent auth engine to a small value (like 10s).
  • For the template section in the agent config: secrets such as PKI certificates should be used, the retrieval of which is performed via a POST request with data in the request body and has a long validity period.

Observed behavior: Every time the agent renews its token, we will see growth in newly allocated memory. This growth is proportional to the size of the non-leased secrets and their quantity in the Vault agent template config section.

@WRABZY WRABZY requested a review from a team as a code owner January 24, 2026 11:02
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Jan 24, 2026

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant