ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.24k stars 355 forks source link

when aspcud crashes, opam hangs #1395

Closed lehy closed 10 years ago

lehy commented 10 years ago

Summary: when aspcud crashes, opam hangs.

I have opam 1.1.1-1, aspcud 1:1.8.0-2 (both from Ubuntu 14.04 Trusty Universe). aspcud attempts to create the file "$TMPDIR/parse.py", but my $TMPDIR is unset (has always been), so creating and executing "/parse.py" fails. Instead of reporting the error, opam update just hangs.

I wish opam would detect and report the error, instead of hanging.

Here are the last lines of opam update --debug --verbose: 00:07.884 012018 STATE State rebuild-cache loaded in 0.390s Updating the cache of metadata (~/.opam/state.cache) ... 00:07.889 012018 STATE ~/.opam/state.cache written in 0.005s 00:07.889 012018 CLIENT dry-upgrade 00:07.889 012018 STATE LOAD-STATE(dry-upgrade) 00:07.889 012018 FILE(config) Read ~/.opam/config in 0.000s 00:07.895 012018 STATE Loaded /home/rlehy/.opam/state.cache in 0.006s 00:07.895 012018 FILE(aliases) Read ~/.opam/aliases in 0.000s 00:07.898 012018 FILE(repo-config) Read ~/.opam/repo/chambart-opam-compilers-repository/config in 0.000s 00:07.898 012018 FILE(repo-config) Read ~/.opam/repo/default/config in 0.000s 00:07.911 012018 FILE(repo-index) Read ~/.opam/repo/package-index in 0.013s 00:07.911 012018 FILE(repo-index) Read ~/.opam/repo/compiler-index in 0.000s 00:07.911 012018 FILE(pinned) Cannot find /home/rlehy/.opam/4.01.0/pinned 00:07.911 012018 FILE(installed) Read ~/.opam/4.01.0/installed in 0.000s 00:07.911 012018 FILE(installed.roots) Read ~/.opam/4.01.0/installed.roots in 0.000s 00:07.916 012018 FILE(reinstall) Cannot find /home/rlehy/.opam/4.01.0/reinstall 00:07.916 012018 STATE ROOT : /home/rlehy/.opam 00:07.916 012018 STATE SWITCH : 4.01.0 00:07.916 012018 STATE COMPILER : 4.01.0 00:07.916 012018 STATE COMPILERS : { 3.11.2, 3.12.1, 4.00.0, 4.00.0+debug-runtime, 4.00.0+fp, 4.00.1, 4.00.1+BER, 4.00.1+alloc-profiling, 4.00.1+annot, 4.00.1+french, 4.00.1+io_prims, 4.00.1+mirage-unix, 4.00.1+mirage-xen, 4.00.1+open-types, 4.00.1+raspberrypi, 4.00.1+short-types, 4.01.0, 4.01.0+32bit, 4.01.0+BER, 4.01.0+PIC, 4.01.0+armv6-freebsd, 4.01.0+bin-ocp, 4.01.0+flambda, 4.01.0+fp, 4.01.0+jocaml, 4.01.0+lsb, 4.01.0+musl, 4.01.0+musl+static, 4.01.0+open-types, 4.01.0beta1, 4.01.0beta1+no-camlp4, 4.01.0dev+extension-points, 4.01.0dev+fp, 4.01.0dev+trunk, 4.02.0dev+fp, 4.02.0dev+pr10, 4.02.0dev+pr13, 4.02.0dev+pr15, 4.02.0dev+pr17, 4.02.0dev+pr2, 4.02.0dev+pr20, 4.02.0dev+pr22, 4.02.0dev+pr24, 4.02.0dev+pr25, 4.02.0dev+pr26, 4.02.0dev+pr29, 4.02.0dev+pr3, 4.02.0dev+pr30, 4.02.0dev+pr36, 4.02.0dev+pr37, 4.02.0dev+pr4, 4.02.0dev+pr42, 4.02.0dev+pr43, 4.02.0dev+pr46, 4.02.0dev+pr51, 4.02.0dev+pr53, 4.02.0dev+pr54, 4.02.0dev+pr56, 4.02.0dev+pr57, 4.02.0dev+pr58, 4.02.0dev+pr6, 4.02.0dev+record_constructors, 4.02.0dev+trunk, flambda, ocamljava-preview, system, trunk, trunk+inline, trunk+less_spill } 00:07.916 012018 STATE REPOS : { chambart-opam-compilers-repository, default } 00:07.916 012018 STATE PACKAGES : 2276 packages 00:07.916 012018 STATE INSTALLED : { async.111.11.00, async_extra.111.11.00, async_kernel.111.11.00, async_unix.111.11.00, atd.1.1.2, atdgen.1.3.1, base-bigarray.base, base-threads.base, base-unix.base, batteries.2.2.0, bench.1.3, bin_prot.111.03.00, biniou.1.0.9, camlp4.4.01.0, camomile.0.8.5, cmdliner.0.9.4, comparelib.109.60.00, conf-libpcre.1, config-file.1.2, core.111.11.01, core_bench.109.58.01, core_extended.111.11.00, core_kernel.111.11.00, cppo.0.9.3, cryptokit.1.9, custom_printf.111.03.00, dypgen.20120619-1, easy-format.1.0.2, enumerate.111.08.00, extlib.1.6.1, fieldslib.109.20.03, fileutils.0.4.4, gg.0.8.0, herelib.109.35.02, js_of_ocaml.2.1, jsonm.0.9.1, kaputt.1.2, lambda-term.1.6, lwt.2.4.5, menhir.20130912, merlin.1.6, oasis.0.4.4, ocaml+twt.0.93.2, ocaml-data-notation.0.0.11, ocamlfind.1.4.0, ocamlgraph.1.8.5, ocamlify.0.0.1, ocamlmod.0.0.4, ocamlnet.3.7.3, ocp-build.1.99.6-beta, ocp-indent.1.4.1, ocp-index.1.0.2, omake.0.9.8.6-0.rc1, optcomp.1.5, ospec.0.3.2, ounit.2.0.0, pa_bench.109.55.02, pa_monad_custom.v6.0.0, pa_ounit.109.53.02, pa_test.111.08.00, pcre-ocaml.7.0.4, pipebang.110.01.00, planck.2.1.1, procord.0.1.0, quickcheck.1.0.0, re.1.2.2, re2.111.08.00, react.1.1.0, sexplib.111.11.00, spotlib.2.4.0, stringext.0.0.1, TestSimple.0.3.1, textutils.111.06.00, type_conv.109.60.01, typerep.111.06.00, typerex.1.99.6-beta, uint.1.1.1, uri.1.6.0, utop.1.12, uuidm.0.9.5, uutf.0.9.3, variantslib.109.15.03, vg.0.8.0, xmlm.1.2.0, yojson.1.1.8, zed.1.3 } 00:07.916 012018 STATE ROOTS : { base-bigarray.base, base-threads.base, base-unix.base, bench.1.3, config-file.1.2, core.111.11.01, core_bench.109.58.01, core_extended.111.11.00, dypgen.20120619-1, extlib.1.6.1, js_of_ocaml.2.1, jsonm.0.9.1, kaputt.1.2, merlin.1.6, oasis.0.4.4, ocamlfind.1.4.0, pcre-ocaml.7.0.4, planck.2.1.1, procord.0.1.0, quickcheck.1.0.0, react.1.1.0, TestSimple.0.3.1, uri.1.6.0, utop.1.12, vg.0.8.0, xmlm.1.2.0 } 00:07.916 012018 STATE REINSTALL : {} 00:07.916 012018 STATE State dry-upgrade loaded in 0.028s 00:07.917 012018 FILE(comp) Read ~/.opam/compilers/4.01.0/4.01.0/4.01.0.comp in 0.000s 00:07.929 012018 FILE(.config) Read ~/.opam/4.01.0/config/global-config.config in 0.000s 00:07.939 012018 FILE(comp) Read ~/.opam/compilers/4.01.0/4.01.0/4.01.0.comp in 0.000s 00:07.939 012018 FILE(comp) Read ~/.opam/compilers/4.01.0/4.01.0/4.01.0.comp in 0.000s 00:07.939 012018 FILE(comp) Read ~/.opam/compilers/4.01.0/4.01.0/4.01.0.comp in 0.000s 00:07.939 012018 FILE(comp) Read ~/.opam/compilers/4.01.0/4.01.0/4.01.0.comp in 0.000s 00:07.980 012018 SOLVER resolve request=install:(async & async_extra & async_kernel & async_unix & atd & atdgen & base-bigarray & base-threads & base-unix & batteries & bench & bin_prot & biniou & camlp4 & camomile & cmdliner & comparelib & conf-libpcre & config-file & core & core_bench & core_extended & core_kernel & cppo & cryptokit & custom_printf & dypgen & easy-format & enumerate & extlib & fieldslib & fileutils & gg & herelib & js_of_ocaml & jsonm & kaputt & lambda-term & lwt & menhir & merlin & oasis & ocaml+twt & ocaml-data-notation & ocamlfind & ocamlgraph & ocamlify & ocamlmod & ocamlnet & ocp-build & ocp-indent & ocp-index & omake & optcomp & ospec & ounit & pa_bench & pa_monad_custom & pa_ounit & pa_test & pcre-ocaml & pipebang & planck & procord & quickcheck & re & re2 & react & sexplib & spotlib & stringext & TestSimple & textutils & type_conv & typerep & typerex & uint & uri & utop & uuidm & uutf & variantslib & vg & xmlm & yojson & zed) remove:() upgrade:(base-bigarray & base-threads & base-unix & bench & config-file & core & core_bench & core_extended & dypgen & extlib & js_of_ocaml & jsonm & kaputt & merlin & oasis & ocamlfind & pcre-ocaml & planck & procord & quickcheck & react & TestSimple & uri & utop & vg & xmlm) 00:08.086 012018 SYSTEM [log-12018-4bcc67](in 0.001s) which aspcud 00:08.086 012018 CUDF resolve request=install:(zed & yojson & variantslib & uutf & uuidm & uint & typerex & typerep & type%5fconv & textutils & stringext & spotlib & sexplib & re2 & re & pipebang & pa%5ftest & pa%5founit & pa%5fmonad%5fcustom & pa%5fbench & ounit & ospec & optcomp & omake & ocp-index & ocp-indent & ocp-build & ocamlnet & ocamlmod & ocamlify & ocamlgraph & ocaml-data-notation & ocaml+twt & menhir & lwt & lambda-term & herelib & gg & fileutils & fieldslib & enumerate & easy-format & custom%5fprintf & cryptokit & cppo & core%5fkernel & conf-libpcre & comparelib & cmdliner & camomile & camlp4 & biniou & bin%5fprot & batteries & atdgen & atd & async%5funix & async%5fkernel & async%5fextra & async) remove:() upgrade:(xmlm & vg & utop & uri & react & quickcheck & procord & planck & pcre-ocaml & ocamlfind & oasis & merlin & kaputt & jsonm & js%5fof%5focaml & extlib & dypgen & core%5fextended & core%5fbench & core & config-file & bench & base-unix & base-threads & base-bigarray & TestSimple)

Remarks:

Here is my $(opam config env):

OPAM status report

# opam-version    1.1.1
# os              linux
# external-solver true
# jobs            1
# repositories    2
# pinned          0
# current-switch  4.01.0
# preinstalled    false
# last-update     2014-05-12 15:38
AltGr commented 10 years ago

Thanks for reporting. I believe this is an issue with the dose library: we'll make sure it's fixed on the new release.

rdicosmo commented 10 years ago

On Mon, May 12, 2014 at 09:42:24AM -0700, Louis Gesbert wrote:

Thanks for reporting. I believe this is an issue with the dose library: we'll make sure it's fixed on the new release.

This is fixed in dose commit 701d1c441f6aa020bbfb6face19069e9ef22a371 which is included in opam trunk (since e5fd0c050102c228c9ff49c89fd709e6c0d7cb6f)

Confirmation that this does not happen any more in this precise case would be much appreciated :-)

Notice that we do not do any verification of the preferences passes down to aspcud, so the exception now raised in case of errors is captured up in opam, and opam just exits, with my tests.

AltGr commented 10 years ago

Please reopen if this happens again with the newer Opam & Dose

rdicosmo commented 10 years ago

This should really not happen any longer with the latest changes in opam and dose

On Wed, Jun 11, 2014 at 09:05:22AM -0700, Louis Gesbert wrote:

Please reopen if this happens again with the newer Opam & Dose

— Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA PPS E-mail: roberto@dicosmo.org Universite Paris Diderot WWW : http://www.dicosmo.org Case 7014 Tel : ++33-(0)1-57 27 92 20 5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments: MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor) Batiment Sophie Germain Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3