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

Replace wait_until_settled with safer await_settled #233

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Jun 4, 2021

wait_until_settled makes it too easy to ignore errors.

`wait_until_settled` makes it too easy to ignore errors.
talex5 added a commit to talex5/ocluster that referenced this pull request Jun 4, 2021
We waited until the connection attempt resolved, but didn't check that
it was successful. We then misleadingly printed "Waiting for worker"
before noticing that the connection had failed and retrying it.

    Connecting to build cluster...
    Waiting for worker...
    Connecting to build cluster...
    Waiting for worker...
    ...

Now we detect the problem immediately, log the error, and retry after a
delay without spamming the job logs.

I've also made a PR against capnp-rpc to avoid mistakes like this in
future: mirage/capnp-rpc#233

Reported by Antonin Décimo.
@talex5 talex5 merged commit fe55298 into mirage:master Jun 4, 2021
@talex5 talex5 deleted the await-settled branch June 4, 2021 19:24
talex5 added a commit to talex5/opam-repository that referenced this pull request Jun 10, 2021
…nix and capnp-rpc-lwt (1.2)

CHANGES:

- Don't crash if the peer disconnects before the bootstrap reply is ready (@talex5 mirage/capnp-rpc#234).
  When replying to a normal question we checked that the answer was still needed before trying to reply, but didn't for bootstrap requests.

- Replace `wait_until_settled` with safer `await_settled` (@talex5 mirage/capnp-rpc#233).
  `wait_until_settled` makes it too easy to ignore errors.

- Require fmt >= 0.8.7 for `kstr` and set OCaml 4.08 as the minimum version everywhere (@talex5 mirage/capnp-rpc#232).
  Older versions aren't tested in CI because the unix and mirage packages require at least OCaml 4.08.
talex5 added a commit to talex5/opam-repository that referenced this pull request Jun 10, 2021
…nix and capnp-rpc-lwt (1.2)

CHANGES:

- Don't crash if the peer disconnects before the bootstrap reply is ready (@talex5 mirage/capnp-rpc#234).
  When replying to a normal question we checked that the answer was still needed before trying to reply, but didn't for bootstrap requests.

- Replace `wait_until_settled` with safer `await_settled` (@talex5 mirage/capnp-rpc#233).
  `wait_until_settled` makes it too easy to ignore errors.

- Require fmt >= 0.8.7 for `kstr` and set OCaml 4.08 as the minimum version everywhere (@talex5 mirage/capnp-rpc#232).
  Older versions aren't tested in CI because the unix and mirage packages require at least OCaml 4.08.
talex5 added a commit to talex5/capnp-rpc that referenced this pull request Jul 12, 2022
When a vat is shut down it ends all registered connections and stops
accepting new ones. However, if a connection was in progress (e.g. doing
the TLS handshake but not yet registered) then we would miss it.

The `test_parallel_fails` test got upgraded to the stricter
`await_settled_exn` in mirage#233, which was wrong but that wasn't detected
due to this bug.
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 this pull request may close these issues.

1 participant