containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

after shim connect failure, cannot stop container via CRICTL stop #671

Closed egernst closed 6 years ago

egernst commented 6 years ago

issue observed from Cheng Xu:

When “crictl attach” to a fedora container, I tried to “yum install” some package. It hangs, which makes sense since there might be a network connection issue on that machine. But the problem is, after a while I see below error, and after that, “crictl stop” won’t be able to stop the container. Any idea? The repro is pretty consistent, I hit this when demoing last week on my office machine, and also today on an azureVM. Thanks.

handle_proxy_response:616:Error response received from proxy at /run/virtcontainers/pods/e6ee288a536728fdc06399be7555f951627ec71234a12f4b92ae9796fd593d91/proxy.sock: {"msg":"vm: unknown token yEXx89gDGN_6jce7V9g-xrDB706CpuMSjJYm1L4SKYQ="} /usr/libexec/clear-containers/cc-shim: Shim received an error in responseto ConnectShim command,exiting

egernst commented 6 years ago

cc/ @sboeuf @jodh-intel @jcvenegas

sboeuf commented 6 years ago

Nothing in particular comes to mind here since this could be caused by a bunch of different reasons. We'd need to get someone investigating this, being able to reproduce the behavior and debug.

egernst commented 6 years ago

cc/ @chenxumsft

amshinde commented 6 years ago

I'd like to know what storage driver is being used here. We have had issues with yum and 9pfs before. cc @devimc

chenxumsft commented 6 years ago

the crio daemon was configured to use "overlay" as storage driver.. but I guess 9pfs is used for container rootfs?

egernst commented 6 years ago

@chenxumsft - correct. As a quick test, can you change the storage driver to be devicemapper based?

chenxumsft commented 6 years ago

It worked by changing crio to use devicemapper as storage-driver. Thanks. Earlier I ever tried using devicemapper but hit a failure in starting container. but today StartContainer seems working..

amshinde commented 6 years ago

@chenxumsft Glad to hear devicemapper worked out. @egernst Another of our 9pfs issues, I think qemu 2.9 carries a patch that fixes the yum issue iirc. @devimc Can you confirm?

devimc commented 6 years ago

@amshinde that's right