1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00
nix/src/libstore
Picnoir 30ef0a1f4c gc: resume GC after a pathinuse error
First the motivation: I recently faced a bug that I assume is coming
from the topoSortPaths function where the GC was trying to delete a
path having some alive referrers. I resolved this by manually deleting
the faulty path referrers using nix-store --query --referrers. I sadly
did not manage to reproduce this bug.

This bug alone is not a big deal. However, this bug is
triggering a cascading failure: invalidatePathChecked is throwing a
PathInUse exception. This exception is not catched and fails the whole GC
run. From there, the machine (a builder machine) was unable to GC its
Nix store, which led to an almost full disk with no way to
automatically delete the dead Nix paths.

Instead, I think we should log the error for the specific store path
we're trying to delete, specifying we can't delete this path because
it still has referrers. Once we're done with logging that, the GC run
should continue to delete the dead store paths it can delete.

(cherry picked from commit ced8d311a5)
2025-01-15 15:59:26 +00:00
..
build Push log source description out of libutil and report build hook @nix warning correctly 2024-12-09 21:40:32 +00:00
builtins Merge pull request #11610 from Mic92/ssl-fix 2024-10-07 14:41:32 +02:00
linux Build nix-store with Meson 2024-06-14 10:25:14 -04:00
unix local-derivation-goal: Move builder preparation to non-builtin code path 2024-10-22 15:30:03 +02:00
windows Build nix-store with Meson 2024-06-14 10:25:14 -04:00
.version Build nix-store with Meson 2024-06-14 10:25:14 -04:00
binary-cache-store.cc Rename Recursive -> NixArchive 2024-06-24 10:24:06 -04:00
binary-cache-store.hh Use SourcePath in more places 2024-05-06 19:05:42 +02:00
build-result.cc Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
build-result.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
build-utils-meson Rename file to avoid reserved name 2024-07-02 09:26:22 -04:00
builtins.hh fix passing CA files into builtins:fetchurl sandbox 2024-09-28 17:08:16 +02:00
ca-specific-schema.sql Build the local store on Windows 2024-05-10 13:05:23 -04:00
common-protocol-impl.hh Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
common-protocol.cc Merge pull request #6236 from obsidiansystems/store-dir-config 2023-12-01 15:38:14 +01:00
common-protocol.hh Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
common-ssh-store-config.cc Ensure we can construct remote store configs in isolation 2024-07-15 17:32:49 -04:00
common-ssh-store-config.hh Ensure we can construct remote store configs in isolation 2024-07-15 17:32:49 -04:00
content-address.cc Cleanup ContentAddressMethod to match docs 2024-06-24 10:24:06 -04:00
content-address.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
daemon.cc MacOS built: add workaround for missing view() member of std::ostringstream 2024-10-07 02:05:53 +02:00
daemon.hh Factor out commonality between WorkerProto::Basic{Client,Server}Connection 2024-07-18 16:10:48 +02:00
derivations.cc experimental-features.hh: Don't include json-utils.hh 2024-10-04 15:59:35 +02:00
derivations.hh fix(libstore): make BasicDerivation move-constructible/assignable 2024-11-08 20:10:38 +03:00
derived-path-map.cc Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
derived-path-map.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
derived-path.cc Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
derived-path.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
downstream-placeholder.cc Renamed HashFormat::Base32 to HashFormat::Nix32 2023-12-06 23:43:42 +01:00
downstream-placeholder.hh Introduce OutputName and OutputNameView type aliases 2023-08-25 09:55:07 -04:00
dummy-store.cc Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
dummy-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
export-import.cc ParseSink -> FileSystemObjectSink 2024-01-22 18:01:18 -05:00
filetransfer.cc libstore: fixup unformatted uri when S3 getObject fails 2025-01-10 09:48:23 +00:00
filetransfer.hh Add 'download-buffer-size' setting 2024-07-24 20:10:45 +02:00
gc-store.hh Solve unused header warnings reported by clangd 2024-07-12 15:37:54 +02:00
gc.cc gc: resume GC after a pathinuse error 2025-01-15 15:59:26 +00:00
globals.cc Always initialize curl in parent process on darwin 2024-09-18 14:29:26 +02:00
globals.hh warn-large-path-threshold: define 0 as number to disable warnings 2024-10-22 18:23:19 +02:00
http-binary-cache-store.cc HttpBinaryCacheStore::getFile(): Fix uncaught exception 2024-09-27 00:16:52 +02:00
http-binary-cache-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
http-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
indirect-root-store.cc inline the usage of nix::renameFile 2024-05-12 18:40:16 +05:30
indirect-root-store.hh Enable the unix:// store on Windows 2024-04-18 16:58:32 -04:00
keys.cc Separate SystemError from SysError 2024-01-12 12:00:33 -05:00
keys.hh Signer infrastructure: Prep for #9076 2024-01-03 16:13:55 -05:00
legacy-ssh-store.cc Ensure we can construct remote store configs in isolation 2024-07-15 17:32:49 -04:00
legacy-ssh-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
legacy-ssh-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
length-prefixed-protocol-helper.hh Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
local-binary-cache-store.cc Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
local-binary-cache-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
local-binary-cache-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
local-fs-store.cc Refactor unix domain socket store config (#11109) 2024-07-17 23:32:27 -04:00
local-fs-store.hh Refactor unix domain socket store config (#11109) 2024-07-17 23:32:27 -04:00
local-overlay-store.cc More support for std::filepath in libnixutil 2024-08-26 17:23:56 -04:00
local-overlay-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
local-overlay-store.md doc, src: Fix various spelling typos 2024-09-28 15:29:15 -07:00
local-store.cc experimental-features.hh: Don't include json-utils.hh 2024-10-04 15:59:35 +02:00
local-store.hh Remove dead makeMutable() function 2024-08-21 16:45:46 +02:00
local-store.md Build the local store on Windows 2024-05-10 13:05:23 -04:00
local.mk Revert "Merge pull request #11804 from obsidiansystems/remove-old-make" 2024-11-07 13:46:37 +01: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 fix(treewide): fix incorrect usage of std::move 2024-11-08 20:10:38 +03:00
machines.hh Solve unused header warnings reported by clangd 2024-07-12 15:37:54 +02:00
make-content-addressed.cc Rename Recursive -> NixArchive 2024-06-24 10:24:06 -04:00
make-content-addressed.hh makeContentAddressed: Add single path helper 2023-06-30 18:22:47 +02:00
meson.build fix: Build nix-store on arm with libatomic 2024-11-07 11:40:02 +01:00
meson.options Meson misc things 2024-08-27 10:19:55 -04:00
misc.cc dropEmptyInitThenConcatStringsSep -> concatStringSep: diag 2024-07-13 03:06:24 +02:00
mounted-ssh-store.md MountedSSHStore: stores on shared filesystems 2023-11-21 13:34:01 -05:00
names.cc Use std::strong_ordering for version comparison 2024-07-30 18:13:05 -07:00
names.hh Use std::strong_ordering for version comparison 2024-07-30 18:13:05 -07:00
nar-accessor.cc nar-accessor.cc: Silence unused variable warning 2024-07-12 15:38:17 +02:00
nar-accessor.hh Fix consts and casts 2023-11-08 17:29:55 +01:00
nar-info-disk-cache.cc Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined (#11351) 2024-09-11 10:36:46 +00: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 experimental-features.hh: Don't include json-utils.hh 2024-10-04 15:59:35 +02:00
nar-info.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
nix-store.pc.in Revert "Merge pull request #11804 from obsidiansystems/remove-old-make" 2024-11-07 13:46:37 +01:00
optimise-store.cc Split ignoreException for destructors or interrupt-safe 2024-09-30 11:50:25 +02:00
outputs-spec.cc cont. cleanup: remove superfluous std::string copies 2024-10-07 01:15:44 +02:00
outputs-spec.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
package.nix packaging: Add darwin -lsandbox in meson 2024-10-22 15:30:03 +02:00
parsed-derivations.cc Decouple within-build (structured attrs) and unstable CLI path info JSON 2024-06-03 08:21:22 -04: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 dropEmptyInitThenConcatStringsSep -> concatStringSep: store paths are not empty 2024-07-13 03:06:24 +02:00
path-info.hh fix(libstore/path-info): make ValidPathInfo move constructible/assignable 2024-11-08 20:48:00 +03:00
path-references.cc HashType: Rename to HashAlgorithm 2023-12-06 23:43:42 +01:00
path-references.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
path-regex.hh Disallow store path names that are . or .. (plus opt. -) 2024-01-31 18:35:19 +01:00
path-with-outputs.cc refactor(treewide): reserve vector capacity when final size is known 2024-11-09 22:40:49 +03:00
path-with-outputs.hh Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
path.cc Improve error messages for invalid derivation names 2024-06-25 19:41:29 +02:00
path.hh Improve error messages for invalid derivation names 2024-06-25 19:41:29 +02:00
pathlocks.cc Split ignoreException for destructors or interrupt-safe 2024-09-30 11:50:25 +02:00
pathlocks.hh Pathlocks Implementation for Windows (#10586) 2024-04-22 15:08:10 +00:00
posix-fs-canonicalise.cc Guard uses of lutimes, for portability 2024-06-24 17:35:34 -04:00
posix-fs-canonicalise.hh Build the local store on Windows 2024-05-10 13:05:23 -04:00
profiles.cc add call to checkInterrupt in a bunch of places 2024-06-04 19:35:40 +05:30
profiles.hh Build a minimized Nix with MinGW 2024-04-17 12:26:10 -04:00
realisation.cc Signer infrastructure: Prep for #9076 2024-01-03 16:13:55 -05:00
realisation.hh Signer infrastructure: Prep for #9076 2024-01-03 16:13:55 -05:00
remote-fs-accessor.cc Split ignoreException for destructors or interrupt-safe 2024-09-30 11:50:25 +02:00
remote-fs-accessor.hh Merge FSAccessor into SourceAccessor 2023-11-01 17:09:28 +01:00
remote-store-connection.hh refactor(treewide): make some move ctors noexcept where appropriate 2024-11-09 12:09:33 +03:00
remote-store.cc withFramedSink(): Don't use a thread to monitor the other side 2024-08-19 18:15:15 +02:00
remote-store.hh Rename Recursive -> NixArchive 2024-06-24 10:24:06 -04:00
s3-binary-cache-store.cc Make S3 downloads slightly more interruptable 2024-10-11 14:55:22 +02:00
s3-binary-cache-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
s3-binary-cache-store.md fix location 2024-09-27 11:07:04 +02:00
s3.hh Fix some warnings 2024-07-25 00:02:43 -04:00
schema.sql Build the local store on Windows 2024-05-10 13:05:23 -04:00
serve-protocol-connection.cc Factor our connection code for worker proto like serve proto 2024-05-27 00:43:46 -04:00
serve-protocol-connection.hh Factor our connection code for worker proto like serve proto 2024-05-27 00:43:46 -04:00
serve-protocol-impl.hh Solve unused header warnings reported by clangd 2024-07-12 15:37:54 +02:00
serve-protocol.cc Create ServeProto::BuildOptions and a serializer for it 2023-12-09 11:35:13 -05:00
serve-protocol.hh Factor our ServeProto::BasicServerConnection::handshake 2024-01-22 12:43:11 -05:00
sqlite.cc Split ignoreException for destructors or interrupt-safe 2024-09-30 11:50:25 +02:00
sqlite.hh refactor(treewide): make some move ctors noexcept where appropriate 2024-11-09 12:09:33 +03:00
ssh-store.cc Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
ssh-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
ssh-store.md Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
ssh.cc Ensure error messages don't leak private key 2024-09-23 16:36:48 -04:00
ssh.hh Ensure error messages don't leak private key 2024-09-23 16:36:48 -04:00
store-api.cc libutil: thread-pool: ensure threads finished on error 2025-01-13 08:03:12 +00:00
store-api.hh Store: Use SharedSync for state 2024-07-26 16:14:03 +02:00
store-cast.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
store-dir-config.hh Improve error messages for invalid derivation names 2024-06-25 19:41:29 +02:00
store-reference.cc Add StoreReference::render 2024-05-22 09:20:15 -04:00
store-reference.hh Remove unused operator<=>'s that darwin can't generate 2024-07-12 17:37:27 +02:00
uds-remote-store.cc Refactor unix domain socket store config (#11109) 2024-07-17 23:32:27 -04:00
uds-remote-store.hh Move uriSchemes to *StoreConfig 2024-07-17 23:48:19 -04:00
uds-remote-store.md Enable the unix:// store on Windows 2024-04-18 16:58:32 -04:00
worker-protocol-connection.cc Split ignoreException for destructors or interrupt-safe 2024-09-30 11:50:25 +02:00
worker-protocol-connection.hh withFramedSink(): Don't use a thread to monitor the other side 2024-08-19 18:15:15 +02:00
worker-protocol-impl.hh Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
worker-protocol.cc Merge pull request #10782 from obsidiansystems/both-connections 2024-06-03 15:10:38 +02:00
worker-protocol.hh WorkerProto: Support fine-grained protocol feature negotiation 2024-07-24 16:23:37 +02:00