lix/src/libstore
eldritch horrors ed6b3165ea worker: process timeouts first, and exclusively
check goals for timeouts first, and their activity fds only if no
timeout has occurred. checking for timeouts *after* activity sets
us up for assertion failures by running multiple build completion
notifiers, the first of which will kill/reap the the goal process
and consuming the Pid instance. when the second notifier attempts
to do the same it will core dump with an assertion failure in Pid
and take down not only the single goal, but the entire daemon and
all goals it was building. luckily this is rare in practice since
it requires a build to both finish and time out at the same time.

writing a test for this is not feasible due to how much it relies
on scheduling to actually trigger the underlying bug, but on idle
machines it can usually be triggered by running multiple sleeping
builds with timeout set to the sleep duration and `--keep-going`:

    nix-build --timeout 10 --builders '' --keep-going -E '
      with import <nixpkgs> {};
      builtins.genList
        (i: runCommand "foo-${toString i}" {} "sleep 10")
        100
    '

Change-Id: I394d36b2e5ffb909cf8a19977d569bbdb71cb67b
2024-05-26 20:57:09 +00:00
..
build worker: process timeouts first, and exclusively 2024-05-26 20:57:09 +00:00
builtins filetransfer: remove decompress request parameter 2024-04-25 01:33:08 +02:00
linux libstore/build: always enable seccomp filtering and no-new-privileges 2024-05-24 21:19:29 +00:00
platform gc: Find roots using libproc on Darwin 2024-04-25 23:24:21 -04:00
binary-cache-store.cc libutil: remove callback.hh 2024-05-10 02:21:11 +02:00
binary-cache-store.hh libstore: un-callback-ify Store::queryRealisationUncached 2024-05-09 23:18:05 +02:00
build-result.cc Merge pull request #9094 from obsidiansystems/test-proto 2024-03-04 04:36:23 +01:00
build-result.hh Merge pull request #9094 from obsidiansystems/test-proto 2024-03-04 04:36:23 +01:00
builtins.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
ca-specific-schema.sql ca: add sqlite index on RealisationsRefs(realisationReference) 2022-04-21 10:06:39 +02:00
common-protocol-impl.hh Merge pull request #9099 from obsidiansystems/common-proto 2024-03-04 04:36:58 +01:00
common-protocol.cc Merge pull request #9099 from obsidiansystems/common-proto 2024-03-04 04:36:58 +01:00
common-protocol.hh Merge pull request #9099 from obsidiansystems/common-proto 2024-03-04 04:36:58 +01:00
content-address.cc Fix various clang-tidy lints 2024-03-29 20:26:38 -07:00
content-address.hh Fix various clang-tidy lints 2024-03-29 20:26:38 -07:00
crypto.cc
crypto.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
daemon.cc libstore: parse the buildMode instead of unchecked cast 2024-05-24 20:45:05 -06:00
daemon.hh Add Store::isTrustedClient() 2023-04-06 19:59:57 -04:00
derivations.cc HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
derivations.hh Merge pull request #9563 from obsidiansystems/tryResolve-evalStore 2024-03-04 07:11:25 +01:00
derived-path-map.cc Revert "Adapt scheduler to work with dynamic derivations" 2023-10-02 15:05:23 +00:00
derived-path-map.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
derived-path.cc derived-path: refuse built derived path with a non-derivation base 2024-05-17 02:16:15 +02:00
derived-path.hh Introduce OutputName and OutputNameView type aliases 2023-08-25 09:55:07 -04:00
downstream-placeholder.cc Introduce OutputName and OutputNameView type aliases 2023-08-25 09:55:07 -04:00
downstream-placeholder.hh Introduce OutputName and OutputNameView type aliases 2023-08-25 09:55:07 -04:00
dummy-store.cc libutil: remove callback.hh 2024-05-10 02:21:11 +02:00
dummy-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
export-import.cc libstore: un-inline copyNAR expansions 2024-03-24 15:24:02 +01:00
filetransfer.cc filetransfer: fix decompression regression from 121edecf 2024-05-11 14:49:23 +02:00
filetransfer.hh libstore: de-callback-ify FileTransfer 2024-05-10 02:21:11 +02:00
fs-accessor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
gc-store.hh libstore: Create platform LocalStore subclasses 2024-04-23 16:17:05 +00:00
gc.cc Improve nix-store --delete failure message 2024-05-18 14:49:40 -06:00
globals.cc Always initialize curl in parent process on darwin 2024-05-07 20:43:17 +02:00
globals.hh libstore/build: always enable seccomp filtering and no-new-privileges 2024-05-24 21:19:29 +00:00
http-binary-cache-store.cc libutil: remove callback.hh 2024-05-10 02:21:11 +02:00
http-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
indirect-root-store.hh Clean up store hierarchy with IndirectRootStore 2023-07-24 09:19:44 -04:00
legacy-ssh-store.cc libutil: remove callback.hh 2024-05-10 02:21:11 +02:00
legacy-ssh-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
length-prefixed-protocol-helper.hh Merge pull request #9099 from obsidiansystems/common-proto 2024-03-04 04:36:58 +01:00
lix-store.pc.in packaging: rename nixexpr -> lixexpr and so on 2024-05-23 16:45:23 -06:00
local-binary-cache-store.cc Delete hasPrefix and hasSuffix from the codebase 2024-03-17 20:17:19 -07:00
local-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
local-fs-store.cc getBuildLog: factor out resolving derivations 2022-12-15 15:58:54 -05:00
local-fs-store.hh Merge pull request #6258 from obsidiansystems/gcc-bug-ergonomics 2024-03-04 05:24:33 +01:00
local-store.cc libutil: remove callback.hh 2024-05-10 02:21:11 +02:00
local-store.hh libstore: un-callback-ify Store::queryRealisationUncached 2024-05-09 23:18:05 +02:00
local-store.md Tweaks 2023-03-23 15:32:59 +01:00
lock.cc libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
lock.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
log-store.cc Move the getBuildLog implementation to its own implementation file 2023-01-13 11:05:44 +01:00
log-store.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
machines.cc ssh-ng: Set log-fd for ssh to 4 by default 2024-04-26 19:04:06 +02:00
machines.hh Merge pull request #9841 from obsidiansystems/float-speed-factor 2024-03-04 08:40:38 +01:00
make-content-addressed.cc Merge pull request #8650 from obsidiansystems/content-address-simpler 2023-07-21 13:46:53 +02:00
make-content-addressed.hh makeContentAddressed: Add single path helper 2023-06-30 18:22:47 +02:00
meson.build libstore/build: always enable seccomp filtering and no-new-privileges 2024-05-24 21:19:29 +00:00
misc.cc libutil: remove callback.hh 2024-05-10 02:21:11 +02:00
names.cc
names.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
nar-accessor.cc Add explicit case statements where -Wswitch-enum would report them 2023-04-03 18:17:32 +02:00
nar-accessor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
nar-info-disk-cache.cc Use "raw pattern" for content address types 2023-03-30 17:12:49 -04:00
nar-info-disk-cache.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
nar-info.cc Make "NAR info file is corrupt" messages more informative 2023-04-18 14:10:49 +02:00
nar-info.hh Merge remote-tracking branch 'upstream/master' into path-info 2023-04-07 20:39:04 -04:00
optimise-store.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
outputs-spec.cc Merge pull request #9172 from tfc/bad-moves 2024-03-04 04:41:52 +01:00
outputs-spec.hh Introduce OutputName and OutputNameView type aliases 2023-08-25 09:55:07 -04:00
parsed-derivations.cc Fix exportReferencesGraph when given store subpath 2024-04-21 10:27:32 +00:00
parsed-derivations.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
path-info.cc Merge pull request #6223 from obsidiansystems/worker-proto-with-version 2024-03-04 04:59:31 +01:00
path-info.hh Merge pull request #9238 from tfc/small-improvements2 2024-03-04 05:18:05 +01:00
path-references.cc Make RewritingSink accept a map of rewrites 2023-05-24 14:11:50 +02:00
path-references.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
path-regex.hh Disallow store path names that are . or .. (plus opt. -) 2024-05-02 19:34:38 +02:00
path-with-outputs.cc Fixing #7479 2023-08-18 11:44:00 -04:00
path-with-outputs.hh Make the Derived Path family of types inductive for dynamic derivations 2023-08-10 00:08:32 -04:00
path.cc Disallow store path names that are . or .. (plus opt. -) 2024-05-02 19:34:38 +02:00
path.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
pathlocks.cc libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
pathlocks.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
platform.cc gc: Find roots using libproc on Darwin 2024-04-25 23:24:21 -04:00
profiles.cc Merge pull request #9041 from trofi/profiles-sign 2024-03-04 04:36:10 +01:00
profiles.hh Clean up a few things related to profiles (#8526) 2023-06-19 04:04:59 +00:00
realisation.cc libutil: de-callback-ify computeClosure 2024-05-07 14:35:20 +00:00
realisation.hh Introduce OutputName and OutputNameView type aliases 2023-08-25 09:55:07 -04:00
remote-fs-accessor.cc libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
remote-fs-accessor.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
remote-store-connection.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
remote-store.cc libstore: fix old RemoteStore::addToStore serializer 2024-05-19 11:57:55 +00:00
remote-store.hh libstore: un-callback-ify Store::queryRealisationUncached 2024-05-09 23:18:05 +02:00
s3-binary-cache-store.cc Delete hasPrefix and hasSuffix from the codebase 2024-03-17 20:17:19 -07:00
s3-binary-cache-store.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
s3-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
s3.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
schema.sql schema.sql: add comment about hash being in base16 2022-06-01 14:59:57 +02:00
serve-protocol-impl.hh Merge pull request #9137 from obsidiansystems/serve-protocol 2024-03-04 04:37:05 +01:00
serve-protocol.cc Merge pull request #9560 from obsidiansystems/serve-proto-unkeyed-valid-path-info-serializer 2024-03-07 12:37:33 +01:00
serve-protocol.hh Merge pull request #9560 from obsidiansystems/serve-proto-unkeyed-valid-path-info-serializer 2024-03-07 12:37:33 +01:00
sqlite.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
sqlite.hh Merge pull request #9925 from 9999years/fmt-cleanup 2024-03-09 07:00:13 -07:00
ssh-store-config.hh Merge pull request #6258 from obsidiansystems/gcc-bug-ergonomics 2024-03-04 05:24:33 +01:00
ssh-store.cc ssh-ng: Set log-fd for ssh to 4 by default 2024-04-26 19:04:06 +02:00
ssh-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
ssh.cc feat(libstore): print the first line of stdout of SSH in case of failure 2024-05-10 20:22:47 +02:00
ssh.hh Fix ControlMaster behaviour 2023-05-16 18:50:09 +04:00
store-api.cc libstore: parse the buildMode instead of unchecked cast 2024-05-24 20:45:05 -06:00
store-api.hh libstore: parse the buildMode instead of unchecked cast 2024-05-24 20:45:05 -06:00
store-cast.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
uds-remote-store.cc Clean up store hierarchy with IndirectRootStore 2023-07-24 09:19:44 -04:00
uds-remote-store.hh Clean up store hierarchy with IndirectRootStore 2023-07-24 09:19:44 -04:00
uds-remote-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
worker-protocol-impl.hh Merge pull request #9099 from obsidiansystems/common-proto 2024-03-04 04:36:58 +01:00
worker-protocol.cc Merge pull request #6223 from obsidiansystems/worker-proto-with-version 2024-03-04 04:59:31 +01:00
worker-protocol.hh Merge pull request #6223 from obsidiansystems/worker-proto-with-version 2024-03-04 04:59:31 +01:00