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

WIP: A Concurrency Tester for Inferno-VC (and other servant servers) #37

Open
siddharth-krishna opened this issue Feb 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@siddharth-krishna
Copy link
Collaborator

This issue documents partial progress towards testing inferno-vc-server for concurrency bugs (#19 , #36).

The basic idea is to use the servant-quickcheck package to test the VC server on arbitrary requests. In order for this to unearth concurrency bugs, the following steps are needed:

  1. Add a concurrent harness to servant-quickcheck so that it makes requests from multiple threads simultaneously. (Partial progress towards this is on my fork here.)
  2. The concurrent harness above is based on the stale package pqc (see my fork for GHC 9), but it needs improvements like early exit when one thread fails the test, logging the concurrent history of requests that caused an error, etc.
  3. Purely random requests are not very good at exercising race conditions and catching bugs. For example, inferno-vc needs to be called with successive stores on the same script in order to exhibit some of the bugs (Use RWLock to prevent races in inferno-vc-server #36). We should modify the generator to generate requests from a small pool of object hashes so that the tests are more realistic. (Partial progress on the sidk-conc-tests branch)
  4. The default arbitrary generator for Expr generates huge expressions, which causes tests to time out silently. A hacky fix is to add let reqs = resize 2 $ ... in servant-quickcheck's serverSatisfiesMgr. A better way forward would be to also limit the expressions used in test requests.

(CC: @smurphy8 )

@siddharth-krishna siddharth-krishna added the enhancement New feature or request label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant