[Nix-dev] Stdenv update (was: Nixpkgs: nixpkgs-stdenv-updates-merge)
Eelco Dolstra
e.dolstra at tudelft.nl
Mon Feb 25 14:45:22 CET 2008
Hi all,
Michael Raskin wrote:
> As I said on #trace, I was building nixpkgs-stdenv-updates-merge.
> That build succeeded, and some random tested programs seem to work. I
> haven't built GHC, though. So moving it to trunk may be reasonable.. (if
> GHC and non-i686 builds are successful)
The stdenv branch has now become the trunk.
However, the update seems to cause some wacky problem with the Nix database.
When doing nixos-rebuild you may get errors like
Berkeley DB error: Locker does not exist
Berkeley DB error: Unknown locker ID: 42
Berkeley DB error: DB_TXN->abort: log undo failed for LSN: 513 36051: Invalid
argument
Berkeley DB error: PANIC: Invalid argument
Berkeley DB error: PANIC: fatal region error detected; run recovery
error: Db::open: DB_RUNRECOVERY: Fatal error, run database recovery
and
Berkeley DB message: Finding last valid log LSN: file: 513 offset 35706
Berkeley DB message: Recovery starting from [512][207090]
Berkeley DB message: Recovery complete at Mon Feb 25 13:18:58 2008
Berkeley DB message: Maximum transaction ID 8000003c Recovery checkpoint
[513][36051]
If this happens and the upgrade hangs, then try killing all Nix processes
(nix-store, nix-instantiate), and do:
$ nix-channel --update
$ nix-build /etc/nixos/nixpkgs -A nixUnstable -o nix
$ ./nix/bin/nix-env -q \* # <- should recover the DB
$ PATH=./nix/bin:$PATH NIXOS_NO_PULL=1 nixos-rebuild switch
(It's also a good idea to do "initctl stop nix-daemon".)
The problem seems to be some incompatibility between the old Berkeley DB and the
new one. This is odd since it's the same version, so it's probably caused by
the Glibc update.
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list