[Tracking] Detect race resolving a promise #144
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We sometimes don't unset the blocker flag quickly enough, and perform other processing first. This can make us briefly think that a promise is resolved when it isn't. The new test shows a case where this matters: we incorrectly export a capability as
SenderHosted
(settled) before the status gets updated. When we later try to resolve the promise, the remote side complains.Add an assert to detect and report the problem earlier. This also triggers on existing test cases.
This PR only detects the bug; it does not fix it.
Bug found by AFL.