jenkinsci / jenkinsci/port-allocator-plugin
[JENKINS-34979] Port allocation duplicate on "Concurrent builds"
- Dominant language
- Java
- Stars
- 11
- Forks
- 34
- Avg merge
- 23h 26m
- Merged PRs (30d)
- 1
Description
When configuring a "Pooled TCP port", the pool assignment is not unique when the build is performed concurrently (see "Execute concurrent builds if necessary").
Never had an issue before and problem seems to be introduced after we updated to Jenkins 2.0.
Easy repro:
- create new job with "Pooled TCP port" and "Execute concurrent builds if necessary" options
- execute build multiple times
- see console output: same port is assigned multiple times
---
Originally reported by ricktw, imported from: Port allocation duplicate on "Concurrent builds"
andresrc
Raw content of original issue
When configuring a "Pooled TCP port", the pool assignment is not unique when the build is performed concurrently (see "Execute concurrent builds if necessary").
Never had an issue before and problem seems to be introduced after we updated to Jenkins 2.0.
Easy repro:
- create new job with "Pooled TCP port" and "Execute concurrent builds if necessary" options
- execute build multiple times
- see console output: same port is assigned multiple times
environment
```
Jenkins Version: 2.5
OS: Ubuntu
Guess it is introduced in Jenkins 2.0?
Was there a rewrite in how plugins are loaded when running concurrent? Its own classloader?
```
Contributor guide
Research direction
Start by reproducing the pooled TCP port allocation with concurrent builds in the port-allocator-plugin, using the configuration and steps in the issue. Trace the pooled port handling and verify that repeated concurrent builds receive unique ports; done means the console output no longer shows duplicate assignments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100