diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-27T12·31+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-27T12·34+0100 |
commit | 29cde917fe6b8f2e669c8bf10b38f640045c83b8 (patch) | |
tree | d9349115bb950e40c314c84489aa761a9ee55f3a /src/libstore | |
parent | 7c7707638a446f91893cdc21b9e0638d2ebd42d3 (diff) |
Fix deadlock in SubstitutionGoal
We were relying on SubstitutionGoal's destructor releasing the lock, but if a goal is a top-level goal, the destructor won't run in a timely manner since its reference count won't drop to zero. So release it explicitly. Fixes #178.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index e2115bc80215..cec03fee42a4 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2852,6 +2852,7 @@ void SubstitutionGoal::finished() worker.store.registerValidPath(info2); outputLock->setDeletion(true); + outputLock.reset(); worker.store.markContentsGood(storePath); |