Fixes <https://issues.guix.gnu.org/31785>.
Similar to <https://github.com/NixOS/nix/issues/178>, fixed in
<29cde917fe>.
We can't rely on Goal deletion to release our locks in a timely manner. In
the case in which multiple guix-daemon processes simultaneously try producing
an output path path1, the one that gets there first (P1) will get the lock,
and the second one (P2) will continue trying to acquire the lock until it is
released. Once it has acquired the lock, it checks to see whether the path
has already become valid in the meantime, and if so it reports success to
those Goals waiting on its completion and finishes. Unfortunately, it fails
to release the locks it holds first, so those stay held until that Goal gets
deleted.
Suppose we have the following store path dependency graph:
path4
/ | \
path1 path2 path3
P2 is now sitting on path1's lock, and will continue to do so until path4 is
completed. Suppose there is also a P3, and it has been blocked while P1
builds path2. Now P3 is sitting on path2's lock, and can't acquire path1's
lock to determine that it has been completed. Likewise P2 is sitting on
path1's lock, and now can't acquire path2's lock to determine that it has been
completed. Finally, P3 completes path3 while P2 is blocked.
Now:
- P1 knows that path1 and path2 are complete, and holds no locks, but can't
determine that path3 is complete
- P2 knows that path1 and path3 are complete, and holds locks on path1 and
path3, but can't determine that path2 is complete
- P3 knows that path2 and path3 are complete, and holds a lock on path2, but
can't determine that path1 is complete
And none of these locks will be released until path4 is complete. Thus, we
have a deadlock.
To resolve this, we should explicitly release these locks as soon as they
should be released.
* nix/libstore/build.cc
(DerivationGoal::tryToBuild, SubstitutionGoal::tryToRun):
Explicitly release locks in the has-become-valid case.
* tests/store-deadlock.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
Change-Id: Ie510f84828892315fe6776c830db33d0f70bcef8
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/packages/aux-files/emacs/comp-integrity-next.el: New file.
* Makefile.am (AUX_FILES): Register it here.
* gnu/packages/emacs.scm (emacs-next-minimal): Update to 30.0.60-1.4e22ef8.
(emacs->emacs-next)[arguments]: Swap out ‘validate-comp-integrity’ phase,
so as to refer to the new integrity check.
* Makefile.am (AM_V_PO4A_0, AM_V_POXREF_0): Align the Automake status lines of
the po4a and the PO xref, since the common width is 10 characters.
Change-Id: Ic8c32f73294ba6e4ca71ab4aa889a558e4d7fcee
Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
Big thanks to Dariqq <dariqq@posteo.net> for debugging and communicating
upstream about a problem with the deblobbing scripts in this kernel
series!
* gnu/packages/linux.scm (linux-libre-6.9-version, linux-libre-6.9-gnu-revision,
deblob-scripts-6.9, linux-libre-6.9-pristine-source, linux-libre-6.9-source,
linux-libre-headers-6.9, linux-libre-6.9): New variables.
* gnu/packages/aux-files/linux-libre/6.9-arm.conf,
gnu/packages/aux-files/linux-libre/6.9-arm64.conf,
gnu/packages/aux-files/linux-libre/6.9-i686.conf,
gnu/packages/aux-files/linux-libre/6.9-x86.conf: New files.
* Makefile.am (AUX_FILES): Add them.
Signed-off-by: Leo Famulari <leo@famulari.name>
Change-Id: I8dc011a603684f0be88766b7881aa6c560b94443
The previous recommendation, running ‘make authenticate’, was insecure
because it led users to run code from the very repository they want to
authenticate:
https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00252.html
* Makefile.am (commit_v1_0_0, channel_intro_commit)
(channel_intro_signer, GUIX_GIT_KEYRING, authenticate): Remove.
* Makefile.am (.git/hooks/%): New target, generalization of previous
‘.git/hooks/pre-push’ target.
(nodist_noinst_DATA): Add ‘.git/hooks/post-merge’.
* doc/contributing.texi (Building from Git): Suggest ‘guix git
authenticate’ instead of ‘make authenticate’.
* etc/git/post-merge: New file.
* etc/git/pre-push: Run ‘guix git authenticate’ instead of ‘make
authenticate’.
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reported-by: Skyler Ferris <skyvine@protonmail.com>
Change-Id: Ia415aa8375013d0dd095e891116f6ce841d93efd
This replaces Automake's `build-aux/mdate-sh' with our own
`build-aux/mdate-from-git.scm' to use reproducible timestamps from Git
instead.
* build-aux/mdate-from-git.scm: New script.
* bootstrap: Use it to replace build-aux/mdate-sh.
* Makefile.am (EXTRA_DIST): Add it.
Change-Id: I17d0a7de9ffea397129c0db1728f86e28a4e245f
This fixes VERSION being empty in ./configure, which may to documentation
having empty version strings.
* Makefile.am (EXTRA_DIST): Add build-aux/git-version-gen.
Change-Id: If127519811b25e2df0f5caa6a83a4f860fd34eb2
* Makefile.am: Use in_git_p conditional to disable Autotools' cache
consistency assert and removal when bulding from tarball.
(dist): Depend on doc-pot-update again when building from tarball.
(dist-hook): Remove dependencies on gen-ChangeLog and gen-AUTHORS when
building from tarball.
(gen-ChangeLog, gen-AUTHORS): Remove guarding for building from tarball.
Use set -e to avoid silently failing.
(gen-tarball-version): Use $(SOURCE_DATE_EPOCH) instead of re-generating it
using git; this also works running from a tarball.
Change-Id: I9ebdd28a70837f6a4db610c4816bb283d176e2d9
* build-aux/xgettext.scm: Move setting of environment variables to shell
header.
(main): Use SOURCE_DATE_EPOCH as fallback for timestamp. This fixes running
from a tarball.
* Makefile.am (EXTRA_DIST): Add it.
Change-Id: Ic487587b22495868fd2a21545a13dc9e3458299c
This is a follow-up to commit
8b972da068
Makefile.am: Auto-configure Git on 'make'.
* configure.ac (in_git_p): New conditional.
* Makefile.am (nodist_noinst_DATA): Use it to only enable this when building
from Git.
Change-Id: I09a90a59a4933a8cdb04124467d38209171f2a57
This is a follow-up to commit
b0c33b1997
maint: Use reproducible timestamps and name for tarball.
* Makefile.am (am__tar): Add --format=ustar.
Change-Id: I1e499c413703105704f49a84868ec10de69846fb
* doc/local.mk (doc-clean): New target.
(DIST_CONFIGURE_FLAGS): New variable.
(auto-clean): Use them in new target.
* Makefile.am (dist-doc-pot-update): Use it in new target.
(dist): Change to depend on it to clean possibly stale files, instead of
doc-pot-update directly.
Add a toplevel check to ensure that Autotools cache is up to date.
Change-Id: I2ff2d88db9fe1e708ab65e33e1f3d7ecee882cb4
* Makefile.am (gen-tarball-version): Add reproducible timestamp to tarball.
(am__tar): Use it in new variable, overriding the Automake default.
(GZIP_ENV): New variable, overriding the Automake default.
* Makefile.am (gen-ChangeLog): Check for existance of `.git', rather than it
being a directory.
(gen-AUTHORS): Likewise.
Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
In the previous commit, we've added a patch that potentially messes with
how built-in (especially preloaded) Lisp libraries are loaded. Thus, we
might want to assert that these files still load fine, as reported when
querying the builtin documentation of functions provided by them.
* gnu/packages/aux-files/emacs/comp-integrity.el: New file.
* gnu/Makefile.am (dist_noinst_DATA): Register it here.
* gnu/packages/emacs.scm (emacs-no-x)[#:phases]: Add ‘validate-comp-integrity’.