-
Notifications
You must be signed in to change notification settings - Fork 147
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
Launching system containers preloaded with lots of inner containers may lead to Sysbox gRPC timeouts #176
Comments
Hi @longzmkm, thanks for giving Sysbox a try.
gRPC timeouts are not normal, so something is off. Some questions:
Thanks! |
Thanks! |
Thanks @longzmkm. From the sysbox-mgr log, I can see that the sysbox manager was terminated by something/someone:
Thus, I suspect that the cause of the gRPC timeout you reported earlier is that the sysbox-mgr is not active at the time you are launching the large container (i.e., sysbox-runc sends a gRPC to the sysbox-mgr, but the sysbox-mgr never responds because it was previously killed). The next question is to figure out what killed the sysbox-mgr. Some suggestions:
Thanks again. |
Jan 05 03:39:18 student dockerd[1456]: time="2021-01-05T03:39:18.982169370Z" level=info msg="ignoring event" container=23303cf4c75fc5bcca71fadc3517c0259f3546e6bb23c61f7260251081bca4d1 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
|
No, that won't show much because Docker only knows that a container failed to deploy. What we need is the systemd journal log (e.g.,
Got it. Have you tried restarting Sysbox ( This is a bit tricky to debug, because something is killing sysbox-mgr in your system (leading to the gRPC timeout). In other words, it's not a bug in sysbox per se that it's causing the problem, but possibly some system constraint that sysbox is exceeding and thus causing it to be terminated. Is the And finally: can you provide some info about your host (# CPUs, RAM size, Thanks again! |
i modify images name sysbox-test i use Microsoft vm newland@student:~$ cat /proc/cpuinfo processor : 1 processor : 2 processor : 3 newland@student:~$ grep MemTotal /proc/meminfo Thanks again! |
Please let me know what you need |
Hi @longzmkm, thanks for providing the Docker image. I was able to repro easily on my side, I am investigating more right now. |
How was the I ask because I can see that the inner container images seem to be corrupted. For example, here are the contents of the container's
This appears to be causing problems for Sysbox (though I need to confirm). Also: I see the inner container images are on Thanks. |
Yes, it is. This causes Sysbox to reports the following errors:
However, this is not the cause of the gRPC timeout. The gRPC timeout is due to the fact that the image size is so large that Sysbox is having trouble dealing with it. More specifically, when a container image that is preloaded with inner containers is launched, Sysbox has to copy those inner container images to a host dir it controls ( This copy is taking a long time with this large container image on your fairly small machine. In a VM of the same size, I checked that this copy takes ~ 1 min. I suspect it's because your image has a lot of files inside the I don't have a good solution at this point. Some suggestions for a workaround would be:
I am sorry that I don't have a "real solution" at this time, only workarounds. The real solution is to avoid the copy I mentioned above; we have some ideas on how to do this but we won't be there for some time. |
@ctalledo Thank you for your advice. I'll give it a try, |
Closing (issue is stale, a work-around was provided). |
newland@student:
$ docker images$ docker run --runtime=sysbox-runc -d -p 10004:22 -p 10005:20805 -p 10006:20905 --name test test:latestREPOSITORY TAG IMAGE ID CREATED SIZE
test latest c68f9e9b046c 10 hours ago 4.24GB
dockerd dind fafe8522f3dc 14 hours ago 978MB
docker dind 8d54f09a2b77 2 weeks ago 256MB
alpine latest 389fef711851 2 weeks ago 5.58MB
newland@student:
1eeef69975b981878a24ccd058b7ef58094f3085d790dd5a120723ff27049e4c
docker: Error response from daemon: OCI runtime create failed: error in the container spec: invalid mount config: failed to request mounts from sysbox-mgr: failed to invoke ReqMounts via grpc: rpc error: code = DeadlineExceeded desc = context deadline exceeded: unknown.
newland@student:
$ docker ps -a$ docker start 1eeef69975b9CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1eeef69975b9 test:latest "run.sh" 4 minutes ago Created 0.0.0.0:10004->22/tcp, 0.0.0.0:10005->20805/tcp, 0.0.0.0:10006->20905/tcp test
newland@student:
1eeef69975b9
newland@student:
$ docker logs -f 1eeef69975b9$time="2021-01-05T01:30:04.047934424Z" level=info msg="Starting up"
time="2021-01-05T01:30:04.108841021Z" level=info msg="libcontainerd: started new containerd process" pid=82
time="2021-01-05T01:30:04.108923121Z" level=info msg="parsed scheme: "unix"" module=grpc
time="2021-01-05T01:30:04.108938621Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
time="2021-01-05T01:30:04.108991221Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] }" module=grpc
time="2021-01-05T01:30:04.109026821Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
time="2021-01-05T01:30:04.693753529Z" level=info msg="starting containerd" revision=ea765aba0d05254012b0b9e595e995c09186427f version=v1.3.9
time="2021-01-05T01:30:04.726213974Z" level=info msg="loading plugin "io.containerd.content.v1.content"..." type=io.containerd.content.v1
time="2021-01-05T01:30:04.726610774Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.727539772Z" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.btrfs"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (shiftfs) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.727623172Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.devmapper"..." type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.727686072Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
time="2021-01-05T01:30:04.727708772Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.aufs"..." type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.729167069Z" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.aufs"..." error="modprobe aufs failed: "modprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1: skip plugin" type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.729197769Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.native"..." type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.729669169Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.729921068Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.730157868Z" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.zfs"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
time="2021-01-05T01:30:04.730205968Z" level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." type=io.containerd.metadata.v1
time="2021-01-05T01:30:04.730271767Z" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
time="2021-01-05T01:30:04.730299267Z" level=info msg="metadata content store policy set" policy=shared
time="2021-01-05T01:30:04.744942443Z" level=info msg="loading plugin "io.containerd.differ.v1.walking"..." type=io.containerd.differ.v1
time="2021-01-05T01:30:04.745004543Z" level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." type=io.containerd.gc.v1
time="2021-01-05T01:30:04.745072242Z" level=info msg="loading plugin "io.containerd.service.v1.containers-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745105242Z" level=info msg="loading plugin "io.containerd.service.v1.content-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745135942Z" level=info msg="loading plugin "io.containerd.service.v1.diff-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745175942Z" level=info msg="loading plugin "io.containerd.service.v1.images-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745200742Z" level=info msg="loading plugin "io.containerd.service.v1.leases-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745221942Z" level=info msg="loading plugin "io.containerd.service.v1.namespaces-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745241842Z" level=info msg="loading plugin "io.containerd.service.v1.snapshots-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.745262742Z" level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." type=io.containerd.runtime.v1
time="2021-01-05T01:30:04.746095041Z" level=info msg="loading plugin "io.containerd.runtime.v2.task"..." type=io.containerd.runtime.v2
time="2021-01-05T01:30:04.746333040Z" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." type=io.containerd.monitor.v1
time="2021-01-05T01:30:04.746855539Z" level=info msg="loading plugin "io.containerd.service.v1.tasks-service"..." type=io.containerd.service.v1
time="2021-01-05T01:30:04.746915239Z" level=info msg="loading plugin "io.containerd.internal.v1.restart"..." type=io.containerd.internal.v1
time="2021-01-05T01:30:04.746973339Z" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747013639Z" level=info msg="loading plugin "io.containerd.grpc.v1.content"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747038839Z" level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747076939Z" level=info msg="loading plugin "io.containerd.grpc.v1.events"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747098539Z" level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747124839Z" level=info msg="loading plugin "io.containerd.grpc.v1.images"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747181939Z" level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747239039Z" level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747266039Z" level=info msg="loading plugin "io.containerd.internal.v1.opt"..." type=io.containerd.internal.v1
time="2021-01-05T01:30:04.747713238Z" level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747738838Z" level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747756038Z" level=info msg="loading plugin "io.containerd.grpc.v1.version"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.747782538Z" level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." type=io.containerd.grpc.v1
time="2021-01-05T01:30:04.769498801Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock
time="2021-01-05T01:30:04.769676701Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
time="2021-01-05T01:30:04.769789501Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock
time="2021-01-05T01:30:04.769813700Z" level=info msg="containerd successfully booted in 0.078494s"
time="2021-01-05T01:30:04.990579626Z" level=info msg="parsed scheme: "unix"" module=grpc
time="2021-01-05T01:30:04.990612726Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
time="2021-01-05T01:30:04.990630726Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] }" module=grpc
time="2021-01-05T01:30:04.990640326Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
time="2021-01-05T01:30:04.992267723Z" level=info msg="parsed scheme: "unix"" module=grpc
time="2021-01-05T01:30:04.992316023Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
time="2021-01-05T01:30:04.992340223Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] }" module=grpc
time="2021-01-05T01:30:04.992357023Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
time="2021-01-05T01:30:04.994839119Z" level=error msg="AUFS cannot be used in non-init user namespace" storage-driver=aufs
time="2021-01-05T01:30:04.994884219Z" level=error msg="[graphdriver] prior storage driver aufs failed: driver not supported"
time="2021-01-05T01:30:04.995595018Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
time="2021-01-05T01:30:04.995596718Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
failed to start daemon: error initializing graphdriver: driver not supported
newland@student:
The text was updated successfully, but these errors were encountered: