aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/pathlocks.cc
AgeCommit message (Collapse)Author
2008-05-21* GCC 4.3.0 (Fedora 9) compatibility fixes. Reported by Gour andEelco Dolstra
Armijn Hemel.
2007-08-28* Fix a race condition with parallel builds where multipleEelco Dolstra
fixed-output derivations or substitutions try to build the same store path at the same time. Locking generally catches this, but not between multiple goals in the same process. This happened especially often (actually, only) in the build farm with fetchurl downloads of the same file being executed on multiple machines and then copied back to the main machine where they would clobber each other (NIXBF-13). Solution: if a goal notices that the output path is already locked, then go to sleep until another goal finishes (hopefully the one locking the path) and try again.
2007-08-28* PathLocks::lockPaths: don't allow reacquiring a lock we alreadyEelco Dolstra
hold.
2006-09-04* Use a proper namespace.Eelco Dolstra
* Optimise header file usage a bit. * Compile the parser as C++.
2006-06-20* Concurrent GC on Cygwin.Eelco Dolstra
2006-06-19* On Windows we cannot delete open (lock) files, so we delete lockEelco Dolstra
files after we've closed them. Since this only succeeds if the lock is no longer opened by any process, the token trick used on Unix is not necessary.
2006-06-15* In `nix-env -i|-u|-e', lock the profile to prevent races betweenEelco Dolstra
concurrent nix-env operations on the same profile. Fixes NIX-7.
2005-01-31* Don't delete active lock files.Eelco Dolstra
2005-01-27* Make lock removal safe by signalling to blocked processes that theEelco Dolstra
lock they are waiting on has become stale (we do this by writing a meaningless token to the unlinked file).
2004-05-11* True parallel builds. Nix can now run as many build jobs inEelco Dolstra
parallel as possible (similar to GNU Make's `-j' switch). This is useful on SMP systems, but it is especially useful for doing builds on multiple machines. The idea is that a large derivation is initiated on one master machine, which then distributes sub-derivations to any number of slave machines. This should not happen synchronously or in lock-step, so the master must be capable of dealing with multiple parallel build jobs. We now have the infrastructure to support this. TODO: substitutes are currently broken.
2004-01-15* Catch SIGINT to terminate cleanly when the user tries to interruptEelco Dolstra
Nix. This is to prevent Berkeley DB from becoming wedged. Unfortunately it is not possible to throw C++ exceptions from a signal handler. In fact, you can't do much of anything except change variables of type `volatile sig_atomic_t'. So we set an interrupt flag in the signal handler and check it at various strategic locations in the code (by calling checkInterrupt()). Since this is unlikely to cover all cases (e.g., (semi-)infinite loops), sometimes SIGTERM may now be required to kill Nix.
2003-12-21* Bug fix: parallel builds of the same derivation failed due to lock file ↵Eelco Dolstra
removal.
2003-11-21* Remove lock files after building. Eelco Dolstra
2003-11-18* libnix -> libstore.Eelco Dolstra