jenkinsci / jenkinsci/ec2-plugin
SMBJ PacketReader thread leak in DirectTcpTransport
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 292
- Forks
- 709
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 4
Description
The plugin leaks SMBJ PacketReader threads when Windows agent connections close unexpectedly (EC2 termination, network failures, timeouts).
The root cause looks like a bug in SMBJ library, just reported at https://github.com/hierynomus/smbj/issues/882 but there are concerns about the project's maintenance:
- Last release: v0.14.0 (2024-12-09)
- Some PRs merged in early 2025 but not released
- Multiple 2025 issues without response (some question project is still alive)
We could consider pushing/contributing for a new release that includes a fix, or, if no other options, explore an ugly reflection-based workaround to access the thread and call stop, though this approach is admittedly a workaround.
If anyone has more experience with this SMB lib, your advice or input would be much appreciated before I continue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at DirectTcpTransport and review SMBJ issue #882 alongside the connection-close paths for EC2 termination, network failures, and timeouts. Reproduce an unexpected Windows agent disconnect and verify that PacketReader threads no longer leak; the issue does not name a test or a settled implementation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- cloud, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100