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

Race when delete bundle. #802

Closed
Random-Liu opened this issue May 4, 2017 · 13 comments
Closed

Race when delete bundle. #802

Random-Liu opened this issue May 4, 2017 · 13 comments
Labels

Comments

@Random-Liu
Copy link
Member

Random-Liu commented May 4, 2017

$ ctr run -id busybox-2 -t docker.io/library/busybox:latest
/ # exit
$ ctr run -id busybox-2 -t docker.io/library/busybox:latest
/ # exit
ctr: rpc error: code = 2 desc = remove /run/containerd/linux/busybox-2/rootfs: device or resource busy

When Delete a container, it quite frequently fails to delete the bundle with error device or resource busy.
https://github.com/containerd/containerd/blob/master/linux/runtime.go#L140-L144

I'm using naive snapshot plugin. This is very easy to reproduce in my environment, not sure about others.

@miaoyq
Copy link
Member

miaoyq commented May 6, 2017

I have a similar issue.
Frequently create and exit containers, sometimes the "ctr run" hangs with error printing ERRO[0000] console resize error="rpc error: code = 2 desc = bad file descriptor, as follow:

# ctr run --id mytest -t docker.io/library/busybox:latest
/ # exit
# ctr run --id mytest -t docker.io/library/busybox:latest
/ # exit
# ctr run --id mytest -t docker.io/library/busybox:latest
ERRO[0000] console resize                                error="rpc error: code = 2 desc = bad file descriptor"
******block here******

# ps -ef |grep mytest
root     10762  7602  0 11:27 pts/1    00:00:00 ctr run --id mytest -t docker.io/library/busybox:latest
root     10803 10770  0 11:27 pts/5    00:00:00 runc --log /run/containerd/linux/mytest/log.json --log-format json start mytest
root     10812 10499  0 11:27 pts/10   00:00:00 grep --color=auto mytest

The status is STOPPED

# ctr ls
ID       PID       STATUS
mytest   10787     STOPPED

@crosbymichael
Copy link
Member

@Random-Liu you are using the shim right?

@crosbymichael
Copy link
Member

Also how did you run with naive? Are you on OSX or something? Running on linux?

@Random-Liu
Copy link
Member Author

Random-Liu commented May 8, 2017

@crosbymichael Yeah, I'm using the shim. And running on linux:

$ uname -a
Linux XXXX 4.4.0-75-generic #96~14.04.1-Ubuntu SMP Thu Apr 20 11:06:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I'm testing on my own desktop, which doesn't have overlay working. So I use the naive plugin.

@crosbymichael
Copy link
Member

@miaoyq are you using naive also?

@crosbymichael
Copy link
Member

@Random-Liu outside of the naive issue that I'm looking into, how do you not have overlay working on a 4.4 ubuntu kernel? Without having devmapper in containerd, naive is basically the worst option you can pick, its not even compiled into containerd on linux and is no where close to anything that can or should be used in a production/dev setup.

@Random-Liu
Copy link
Member Author

Random-Liu commented May 9, 2017

@Random-Liu outside of the naive issue that I'm looking into, how do you not have overlay working on a 4.4 ubuntu kernel? Without having devmapper in containerd, naive is basically the worst option you can pick, its not even compiled into containerd on linux and is no where close to anything that can or should be used in a production/dev setup.

It's a google internal distribution, I've tried that containerd with overlay doesn't work. We won't use naive in the production environment, this is only for my own trial.

Post the issue here because this may be a potential bug.

@miaoyq
Copy link
Member

miaoyq commented May 9, 2017

@crosbymichael Yeah, I'm running containerd like this:

containerd --log-level debug

Running on linux also:

Linux ubuntu 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

@Random-Liu
Copy link
Member Author

@crosbymichael It's weird that I could not reproduce this anymore... Even with the version I was using...

@miaoyq Do you still have this issue?

@miaoyq
Copy link
Member

miaoyq commented May 10, 2017

@Random-Liu Yes, I still can reproduce this issue with the version #819

@crosbymichael
Copy link
Member

@miaoyq your error message is totally different and is a separate issue that has to do with IO, not with an EBUSY on the filesystem.

@miaoyq
Copy link
Member

miaoyq commented May 11, 2017

@crosbymichael Indeed, I will create a new issue for it.

@Random-Liu
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants