diff --git a/doc/manual/conf-file.xml b/doc/manual/conf-file.xml index acf0eb4f54..66df3edd5f 100644 --- a/doc/manual/conf-file.xml +++ b/doc/manual/conf-file.xml @@ -60,27 +60,6 @@ env-keep-derivations = false - gc-reserved-space - - This option specifies how much space should be - reserved in normal use so that the garbage collector can run - succesfully. Since the garbage collector must perform Berkeley DB - transactions, it needs some disk space for itself. However, when - the disk is full, this space is not available, so the collector - would not be able to run precisely when it is most needed. - - For this reason, when Nix is run, it allocates a file - /nix/var/nix/db/reserved of the size - specified by this option. When the garbage collector is run, this - file is deleted before the Berkeley DB environment is opened. - This should give it enough room to proceed. - - The default is 1048576 (1 - MiB). - - - - env-keep-derivations If false (default), derivations diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index bf4331d751..b13be1363f 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -96,18 +96,23 @@ ubiquitous 2.5.4a won't. Note that these are only required if you modify the parser or when you are building from the Subversion repository. -Nix uses Sleepycat's Berkeley DB, CWI's ATerm library and the -bzip2 compressor (including the bzip2 library). These are included in -the Nix source distribution. If you build from the Subversion -repository, you must download them yourself and place them in the +Nix uses CWI's ATerm library and the bzip2 compressor (including +the bzip2 library). These are included in the Nix source +distribution. If you build from the Subversion repository, you must +download them yourself and place them in the externals/ directory. See externals/Makefile.am for the precise URLs of these packages. Alternatively, if you already have them installed, you can use configure's -, and - options to point to their respective -locations. Note that Berkeley DB must be version -4.5; other versions may not have compatible database formats. + and +options to point to their respective locations. + +If you want to be able to upgrade Nix stores from before version +0.12pre12020, you need Sleepycat's Berkeley DB version version 4.5. +(Other versions may not have compatible database formats.). Berkeley +DB 4.5 is included in the Nix source distribution. If you do not need +this ability, you can build Nix with the + configure option. diff --git a/doc/manual/release-notes.xml b/doc/manual/release-notes.xml index c2eaa28bc2..eec4ab6ba9 100644 --- a/doc/manual/release-notes.xml +++ b/doc/manual/release-notes.xml @@ -87,7 +87,7 @@ $ rm __db* log.* derivers references referrers reserved validpaths DB_CONFIGnix-env -i / -u / -e operations on the same profile in parallel. If a - nix-env operation sees at th end that the profile + nix-env operation sees at the end that the profile was changed in the meantime by another process, it will just restart. This is generally cheap because the build results are still in the Nix store. @@ -171,7 +171,7 @@ the following paths will be downloaded/copied (30.02 MiB): nix-store --import < closure. - Lots of bugfixes, including a big performance bug in + Lots of bug fixes, including a big performance bug in the handling of with-expressions. diff --git a/doc/manual/troubleshooting.xml b/doc/manual/troubleshooting.xml index 0d3a892cc9..7403200e03 100644 --- a/doc/manual/troubleshooting.xml +++ b/doc/manual/troubleshooting.xml @@ -9,117 +9,6 @@ the Nix bug tracker for a list of currently known issues. -
Berkeley DB: <quote>Cannot allocate memory</quote> - -Symptom: Nix operations (in particular the -nix-store operations , -, and — -the latter being called by nix-channel --update) -failing: - - -$ nix-store --verify -error: Db::del: Cannot allocate memory - - - -Possible solution: make sure that no Nix processes are running, -then do: - - -$ cd /nix/var/nix/db -$ rm __db.00* - - - -
- - -
Berkeley DB gives weird error messages - -Symptom: you get error messages such as - - -Berkeley DB message: Finding last valid log LSN: file: 1 offset 28 -Berkeley DB error: file validpaths (meta pgno = 0) has LSN [483][34721]. -Berkeley DB error: end of log is [1][28] -Berkeley DB error: /nix/var/nix/db/validpaths: unexpected file type or format - -or other weird Berkeley DB errors, and they don’t go away (i.e., -automatic recovery doesn’t work). This may be the case after a system -crash. - -Solution: first try to run db_recover and -then nix-store ---verify: - - -$ db_recover -h /nix/var/nix/db -$ nix-store --verify - -(Make sure that you have the right version of -db_recover, namely, Berkeley DB 4.4 for Nix 0.10, -and 4.5 for Nix 0.11.) - -If that doesn’t work, it’s time to bring out the big guns: - - -$ cd /nix/var/nix -$ cp -pr db db-backup (making a backup just in case) -$ cd db -$ rm __db.* log* (removing the Berkeley DB environment) -$ mkdir tmp -$ for i in *; do db_dump $i | (cd tmp && db_load $i); done -(ignore error messages about non-database files like “reserved”) -$ mv tmp/* . -$ nix-store --verify - - - -
- - -
Berkeley DB out of locks - -It is possible, especially in nix-store ---verify or when running the garbage collector, to run out -of Berkeley DB locks, like this: - - -$ nix-store --verify -checking path existence -checking path realisability -checking the derivers table -checking the references table -Berkeley DB error: Lock table is out of available object entries -error: Db::get: Cannot allocate memory - - - -A workaround is to increase the number of locks that Berkeley DB -allocates. (The real solution would be for Nix to not use so many -locks.) This can be done by putting the following in the file -/nix/var/nix/db/DB_CONFIG: - - -set_lk_max_locks 100000 -set_lk_max_lockers 100000 -set_lk_max_objects 100000 - - -(Increase these numbers if necessary.) Then make sure that there are -no running Nix processes and delete the Berkeley DB environment: - - -$ rm /nix/var/nix/db/__db.* - -The Berkeley DB environment is automatically recreated with the new -limits when you run any Nix command. - -
- -
Collisions in <command>nix-env</command> Symptom: when installing or upgrading, you get an error message such as @@ -187,7 +76,8 @@ Furthermore, the st_nlink field of the This only happens on very large Nix installations (such as build machines). -Quick solution: run the garbage collector. +Quick solution: run the garbage collector. You may want to use +the option. Real solution: put the Nix store on a file system that supports more than 32,000 subdirectories per directory, such as ReiserFS.