haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

Azure stack linux jobs fail due to disk space #1729

Closed jneira closed 4 years ago

jneira commented 4 years ago

Well, linux stack jobs have ran out of disk space since c8ed3e5 :

Filesystem      Size  Used Avail Use% Mounted on
udev            3.4G     0  3.4G   0% /dev
tmpfs           695M  8.9M  686M   2% /run
/dev/sda1        84G   80G  3.6G  96% /
tmpfs           3.4G  8.0K  3.4G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.4G     0  3.4G   0% /sys/fs/cgroup
/dev/loop0       40M   40M     0 100% /snap/hub/43
/dev/loop1       94M   94M     0 100% /snap/core/8935
/dev/sda15      105M  3.6M  101M   4% /boot/efi
/dev/sdb1        14G   35M   13G   1% /mnt

It make the download of ghc-8.8.1, necessary for wrapper-tests fail:

Installing GHC ...
/home/vsts/.stack/programs/x86_64-linux/ghc-8.8.1/lib/ghc-8.8.1/Cabal-3.0.0.0/.copyFile75307-1209.tmp: copyFile: resource exhausted (No space left on device)
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2
Run from: /home/vsts/.stack/programs/x86_64-linux/ghc-8.8.1.temp/ghc-8.8.1/

Error: Error encountered while installing GHC with
         make install
         run in /home/vsts/.stack/programs/x86_64-linux/ghc-8.8.1.temp/ghc-8.8.1/

       The following directories may now contain files, but won't be used by stack:
         - /home/vsts/.stack/programs/x86_64-linux/ghc-8.8.1.temp/
         - /home/vsts/.stack/programs/x86_64-linux/ghc-8.8.1/

       For more information consider rerunning with --verbose flag

Command `stack ghc -- --numeric-version` failed.

version checking
  picks up a stack.yaml with 8.8.1 FAILED [1]
  picks up a stack.yaml with 8.6.5
  picks up whatever version of ghc is on this machine

Failures:

  test/wrapper/HieWrapper.hs:18:9: 
  1) version checking picks up a stack.yaml with 8.8.1
       expected: "8.8.1"
        but got: "8.8.3"
jneira commented 4 years ago

It starts with 86% only with the project checkout (no cache, no stack or ghc installed)

Filesystem      Size  Used Avail Use% Mounted on
udev            3.4G     0  3.4G   0% /dev
tmpfs           695M  8.9M  686M   2% /run
/dev/sda1        84G   72G   12G  86% /
tmpfs           3.4G  8.0K  3.4G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.4G     0  3.4G   0% /sys/fs/cgroup
/dev/loop0       40M   40M     0 100% /snap/hub/43
/dev/loop1       94M   94M     0 100% /snap/core/8935
/dev/sda15      105M  3.6M  101M   4% /boot/efi
/dev/sdb1        14G   35M   13G   1% /mnt
fendor commented 4 years ago

That is weird, we shouldnt take up 60GB just from the checkout.

jneira commented 4 years ago

No,no, they are already taken by installed software. In fact, all ghcs are already installed in the linux image! cabal jobs take advantage on that. But it was easier let stack manage its ghc's in the default locations. The straightforward solution could be make stack use the installed ghc's.

jneira commented 4 years ago

I've opened an issue in the issue tracker for azure images: https://github.com/actions/virtual-environments/issues/709 I am changing the job to use the already installed ghc's, to avoid the problem temporary