Open kit-ty-kate opened 4 years ago
The Travis log says Build dist: xenial
, but you can use a different one by adding e.g. dist: focal
to the .travis.yml
.
Thanks for the issue report, and your discussion. With dist: focal
in .travis.yml
- as suggested by @talex5 - the compilation of topkg
succeeds -- see https://travis-ci.org/github/hannesm/albatross/builds/743769505 (which fails because <sys/sysctl.h>
is not present, but this is clearly a different issue).
# pkg.ml: [WARNING] OCaml host-os conf: cmd ['ocamlfind' 'ocamlc' '-config']: exited with 2
I suggest looking at why this happens.
It looks like the container has a very high number of parallel jobs set (127), probably based on how many cores were detected at the time the CI docker container got built (and thus different from the number of cores the Travis environment has when it runs the CI container):
podman run -it ocaml/opam:ubuntu-20.10-ocaml-4.09
$ cat .opam/config
opam-version: "2.0"
repositories: "default"
installed-switches: "4.09"
switch: "4.09"
jobs: 127
download-jobs: 3
eval-variables: [
sys-ocaml-version
["ocamlc" "-vnum"]
"OCaml version present on your system independently of opam, if any"
]
default-compiler: [
"ocaml-system" {>= "4.02.3"}
"ocaml-base-compiler"
]
That is not very friendly towards a Travis environment, which has a limited number of cores and memory. Trying to spawn 127 processes may hit some limits. (and the error messages you get from OOM may not be obvious if you don't have access to dmesg
, and also opam doesn't print the full build log, they may be more informative messages earlier on in ~/.opam/log/topkg-6-52c494.out that we can't see).
Try explicitly setting a limit: ENV OPAMJOBS=4
I'm getting the same issue: https://travis-ci.org/github/Risto-Stevcev/bastet/jobs/759334248
I tried the suggestion to set OPAMJOBS=4
but no success:
https://travis-ci.org/github/Risto-Stevcev/bastet/jobs/759386879
The Travis-docker script fail when
DISTRO=ubuntu
(which uses ubuntu-20.10)Full log: https://travis-ci.org/github/hannesm/albatross/jobs/743374084
I tested it on my test server with the exact same dockerfile and I didn't get any issues. However on Travis the issue is reproducible...
Currently my guess is that the kernel version used on Travis' machines is too old (to my knowledge they use ubuntu-16.04 whereas my test server uses ubuntu 18.04) and some kind of desynching between host kernel and containered distribution is happening. However if anybody has other suggestion I'd take it. cc @avsm @dbuenzli @talex5 ?