opam icon indicating copy to clipboard operation
opam copied to clipboard

Internal opam solver failure

Open lpw25 opened this issue 7 years ago • 6 comments

According to opam ci there are opam solver failures on two versions of the prof_spacetime package:

$ opam ci log prof_spacetime.0.1.0 --compiler=4.05

====> prof_spacetime.0.1.0 4.05 Debian 9 (Stretch) amd64 (internal opam solver failure) (opam-repository 88fd9cd8):
<no logs available>

====> prof_spacetime.0.1.0 Dockerfile for 4.05 Debian 9 (Stretch) amd64:
# Autogenerated by OCaml-Dockerfile scripts
FROM ocaml/opam2:debian-9-ocaml-4.05
RUN opam switch 4.05
ENV OPAMYES 1
WORKDIR /home/opam/opam-repository
RUN git pull origin master
RUN git checkout 88fd9cd811d22c98d2bd573d053cd5818bdae488
RUN opam update
RUN opam install -y depext
RUN opam depext -iy jbuilder ocamlfind
RUN opam depext -uiv prof_spacetime.0.1.0
$ opam ci log prof_spacetime.0.1.0 --compiler=4.04

====> prof_spacetime.0.1.0 4.04 Debian 9 (Stretch) amd64 (internal opam solver failure) (opam-repository 88fd9cd8):
<no logs available>

====> prof_spacetime.0.1.0 Dockerfile for 4.04 Debian 9 (Stretch) amd64:
# Autogenerated by OCaml-Dockerfile scripts
FROM ocaml/opam2:debian-9-ocaml-4.04
RUN opam switch 4.04
ENV OPAMYES 1
WORKDIR /home/opam/opam-repository
RUN git pull origin master
RUN git checkout 88fd9cd811d22c98d2bd573d053cd5818bdae488
RUN opam update
RUN opam install -y depext
RUN opam depext -iy jbuilder ocamlfind
RUN opam depext -uiv prof_spacetime.0.1.0

I was told it would be useful to report this fact here.

lpw25 avatar Jul 11 '18 10:07 lpw25

Thanks; I suspect this is due to the large number of cohttp packages in the stable opam-repo

avsm avatar Jul 11 '18 10:07 avsm

Update:

$ opam ci logs prof_spacetime 
prof_spacetime: multiple build failures found with different configuration parameters.
Please refine the command to select exactly one of the following:
  opam-ci logs prof_spacetime.0.1.0 --compiler=4.04 --arch=amd64 --distro=debian-9
  opam-ci logs prof_spacetime.0.1.0 --compiler=4.06 --arch=ppc64le --distro=debian-9
$ opam-ci logs prof_spacetime.0.1.0 --compiler=4.06 --arch=ppc64le --distro=debian-9

====> prof_spacetime.0.1.0 4.06 Debian 9 (Stretch) ppc64le (dependency failed) (opam-repository 43284a6f):
 [...warnings...]
 # Warning : strength option is not supported

====> prof_spacetime.0.1.0 Dockerfile for 4.06 Debian 9 (Stretch) ppc64le:
# Autogenerated by OCaml-Dockerfile scripts
FROM ocaml/opam2:debian-9-ocaml-4.06
RUN opam switch 4.06
ENV OPAMYES 1
WORKDIR /home/opam/opam-repository
RUN git pull origin master
RUN git checkout 43284a6f1779def38c522352503681d7b22a3b87
RUN opam update
RUN opam install -y depext
RUN opam depext -iy jbuilder ocamlfind
RUN opam depext -uiv prof_spacetime.0.1.0
$ opam-ci logs prof_spacetime.0.1.0 --compiler=4.04 --arch=amd64 --distro=debian-9
====> prof_spacetime.0.1.0 4.04 Debian 9 (Stretch) amd64 (internal opam solver failure) (opam-repository 07f587e8):
<no logs available>

====> prof_spacetime.0.1.0 Dockerfile for 4.04 Debian 9 (Stretch) amd64:
# Autogenerated by OCaml-Dockerfile scripts
FROM ocaml/opam2:debian-9-ocaml-4.04
RUN opam switch 4.04
ENV OPAMYES 1
WORKDIR /home/opam/opam-repository
RUN git pull origin master
RUN git checkout 07f587e89cbe6a23bc0710a0830820801cb1318a
RUN opam update
RUN opam install -y depext
RUN opam depext -iy jbuilder ocamlfind
RUN opam depext -uiv prof_spacetime.0.1.0

note that locally, those docker build succesfully

rjbou avatar Jul 13 '18 09:07 rjbou

note that locally, those docker build succesfully

probably indicating a solver timeout on the CI side ?

AltGr avatar Jul 18 '18 14:07 AltGr

probably indicating a solver timeout on the CI side ?

most probably. I get lots of timeouts on check.ocamllabs.io

Example:

# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian
[ERROR] Sorry, resolution of the request timed out.
        Try to specify a simpler request, use a different solver, or increase the allowed time by setting OPAMSOLVERTIMEOUT to a bigger value (currently, it is set to 60.0 seconds).
Command failed: opam list --readonly --external  --resolve=slack-backup.0.1 returned 60
Command 'docker run --rm opam-check-all-4.02.3 opam depext -ivy slack-backup.0.1' failed.

or in Travis here where I already set the timeout to 300s but it's visibly not enough with some switches: https://travis-ci.org/avsm/mirage-ci/jobs/451841943

Something tells me there is going to be more and more of this as the number of packages increase and I'm not sure what to do about it. I think it should be fixed on opam side instead of increasing OPAMSOLVERTIMEOUT.

I'm not sure if I should make a new issue or not for that?

kit-ty-kate avatar Dec 11 '18 18:12 kit-ty-kate

Note: This was (at least partly) fixed in opam 2.1.0 (via https://github.com/ocaml/opam/pull/4369) released last week.

kit-ty-kate avatar Aug 02 '21 09:08 kit-ty-kate

Some of the remaining examples of solver timeouts can be seen in https://github.com/ocaml/opam/issues/5422 and https://github.com/ocaml/opam/discussions/6137

  • --with-test curly.0.3.0 on an ocaml 4.07 switch
  • prometheus-app on an ocaml 4.12 switch

kit-ty-kate avatar Aug 06 '24 13:08 kit-ty-kate