-
Notifications
You must be signed in to change notification settings - Fork 70
Runtime hangs after cycling instances with qemu-cc #910
Description
Description of problem
When using QEMU >= v2.9, I see cc-runtime hang when trying to start a container. This is usually observed when launching and exiting a couple of containers in a row. Observed with both qemu-cc, a local build of v2.9 and a local build of v2.10
On a clean/freshly booted system, I see it fail after 6th time running sudo docker run alpine sh
At the point of the hang, cc-runtime is executing, as well as the resulting QEMU instance. Relevant logs from journal included below. Looks like it is hanging when runtime is handling hotplug/QMP.
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info arguments="\"start 1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971\"" commit=a33e6bf56f7bfbb0497c08f4fd2f70dc06c9f816 name=cc-runtime source=runtime version=3.0.12
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"QMP\": {\"version\": {\"qemu\": {\"micro\": 0, \"minor\": 9, \"major\": 2}, \"package\": \"\"}, \"capabilities\": []}}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="QMP details" qmp-capabilities= qmp-major-version=2 qmp-micro-version=0 qmp-minor-version=9 source=virtcontainers subsystem=qemu
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"execute\":\"qmp_capabilities\"}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"return\": {}}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="VM started" pod-id=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971 source=virtcontainers subsystem=pod
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.661342209-08:00" level=info msg="client connected" client=3 name=cc-proxy pid=5528 source=proxy
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.661548505-08:00" level=info msg="AttachVM(containerId=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971)" client=3 name=cc-proxy pid=5528 source=proxy
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="Virtual endpoint unmarshalled [{{2aad7e72-782b-46d5-bf25-e0ee3fb9403d br0 {eth0 02:00:ca:fe:00:00 [172.17.0.2/16 eth0]} {tap0 02:42:ac:11:00:02 []} 1 [0xc42000e218 0xc42000e220 0xc42000e228 0xc42000e230 0xc42000e238 0xc42000e240 0xc42000e248 0xc42000e250] [0xc42000e258 0xc42000e260 0xc42000e268 0xc42000e270 0xc42000e278 0xc42000e280 0xc42000e288 0xc42000e290]} {{{15 1500 0 eth0 02:42:ac:11:00:02 up|broadcast|multicast 69699 16 0 <nil> 0xc4200ae540 0 <nil> ether <nil> up 0 0 0} veth} [172.17.0.2/16 eth0] [{Ifindex: 15 Dst: <nil> Src: <nil> Gw: 172.17.0.1 Flags: [] Table: 254} {Ifindex: 15 Dst: 172.17.0.0/16 Src: 172.17.0.2 Gw: <nil> Flags: [] Table: 254}] {[] [] []}} false virtual}]" source=virtcontainers
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.664202493-08:00" level=info msg="hyper(cmd=\\\"startpod\\\", data=\\\"{\\\\\\\"hostname\\\\\\\":\\\\\\\"1d472f141546\\\\\\\",\\\\\\\"interfaces\\\\\\\":[{\\\\\\\"newDeviceName\\\\\\\":\\\\\\\"eth0\\\\\\\",\\\\\\\"ipAddresses\\\\\\\":[{\\\\\\\"ipAddress\\\\\\\":\\\\\\\"172.17.0.2\\\\\\\",\\\\\\\"netMask\\\\\\\":\\\\\\\"16\\\\\\\"}],\\\\\\\"mtu\\\\\\\":1500,\\\\\\\"macAddr\\\\\\\":\\\\\\\"02:42:ac:11:00:02\\\\\\\"}],\\\\\\\"routes\\\\\\\":[{\\\\\\\"dest\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"gateway\\\\\\\":\\\\\\\"172.17.0.1\\\\\\\",\\\\\\\"device\\\\\\\":\\\\\\\"eth0\\\\\\\"},{\\\\\\\"dest\\\\\\\":\\\\\\\"172.17.0.0/16\\\\\\\",\\\\\\\"device\\\\\\\":\\\\\\\"eth0\\\\\\\"}],\\\\\\\"shareDir\\\\\\\":\\\\\\\"hyperShared\\\\\\\"}\\\")" client=3 name=cc-proxy pid=5528 source=proxy
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.66742216-08:00" level=info msg="client connected" client=4 name=cc-proxy pid=5528 source=proxy
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.667536239-08:00" level=info msg="AttachVM(containerId=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971)" client=4 name=cc-proxy pid=5528 source=proxy
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="device details" container-id=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971 device-major=253 device-minor=1 mount-point=/var/lib/docker/devicemapper/mnt/15149df06562532596a3a43d2b48027b666f84d16d9ca4fa0ca145ffa73cba88 pod-id=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971 source=virtcontainers subsystem=container
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="Block device detected" container-id=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971 device-path="/dev/mapper/docker-8:1-18612488-15149df06562532596a3a43d2b48027b666f84d16d9ca4fa0ca145ffa73cba88" fs-type=xfs pod-id=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971 source=virtcontainers subsystem=container
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"QMP\": {\"version\": {\"qemu\": {\"micro\": 0, \"minor\": 9, \"major\": 2}, \"package\": \"\"}, \"capabilities\": []}}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"execute\":\"qmp_capabilities\"}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"return\": {}}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"arguments\":{\"driver\":\"raw\",\"file\":{\"driver\":\"file\",\"filename\":\"/dev/mapper/docker-8:1-18612488-15149df06562532596a3a43d2b48027b666f84d16d9ca4fa0ca145ffa73cba88\"},\"node-name\":\"drive-1d472f141546f6b034fd0dddc\"},\"execute\":\"blockdev-add\"}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"return\": {}}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"arguments\":{\"addr\":\"0x1\",\"bus\":\"pci-bridge-0\",\"drive\":\"drive-1d472f141546f6b034fd0dddc\",\"driver\":\"virtio-blk-pci\",\"id\":\"virtio-drive-1d472f141546f6b034fd0dddc\"},\"execute\":\"device_add\"}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-runtime[5536]: time="2018-01-09T11:50:38-08:00" level=info msg="{\"return\": {}}" source=virtcontainers subsystem=qmp
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.686221641-08:00" level=info msg="hyper(cmd=\\\"newcontainer\\\", data=\\\"{\\\\\\\"id\\\\\\\":\\\\\\\"1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971\\\\\\\",\\\\\\\"rootfs\\\\\\\":\\\\\\\"rootfs\\\\\\\",\\\\\\\"fstype\\\\\\\":\\\\\\\"xfs\\\\\\\",\\\\\\\"image\\\\\\\":\\\\\\\"vda\\\\\\\",\\\\\\\"fsmap\\\\\\\":[{\\\\\\\"source\\\\\\\":\\\\\\\"1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971-28cd48f9f2cf199a-resolv.conf\\\\\\\",\\\\\\\"path\\\\\\\":\\\\\\\"/etc/resolv.conf\\\\\\\",\\\\\\\"readOnly\\\\\\\":false,\\\\\\\"dockerVolume\\\\\\\":false,\\\\\\\"absolutePath\\\\\\\":false},{\\\\\\\"source\\\\\\\":\\\\\\\"1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971-19bf32dfaed7f8e8-hostname\\\\\\\",\\\\\\\"path\\\\\\\":\\\\\\\"/etc/hostname\\\\\\\",\\\\\\\"readOnly\\\\\\\":false,\\\\\\\"dockerVolume\\\\\\\":false,\\\\\\\"absolutePath\\\\\\\":false},{\\\\\\\"source\\\\\\\":\\\\\\\"1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971-1e48e5a47a27a786-hosts\\\\\\\",\\\\\\\"path\\\\\\\":\\\\\\\"/etc/hosts\\\\\\\",\\\\\\\"readOnly\\\\\\\":false,\\\\\\\"dockerVolume\\\\\\\":false,\\\\\\\"absolutePath\\\\\\\":false}],\\\\\\\"process\\\\\\\":{\\\\\\\"user\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"group\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"additionalGroups\\\\\\\":[\\\\\\\"0\\\\\\\",\\\\\\\"1\\\\\\\",\\\\\\\"2\\\\\\\",\\\\\\\"3\\\\\\\",\\\\\\\"4\\\\\\\",\\\\\\\"6\\\\\\\",\\\\\\\"10\\\\\\\",\\\\\\\"11\\\\\\\",\\\\\\\"20\\\\\\\",\\\\\\\"26\\\\\\\",\\\\\\\"27\\\\\\\"],\\\\\\\"terminal\\\\\\\":false,\\\\\\\"args\\\\\\\":[\\\\\\\"sh\\\\\\\"],\\\\\\\"envs\\\\\\\":[{\\\\\\\"env\\\\\\\":\\\\\\\"PATH\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\\\\\"},{\\\\\\\"env\\\\\\\":\\\\\\\"HOSTNAME\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"1d472f141546\\\\\\\"}],\\\\\\\"workdir\\\\\\\":\\\\\\\"/\\\\\\\",\\\\\\\"noNewPrivileges\\\\\\\":false},\\\\\\\"restartPolicy\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"initialize\\\\\\\":false,\\\\\\\"systemMountsInfo\\\\\\\":{\\\\\\\"bindMountDev\\\\\\\":false,\\\\\\\"devShmSize\\\\\\\":0}}\\\")" client=4 name=cc-proxy pid=5528 source=proxy
Jan 09 11:50:38 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:50:38.6869108-08:00" level=info msg="waiting for shim to register itself with token byASJnNaM4SjSubrc2cBbiLzZAfQ_KIfw90z6RfenTA= (timeout 30s)" name=cc-proxy pid=5528 section=io source=proxy vm=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971
Jan 09 11:52:23 eernstworkstation cc-proxy[5528]: time="2018-01-09T11:52:23.966084445-08:00" level=debug msg="[ 105.652643] systemd-journald[154]: Sent WATCHDOG=1 notification." name=cc-proxy pid=5528 source=qemu vm=1d472f141546f6b034fd0dddc126104d1a495144f7dc4cc4a4d37e9df82a5971
cc-env details;
./cc-runtime cc-env
[Meta]
Version = "1.0.6"
[Runtime]
Debug = false
[Runtime.Version]
Semver = "3.0.12"
Commit = "a33e6bf56f7bfbb0497c08f4fd2f70dc06c9f816"
OCI = "1.0.1"
[Runtime.Config]
Path = "/etc/clear-containers/configuration.toml"
[Hypervisor]
MachineType = "pc"
Version = "QEMU emulator version 2.9.0\nCopyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers"
Path = "/usr/bin/qemu-cc-system-x86_64"
Debug = false
[Image]
Path = "/usr/share/clear-containers/clear-19790-containers.img"
[Kernel]
Path = "/usr/share/clear-containers/vmlinuz-4.9.60-82.container"
Parameters = ""
[Proxy]
Type = "ccProxy"
Version = "Version: 3.0.12-bb85f104f886239198ece88552eb604c05e2c6dd"
Path = "/usr/libexec/clear-containers/cc-proxy"
Debug = true
[Shim]
Type = "ccShim"
Version = "shim version: 3.0.12 (commit: d01f9a71056fc005a98fbaeba733c7b3b07874f6)"
Path = "/usr/libexec/clear-containers/cc-shim"
Debug = true
[Agent]
Type = "hyperstart"
Version = "<>"
[Host]
Kernel = "4.8.0-36-generic"
CCCapable = true
[Host.Distro]
Name = "Ubuntu"
Version = "16.04"
[Host.CPU]
Vendor = "GenuineIntel"
Model = "Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz"