ocurrent / solver-service

An OCluster service for solving opam dependencies
Apache License 2.0
12 stars 7 forks source link

Fix a deadlock triggered by an incorrect request #33

Closed moyodiallo closed 1 year ago

moyodiallo commented 1 year ago

The creation of an epoch could fail because of an incorrect request and the epoch_lock may stay in `Activating state forever and could not handle a new request.

This bug is triggered by sending a request with an incorrect URL or commit of an opam-repository.

Here steps:

Starting the solver

$ dune exec -- solver-service --address=tcp:127.0.0.1:7000
Solver service running at: <capnp>

Sending a request (copy , the address of the solver-service). The --commit=? is incorrect to trigger the bug.

$ dune exec -- ./examples/main.exe --package=yaml --version=3.0.0 --ocaml-version=4.13.0 --commit=78623143537016ddf140e8557b88981556200d04  <capnp>

This branch https://github.com/moyodiallo/solver-service/tree/fix-bug-epoch_lock-debug is modified to observe behavior of solver-service. The state is printed out each time.