Skip to content

deps: update go-plugin#27885

Merged
tgross merged 1 commit into
mainfrom
deps-go-plugin
May 1, 2026
Merged

deps: update go-plugin#27885
tgross merged 1 commit into
mainfrom
deps-go-plugin

Conversation

@tgross
Copy link
Copy Markdown
Member

@tgross tgross commented Apr 29, 2026

When Nomad clients built on Go >=1.23 are restarted, the go-plugin client starts leaking a pidfd file handle 1/sec when polling for the plugin server. Long-term we should look at this polling behavior in more detail in the library because the pidfd may let us track the plugin status without polling. But in the meantime the leaking pidfd has been fixed upstream and we should pull that in.

Ref: hashicorp/go-plugin#378
Fixes: #27847

Testing and Reproduction Steps

Run any job and then restart the client agent. (Note this requires running not-in--dev mode.) Using this little script:

#!/usr/bin/env bash

while :
do
    ls /proc/$1/fd/ | wc -l
    sleep 1
done

We see that before the patch, the number of open file handles increases after restarting Nomad. After the patch, it does not.

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation n/a

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

@tgross tgross marked this pull request as ready for review April 29, 2026 12:37
@tgross tgross requested review from a team as code owners April 29, 2026 12:37
@tgross tgross added type/bug backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/2.0.x backport to 2.0.x release line labels Apr 29, 2026
@tgross tgross requested review from jrasell and mismithhisler April 29, 2026 12:38
jrasell
jrasell previously approved these changes Apr 29, 2026
Copy link
Copy Markdown
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @tgross!

When Nomad clients built on Go >=1.23 are restarted, the go-plugin client starts
leaking a pidfd file handle 1/sec when polling for the plugin server. Long-term
we should look at this polling behavior in more detail in the library because
the pidfd may let us track the plugin status without polling. But in the
meantime the leaking pidfd has been fixed upstream and we should pull that in.

Ref: hashicorp/go-plugin#378
Fixes: #27847
@tgross
Copy link
Copy Markdown
Member Author

tgross commented Apr 29, 2026

Oops, forgot to go mod tidy there. Fixed

@tgross tgross merged commit d922fcd into main May 1, 2026
37 checks passed
@tgross tgross deleted the deps-go-plugin branch May 1, 2026 19:54
@tgross tgross added backport/ent/1.11.x+ent backport to 1.11.x+ent release line and removed backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent labels May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/ent/1.11.x+ent backport to 1.11.x+ent release line backport/2.0.x backport to 2.0.x release line theme/plugin type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nomad opening a large number of file descriptors to its logging sub-processes when log collection is enabled

2 participants