-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Describe the bug
While troubleshooting and looking for the origin of a thread leak in Jenkins, I narrowed it down to leaked threads coming from the BaseClient. But due to the way Jenkins handled and cache the client.
That being said, the thread name did not make it easy to find the origin of the thread. Probably due to the fact that the supplied uses an anonymous class for which the getClass().getSimpleName()
is "empty" (confirmed in debug):
- https://github.com/fabric8io/kubernetes-client/blob/v7.4.0/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/Utils.java#L447C18-L447C55
- https://github.com/fabric8io/kubernetes-client/blob/v7.4.0/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/impl/BaseClient.java#L64-L79
This should be fix and those thread have a more meaningful prefix.
Fabric8 Kubernetes Client version
7.4.0
Steps to reproduce
- Initiate a BaseClient
- And execute a simple command through it
The client spawns threads named -XXXXXXXX-pool-XX-thread-XX
.
Expected behavior
BaseClient executor threads have a meaningful name prefix, such as KubernetesBaseClient-
or based on client URL.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.33
Environment
GKE
Fabric8 Kubernetes Client Logs
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels