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 doesn't respond to RPC methods when run in watch mode in the dune repository #7568

Open
gridbugs opened this issue Apr 17, 2023 · 4 comments
Labels

Comments

@gridbugs
Copy link
Collaborator

Expected Behavior

It should be possible to run _build/default/bin/main.exe build --watch from the dune repository, and then in a second terminal run _build/default/bin/main.exe rpc ping and have the second command return immediately.

Actual Behavior

The ping command hangs forever. I've only been able to reproduce this in the dune repository. Running a freshly-built dune binary in other projects seems to work as expected.

Reproduction

  1. Compile dune
  2. Run _build/default/bin/main.exe build --watch from the root of the dune directory
  3. In a second terminal, run _build/default/bin/main.exe rpc ping also from the root of the dune directory.

Specifications

  • Version of dune (output of dune --version): 82c670e
  • Version of ocaml (output of ocamlc --version): 4.14.1
  • Operating system (distribution and version): NixOS

Additional information

The first commit with this behaviour is 8bea7ea

@rgrinberg
Copy link
Member

I wasn't able to reproduce this. Anything else you could provide us?

This PR removes threads for RPC altogether. Does it fix the issue for you?

@Alizter could you try reproducing?

@rgrinberg rgrinberg added the bug label Apr 17, 2023
@gridbugs
Copy link
Collaborator Author

This #7418 removes threads for RPC altogether. Does it fix the issue for you?

I don't see the problem on that PR branch.

I tried reproducing on a different machine in my home and I couldn't. It could be related to the fact that my main machine (where I see the problem) has a relatively large number of cores (32).

@rgrinberg
Copy link
Member

(where I see the problem) has a relatively large number of cores (32).

Hmm, I'm not sure what difference would this make. You could try changing -j to pretend that you're a low core machine to see if it fixes something.

@gridbugs
Copy link
Collaborator Author

It still hangs with -j1 (on the server).

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

No branches or pull requests

2 participants