moralismercatus / crete

Open source concolic testing tool for binaries
1 stars 1 forks source link

Corner case in vm-node reset causes framework deadlock #157

Open moralismercatus opened 8 years ago

moralismercatus commented 8 years ago

Likelihood: low.

In the case that reset() is called (e.g., threshold condition met) while waiting for a VM instances to connect, vm-node enters a deadlock which in turn causes the entire framework to deadlock.

Sequence:

  1. Start VM instance.
  2. Call reset() before vm-node has connected to crete-run.
  3. reset() will terminate the VM, meaning vm-node will never connect and it will continue waiting indefinitely (the connection waits on another thread).
  4. Since the next step of reset() is to to kill the FSMs managing the VM instances, as part of the destruction of AsyncTask, it joins the thread it's waiting for; thus, it blocks indefinitely.

As long as reset() is not called while waiting for a connect, this problem should not occur.