guix/guix
Ludovic Courtès fa81971cba
store: Add 'map/accumulate-builds' cutoff to address pathological cases.
Fixes <https://bugs.gnu.org/49439>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

Previously, a command such as:

  guix environment pigx-scrnaseq

could lead to unbounded memory growth and could even fail to complete
when some items are missing from the store.  This was because
'map/accumulate-builds' callees would keep making .drv build requests
that were turned into <unresolved> nodes; in this case, there are often
many identical build requests.  Stopping accumulation earlier allows us
to unlock the situation by proceeding with the first few build requests
instead of spinning until we've accumulated all the build requests.

* guix/store.scm (map/accumulate-builds): Define 'accumulation-cutoff'.
Use a loop when iterating over LST and maintain a counter of unresolved
nodes met so far; return when the counter exceeds ACCUMULATION-CUTOFF.
2021-08-10 17:32:18 +02:00
..
build build: Update uglifyjs for minify-build-system. 2021-07-19 14:46:28 +03:00
build-system build: Update uglifyjs for minify-build-system. 2021-07-19 14:46:28 +03:00
import import/print: package->code: Fix license object. 2021-07-19 19:57:51 +02:00
scripts scripts: publish: Remove leftover comment. 2021-08-10 12:00:45 +02:00
store database: Validate #:nar-size and #:time when registering store items. 2021-01-31 21:49:58 +01:00
tests tests: do not hard code HTTP ports 2021-03-06 11:41:48 +01:00
android-repo-download.scm android-repo-download: Add guile-json extension. 2021-05-02 18:45:27 +02:00
avahi.scm
base16.scm
base32.scm
base64.scm
build-system.scm
bzr-download.scm
cache.scm git: Periodically delete least-recently-used cached checkouts. 2021-01-13 16:26:58 +01:00
channels.scm channels: Add a #:system argument to channel-instances->manifest. 2021-05-12 08:34:07 +01:00
ci.scm ci: Properly construct URLs. 2021-07-16 19:48:24 +02:00
colors.scm
combinators.scm
config.scm.in build: Add '--with-channel-commit' and related configure flags. 2021-02-04 09:23:39 +01:00
cpio.scm cpio: Fix device number calculation. 2021-07-04 04:35:35 +02:00
cve.scm cve: Gracefully handle bogus CVE entries. 2021-04-25 14:35:42 +02:00
cvs-download.scm cvs-download: Fix module exports 2021-05-05 16:56:43 +02:00
d3.v3.js graph: Install JavaScript files. 2021-01-04 23:54:16 +01:00
deprecation.scm
derivations.scm derivations: Make 'coalesce-duplicate-inputs' linear in the number of inputs. 2021-07-27 18:26:08 +02:00
describe.scm describe: 'current-channel-entries' ignores non-channel profile entries. 2021-06-13 23:57:44 +02:00
diagnostics.scm diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6. 2021-05-09 23:45:36 +02:00
discovery.scm
docker.scm guix: docker: Ensure repository name length limits are met. 2021-07-05 16:34:07 -04:00
download.scm download: Remove defunct GNOME mirrors. 2021-07-27 12:34:57 -04:00
elf.scm
ftp-client.scm ftp-client: Before 'PASV', try 'EPSV' first for IPv6. 2021-02-15 08:38:00 +08:00
gexp.scm guix: gexp: Define gexp->approximate-sexp. 2021-06-30 13:53:00 +02:00
git-authenticate.scm channels: Consider the current channel commit as authentic. 2021-02-04 09:23:39 +01:00
git-download.scm git-download: Support submodules in 'git-predicate'. 2021-05-28 11:36:02 +02:00
git.scm git: Update the mtime of the just-updated checkout. 2021-06-12 00:49:32 +02:00
glob.scm
gnu-maintenance.scm gnu-maintenance: 'generic-html' computes the right source URL. 2021-06-03 13:04:20 +02:00
gnupg.scm
grafts.scm grafts: Cache the derivation/graft mapping for the whole session. 2021-06-08 09:25:50 +02:00
graph.js graph: Install JavaScript files. 2021-01-04 23:54:16 +01:00
graph.scm graph: Install JavaScript files. 2021-01-04 23:54:16 +01:00
hg-download.scm hg-download: Make (guix swh) output visible. 2021-06-14 18:35:18 +02:00
http-client.scm http-client: Remove exception mishandling in 'http-multiple-get'. 2021-04-25 14:36:45 +02:00
i18n.scm
inferior.scm inferior: 'cached-channel-instance' no longer calls 'show-what-to-build'. 2021-08-09 18:14:37 +02:00
ipfs.scm Add (guix ipfs). 2021-04-12 18:42:22 +02:00
licenses.scm licenses: Remove 'cc-sampling-plus-1.0' export. 2021-08-02 18:11:32 +02:00
lint.scm lint: Check for leading whitespace in description. 2021-07-13 07:25:05 +02:00
man-db.scm
memoization.scm
modules.scm modules: Recognize #:re-export-and-replace. 2021-01-19 17:45:38 +01:00
monad-repl.scm
monads.scm
nar.scm
narinfo.scm substitute: Choose compression method based on past CPU usage. 2021-03-21 23:41:01 +01:00
openpgp.scm openpgp: Remove now unnecessary procedure. 2021-03-02 23:12:37 +01:00
packages.scm packages: 'package-with-patches' preserves package location. 2021-04-29 01:22:04 +02:00
pki.scm
profiles.scm guix: Delete duplicates from emacs-load-path. 2021-06-28 21:59:02 +02:00
profiling.scm
progress.scm progress: Add a download-size argument to progress-report-port. 2021-06-01 09:10:32 +02:00
quirks.scm
records.scm
remote.scm
repl.scm repl: Fix exception handling for interpreted code. 2021-01-21 00:14:38 +01:00
scripts.scm guix: scripts: Fix corner cases of hint for option typo. 2021-02-24 23:50:13 +01:00
search-paths.scm
self.scm self: Use default config variable values for derivations. 2021-08-09 18:14:33 +02:00
serialization.scm serialization: Micro-optimize string literal output in 'write-file-tree'. 2021-03-01 17:45:51 +01:00
sets.scm
ssh.scm ssh: Fix type that broke offloading. 2021-05-11 12:49:53 +02:00
status.scm status: Add missing newline after substitution completion message. 2021-07-04 23:00:36 +02:00
store.scm store: Add 'map/accumulate-builds' cutoff to address pathological cases. 2021-08-10 17:32:18 +02:00
substitutes.scm substitutes: Properly construct URLs. 2021-07-16 19:36:11 +02:00
svn-download.scm
swh.scm swh: Support lookup of Hg tags. 2021-06-14 18:35:18 +02:00
tests.scm Revert "tests: Refer to '%derivation-cache' in the right module." 2021-03-06 11:41:48 +01:00
transformations.scm transformations: '--with-latest' correctly handles already-latest case. 2021-06-08 23:28:04 +02:00
ui.scm ui: Improve output appearance when listing generations. 2021-07-15 16:11:47 -04:00
upstream.scm upstream: 'package-latest-release' tries all the matching updaters. 2021-04-06 23:59:46 +02:00
utils.scm utils: Do not request block buffering in pretty-print-table. 2021-07-21 17:42:30 -04:00
workers.scm