We have been working on a port of Docker to powerpc 32 bit.
Using this port we can build docker images from a rootfs tarball and start containers with a running nginx and ssh. An interactive login with SSH into such a container works, shell commands can be executed, process can be inspected etc.
However, an interactive container without SSH using 'docker run -it' does not work: keystrokes for STDIN seem to propagate to the container, but the STDOUT does not immediately appear in the terminal. Only after the docker daemon is killed, the STDOUT of the container is flushed and appears in the terminal.
This behavior is consistently the same for commands that run for a short while ('ls /') and for commands that generate a stream of output ('find /').
Adding logging to the libgo runtime revealed that two goroutines are not properly scheduled (do not receive CPU cycles). These two goroutines implement the communication between runc and containerd-shim.
When the docker daemon is killed, the two goroutines suddenly receive CPU cycles. This explains why the STDOUT of the container is suddenly flushed after killing docker.
We have seen a few other scenarios where it looked like goroutines were not being executed, not receiving CPU cycles.
We have been investigating this problem for several weeks now. I am not sure that diving deeper in the golang / gccgo scheduler will bring a solution anytime soon.
It looks more like we are missing something fundamental.
Has anyone seen similar behavior?
What would be the best approach for investigation of this problem?