diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-11-17 13:50:36 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-11-17 13:50:36 +0100 |
commit | bccff827dc968b08bddda03aadcb3d9cc41c2719 (patch) | |
tree | 8bb7702a8970ac9254847ff9493712f62b11d523 /src/libstore | |
parent | 5160ceef3080dd2b9e7ac6f58652bf76c1a8a6f4 (diff) |
Fix deadlock in IFD through the daemon
Fixes #4235.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/derivations.cc | 6 |
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; |