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

vault: fix deadlock in SetConfig #6082

Merged
merged 2 commits into from
Aug 6, 2019
Merged

vault: fix deadlock in SetConfig #6082

merged 2 commits into from
Aug 6, 2019

Commits on Aug 6, 2019

  1. vault: fix deadlock in SetConfig

    This seems to be the minimum viable patch for fixing a deadlock between
    establishConnection and SetConfig.
    
    SetConfig calls tomb.Kill+tomb.Wait while holding v.lock.
    establishConnection needs to acquire v.lock to exit but SetConfig is
    holding v.lock until tomb.Wait exits. tomb.Wait can't exit until
    establishConnect does!
    
    ```
      SetConfig -> tomb.Wait
         ^              |
         |              v
      v.lock <- establishConnection
    ```
    schmichael committed Aug 6, 2019
    Configuration menu
    Copy the full SHA
    7e08a2f View commit details
    Browse the repository at this point in the history
  2. vault: ensure SetConfig calls are serialized

    This is a defensive measure as SetConfig should only be called serially.
    schmichael committed Aug 6, 2019
    Configuration menu
    Copy the full SHA
    2175301 View commit details
    Browse the repository at this point in the history