Repository navigation
Description
We've been seeing some extremely mysterious intermittent failures on the cmake turing build
docker run --volume=/tmpfs/src/github/iree:/tmpfs/src/github/iree --workdir=/tmpfs/src/github/iree --rm --user=1003:1004 --volume=/tmpfs/fake_etc/group:/etc/group:ro --volume=/tmpfs/fake_etc/passwd:/etc/passwd:ro --volume=/tmpfs/fake_home:/home/kbuilder --volume=/home/kbuilder/.config/gcloud:/home/kbuilder/.config/gcloud:ro --gpus all gcr.io/iree-oss/cmake-python-nvidia@sha256:b77508153d66d55cd89be80d54484972340ea9c49dbb1285403386215afdcdf7 build_tools/kokoro/gcp_ubuntu/cmake/linux/x86-turing/build.sh
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused "process_linux.go:432: running prestart hook 0 caused "error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: nvml error: driver/library version mismatch\n""": unknown.
These point to a mismatch between the Nvidia driver on the docker image and the underlying vm image (which have to be the same for docker to work with GPUs).
Tangential rant:
But we haven't updated the VM image since we got it working in July (2020-07-24, to be precise) and we haven't updated anything about any relevant directory in two weeks (let alone actually substantive changes that could affect this, which hasn't changed in months). So we're deeply confused what's going on here. Ubuntu seems to have dropped support for the 440 nvidia driver we're using, but I don't understand how that could've been incorporated into our static VM image.
Anyway, while mystified why this is occurring, we suspect that just updating both the VM image and the docker image to use the latest (and the same) Nvidia drivers should make this issue go away. Since there's no way to update these at the same time and since it's already failing, I'm going to disable the real GPU continuous builds temporarily to reduce noise while this goes through.
Activity
GMNGeoffrey commentedon Jan 13, 2021
I believe we may have figured out why this is happening
Ubuntu is upgrading itself with some cron job. That probably also explains why it was intermittent. Only in VMs where this had completed would we get the failure. Ugh that is so annoying :-P These updates are possible to disable: https://linuxconfig.org/disable-automatic-updates-on-ubuntu-18-04-bionic-beaver-linux
Of course there are dire warnings there about security... Hmmmm
I think we can just freeze the Nvidia drivers:
https://chrisalbon.com/deep_learning/setup/prevent_nvidia_drivers_from_upgrading/
That seems like a reasonable compromise
GMNGeoffrey commentedon Jan 13, 2021
Even better:
GMNGeoffrey commentedon Jan 13, 2021
I'm turning off auto-upgrades. These are short-lived VMs anyway, so we wouldn't even get any real benefit
GMNGeoffrey commentedon Jan 14, 2021
And figured out why this wasn't happening in the cmake-bazel turing build. That build is not actually using real GPUs at all 🤦 (#4514)
[ci] Update NVIDIA drivers to 460.32.03 (#4504)
antiagainst commentedon Jan 14, 2021
Great findings! Thanks @GMNGeoffrey for digging these weirdness out!! :D
I suspect that we used a graphical Ubuntu desktop as the base for the VM image? Auto updating seems something suitable there. I won't expect a server Ubuntu to do that. Ubuntu official docker images do not have
/etc/apt/apt.conf.d/20auto-upgradeseither.GMNGeoffrey commentedon Jan 14, 2021
This build is now passing on the main branch
https://source.cloud.google.com/results/invocations/29d823c4-6267-484a-83ff-fa08d991560d/targets/iree%2Fgcp_ubuntu%2Fcmake%2Flinux%2Fx86-turing%2Fmain/log
[ci] Update NVIDIA drivers to 460.32.03 (iree-org#4504)