Docker Inside Docker oom_score_adj: invalid argument

1/25/2020

On Kubernetes, to build docker images, we use Docker Inside Docker (dind) where a docker daemon will be running as a privileged user

But some times times we have observed that the docker image creation will fail with the below error and I couldn't pin point the exact reason for this,

ERROR: Error writing header for "scripts": io: read/write on closed pipe
ERROR: Error writing tar: io: read/write on closed pipe
Removing temporary directory /tmp/s2i834345991
Removing directory '/tmp/s2i834345991'
Build failed ERROR: An error occurred: Error response from daemon: set shim OOM score: write /proc/9092/oom_score_adj: invalid argument: unknown

Based on docker documentation, by default oom_score_adj is set to -500, i.e the container can consume 50% of the memory, so am assuming that the OS/Kernel is killing the container when the memory usage exceeds 50% usage but I am not sure about it, because the exception says "Invalid Argument"

Did anyone faced this issue earlier and if yes please let us know the exact reason for the same, I went through many articles but couldn't conclude anything.

-- Rajiv
docker
kubernetes
openshift
s2i

0 Answers