Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dune runtime failure Regression building reason master branch. #1735

Closed
jordwalke opened this issue Jan 4, 2019 · 11 comments · Fixed by #1751
Closed

Dune runtime failure Regression building reason master branch. #1735

jordwalke opened this issue Jan 4, 2019 · 11 comments · Fixed by #1751

Comments

@jordwalke
Copy link
Contributor

jordwalke commented Jan 4, 2019

Passes:
#847bc67b2f02ab51c6ea524b34dbbfa8cc221a32
Passes:
#081e1011c5d28b609a0e189c8ea121e6076cd337
Passes:
#0fccd3792294a76ed5c89637d449898a988e2bae
Fails:
#cd213cd4953e66f5927ed0c4838f56700973c15d
Fails:
#528ed3abf592382e294816c1766e189e27a05e0b
Fails:
#cfeb84a08be48e93040d047f90d99fa0be25308a
Fails:
#723e17baf1d74ac7c47a9dbc69a00c1b9d7d2ecb

Reason master branch started failing with the following:

Error: exception Invalid_argument("Option.value_exn")
Backtrace:
Raised at file "src/build_system.ml", line 1361, characters 9-14
Called from file "src/fiber/fiber.ml", line 91, characters 8-15

And then after building it prints a really confusing error message about segfaulting and uncertainty and mindkilling and little-death which I'm not sure is relevant to this observed error.

I'll post more details as I find them but this looks like it's a problem with the Dune implementation so I thought I'd flag it before your next release.

It looks like the commit cd213cd caused the regression:
cc @bobot

@avsm
Copy link
Member

avsm commented Jan 4, 2019

minor edit to original report to link the regressing commit id

@rgrinberg
Copy link
Member

We should just add a mandatory message:string argument to Option.value_exn. The error messages are not useful at all otherwise.

@rgrinberg
Copy link
Member

rgrinberg commented Jan 4, 2019

I can't reproduce this on reason#master btw. @jordwalke any other details that could help reproduce?

@rgrinberg
Copy link
Member

@jordwalke Could you try running this again with this patch

@jordwalke
Copy link
Contributor Author

Sure, I'll try with the patch, but on reason master, you just add:

  "resolutions": {
    "@opam/dune": "ocaml/dune:dune.opam#cd213cd4"
  },

To the esy.json, then run esy from the root directory.

@jordwalke
Copy link
Contributor Author

jordwalke commented Jan 4, 2019

Running esy after adding this to esy.json: to test your patch:

"resolutions": { "@opam/dune": "rgrinberg/jbuilder:dune.opam#179dbd78"},

I still get the error:

Error: exception Invalid_argument("Option.value_exn")
Backtrace:
Raised at file "src/build_system.ml", line 1361, characters 9-14
Called from file "src/fiber/fiber.ml", line 91, characters 8-15

@rgrinberg
Copy link
Member

I tried doing $ esy with your resolutions and could not reproduce. Perhaps this is a windows issue? I'll try and prepare something that will make this easier to debug.

@jordwalke
Copy link
Contributor Author

This was not on Windows, it was on Mac.

@andreypopp
Copy link
Member

andreypopp commented Jan 10, 2019

The offending Option.value_exn is at

|> Option.value_exn
which unwraps result of Path.descendant which doesn't work with non local paths (in case of esy we set DUNE_BUILD_DIR to an absolute path outside of dune workspace).

@ghost
Copy link

ghost commented Jan 10, 2019

Hmm, it should still work for path in the build directory, it seems that it is Path.descendant that's wrong. I'm having a look.

@ghost ghost mentioned this issue Jan 10, 2019
@ghost ghost closed this as completed in #1751 Jan 10, 2019
@jordwalke
Copy link
Contributor Author

Thanks for the fix @diml and thanks for debugging @andreypopp .

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants