aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-11-17 13:50:36 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-11-17 13:50:36 +0100
commitbccff827dc968b08bddda03aadcb3d9cc41c2719 (patch)
tree8bb7702a8970ac9254847ff9493712f62b11d523 /src/libstore
parent5160ceef3080dd2b9e7ac6f58652bf76c1a8a6f4 (diff)
Fix deadlock in IFD through the daemon
Fixes #4235.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derivations.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 517ecfaa2..eea129df3 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -463,13 +463,15 @@ static const DrvHashModulo & pathDerivationModulo(Store & store, const StorePath
{
auto h = drvHashes.find(drvPath);
if (h == drvHashes.end()) {
- assert(store.isValidPath(drvPath));
// Cache it
h = drvHashes.insert_or_assign(
drvPath,
hashDerivationModulo(
store,
- store.readDerivation(drvPath),
+ parseDerivation(
+ store,
+ readFile(store.toRealPath(drvPath)),
+ Derivation::nameFromPath(drvPath)),
false)).first;
}
return h->second;