### What happened?

We found that the kubelet memory kept increasing，and we exported the pprof of the goroutine. The grpc goroutine leaks, causing memory leakage.
![image](https://github.com/kubernetes/kubernetes/assets/54977497/76a1d622-2129-49e0-bd4c-79b6bad786b1)
We found out that the reason was because one of the pluginThe following code causes this situation. One client is lost.s kept registering twice and using the same name for both.
https://github.com/kubernetes/kubernetes/blob/1dc30bf90fd6a729d226b4e942118110b0a73e65/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go#L90-L96
When two requests are registered at the same time, only one client is reserved in s.clients.
https://github.com/kubernetes/kubernetes/blob/1dc30bf90fd6a729d226b4e942118110b0a73e65/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go#L106-L117
Therefore, after the c.Run () method in the runClient method is executed, s.getClient obtains only one registered client. As a result, the c.grpc.Close () method is not invoked, causing memory and coroutine leakage.


### What did you expect to happen?

Even in this case, kubelet should not leak memory.

### How can we reproduce it (as minimally and precisely as possible)?

1、The plug-in is registered every 5 seconds and two registration requests are sent at the same time.
2、The kubelet memory usage keeps increasing.

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# 1.28
```

</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>

Kubelet memory leak when a plugin is registered twice
This is a GitHub Issue
repo:kubernetes
owner:kubernetes
Title : Kubelet memory leak when a plugin is registered twice
Issue date:

--- start body ---
### What happened?

We found that the kubelet memory kept increasing，and we exported the pprof of the goroutine. The grpc goroutine leaks, causing memory leakage.
![image](https://github.com/kubernetes/kubernetes/assets/54977497/76a1d622-2129-49e0-bd4c-79b6bad786b1)
We found out that the reason was because one of the pluginThe following code causes this situation. One client is lost.s kept registering twice and using the same name for both.
https://github.com/kubernetes/kubernetes/blob/1dc30bf90fd6a729d226b4e942118110b0a73e65/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go#L90-L96
When two requests are registered at the same time, only one client is reserved in s.clients.
https://github.com/kubernetes/kubernetes/blob/1dc30bf90fd6a729d226b4e942118110b0a73e65/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go#L106-L117
Therefore, after the c.Run () method in the runClient method is executed, s.getClient obtains only one registered client. As a result, the c.grpc.Close () method is not invoked, causing memory and coroutine leakage.


### What did you expect to happen?

Even in this case, kubelet should not leak memory.

### How can we reproduce it (as minimally and precisely as possible)?

1、The plug-in is registered every 5 seconds and two registration requests are sent at the same time.
2、The kubelet memory usage keeps increasing.

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# 1.28
```

</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>

--- end body ---
