Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occasional "The process cannot access the file because it is being used by another process" on pod teardown on Windows 1.15.9 #89484

csb1582 opened this issue Mar 25, 2020 · 1 comment


Copy link

@csb1582 csb1582 commented Mar 25, 2020

What happened:
Windows Server 2019 running Kubernetes 1.15.9

Running deployment was updated, forcing creation of new pods. On pod teardown pod directory could not be deleted. As a result deployment rollout did not finish.

E0325 10:09:45.952766 5284 nestedpendingoperations.go:270] Operation for """ ("b84b370d-3439-41ed-9091-ec0d5cb70edb")" failed. No retries permitted until 2020-03-25 10:11:47.9527665 -0400 EDT m=+4297553.319146501 (durationBeforeRetry 2m2s). Error: "UnmountVolume.TearDown failed for volume "default-token-lzg9s" (UniqueName: "") pod "b84b370d-3439-41ed-9091-ec0d5cb70edb" (UID: "b84b370d-3439-41ed-9091-ec0d5cb70edb") : remove c:\var\lib\kubelet\pods\b84b370d-3439-41ed-9091-ec0d5cb70edb\volumes\\default-token-lzg9s: The process cannot access the file because it is being used by another process."

Manually restarting kubelet and kube-proxy released lock/fixed the issue

What you expected to happen:
Kubelet should release all locks before teardown.

Note this issue does not occur frequently. Maybe happens to 1 out of 50 deployment updates randomly

How to reproduce it (as minimally and precisely as possible):
I don't know

Anything else we need to know?:
Workaround is to not mount service token in pod, by setting following in Deployment spec

automountServiceAccountToken: false


  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
    On premise, VMware
  • OS (e.g: cat /etc/os-release):
    Windows Server 2019
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

This comment has been minimized.

Copy link

@csb1582 csb1582 commented Mar 25, 2020

/sig windows

@k8s-ci-robot k8s-ci-robot added sig/windows and removed needs-sig labels Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.