aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-16Merge pull request #4262 from jbaum98/masterEelco Dolstra
Fix deadlock in nix-store when max-connections=1
2020-11-16Merge pull request #4257 from hercules-ci/issue-4197-nix-build-output-orderEelco Dolstra
Issue 4197 nix build output order
2020-11-16Fix deadlock in nix-store when max-connections=1Jake Waksbaum
This fixes a bug I encountered where `nix-store -qR` will deadlock when the `--include-outputs` flag is passed and `max-connections=1`. The deadlock occurs because `RemoteStore::queryDerivationOutputs` takes the only connection from the connection pool and uses it to check the daemon version. If the version is new enough, it calls `Store::queryDerivationOutputs`, which eventually calls `RemoteStore::queryPartialDerivationOutputMap`, where we take another connection from the connection pool to check the version again. Because we still haven't released the connection from the caller, this waits for a connection to be available, causing a deadlock. This diff solves the issue by using `getProtocol` to check the protocol version in the caller `RemoteStore::queryDerivationOutputs`, which immediately frees the connection back to the pool before returning the protocol version. That way we've already freed the connection by the time we call `RemoteStore::queryPartialDerivationOutputMap`.
2020-11-13tests: Test #4197 nix-build output order regressionRobert Hensing
2020-11-13nix-build: Fix #4197 output order regressionRobert Hensing
2020-11-12Merge pull request #4251 from serokell/mkaito/ops1098-nix-default-nix-pathEelco Dolstra
Fix default nix-path
2020-11-12Fix default nix-pathChristian Höppner
The default nix-path values for nixpkgs and root channels were incorrect.
2020-11-11Test nix build --jsonMatthew Kenigsberg
2020-11-11Print built derivations as json for buildMatthew Kenigsberg
Add --json option to nix build to allow machine readable output on stdout with all built derivations Fixes #1930
2020-11-10Merge pull request #4243 from abathur/fix_4058Eelco Dolstra
enable Darwin.arm64 to install x86_64 binary
2020-11-10Fix use of dirty Git/Mercurial inputs with chroot storesEelco Dolstra
Fixes: $ nix build --store /tmp/nix /home/eelco/Dev/patchelf#hydraJobs.build.x86_64-linux warning: Git tree '/home/eelco/Dev/patchelf' is dirty error: --- RestrictedPathError ------------------------------------------------------------------------------------------- nix access to path '/tmp/nix/nix/store/xmkvfmffk7xfnazykb5kx999aika8an4-source/flake.nix' is forbidden in restricted mode (use '--show-trace' to show detailed location information)
2020-11-10enable Darwin.arm64 to install x86_64 binaryTravis A. Everett
Throwing @thefloweringash under the bus if this doesn't work, but it sounds like Apple Silicon devices can use the x86_64 binary for now. Fixes #4058
2020-11-10Merge pull request #4242 from wizeman/fix-stack-overflowEelco Dolstra
Fix stack overflow introduced in #4206
2020-11-10Merge pull request #4233 from Kha/masterEelco Dolstra
nix develop: Preserve stdin with `-c`
2020-11-10Fix stack overflow introduced in #4206Ricardo M. Correia
2020-11-09Bump cachix/install-nix-action from v11 to v12 (#4237)dependabot[bot]
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from v11 to v12. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v11...07da2520eebede906fbeefa9dd0a2b635323909d) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09Add test case for incidentally fixed #4228Sebastian Ullrich
2020-11-09Make test case more preciseSebastian Ullrich
Co-authored-by: Théophane Hufschmitt <regnat@users.noreply.github.com>
2020-11-09nix develop: Preserve stdin with `-c`Sebastian Ullrich
2020-11-09Fix appending to Setting<StringSet>Eelco Dolstra
Fixes: warning: unknown setting 'extra-sandbox-paths'
2020-11-05Allow substituting paths when building remotely using `ssh-ng://`Maximilian Bosch
Until now, it was not possible to substitute missing paths from e.g. `https://cache.nixos.org` on a remote server when building on it using the new `ssh-ng` protocol. This is because every store implementation except legacy `ssh://` ignores the substitution flag passed to `Store::queryValidPaths` while the `legacy-ssh-store` substitutes the remote store using `cmdQueryValidPaths` when the remote store is opened with `nix-store --serve`. This patch slightly modifies the daemon protocol to allow passing an integer value suggesting whether to substitute missing paths during `wopQueryValidPaths`. To implement this on the daemon-side, the substitution logic from `nix-store --serve` has been moved into a protected method named `Store::substitutePaths` which gets currently called from `LocalStore::queryValidPaths` and `Store::queryValidPaths` if `maybeSubstitute` is `true`. Fixes #2770
2020-11-05Merge pull request #4206 from hercules-ci/fix-coroutine-gcEelco Dolstra
Fix memory corruption caused by GC-invisible coroutine stacks
2020-11-03Fix error message 'assertion failed at'Eelco Dolstra
2020-11-03LocalStore: Get rid of recursive_mutexEelco Dolstra
2020-11-03Add FIXMEEelco Dolstra
2020-11-03Merge pull request #4214 from grahamc/test-nix-copy-closureDomen Kožar
nix-copy-closure: verify it works with drvs
2020-11-02nix-copy-closure: verify it works with drvsGraham Christensen
Creates test coverage for #4210 and 7cf874c17d466d5cffdb0eb6215fcfe8930ed757
2020-11-02nix repl: Fix handling of multi-line expressionsEelco Dolstra
2020-11-02Don't use readDerivation() in addValidPath()Eelco Dolstra
readDerivation() requires a valid path. Fixes #4210.
2020-11-02docs: consistent console prompt (#4213)mkenigs
Everywhere else a $ is used
2020-11-02Merge pull request #4207 from hercules-ci/fix-RemoteStore-filterSource-deadlockEelco Dolstra
Fix RemoteStore pool deadlock in filterSource etc
2020-11-02Don't send eval-related settings to the daemonEelco Dolstra
2020-10-31Merge pull request #4209 from ↵Graham Christensen
hercules-ci/fix-restricted-store-addToStoreFromDump Restore RestrictedStore.addToStoreFromDump implementation
2020-10-31Restore RestrictedStore.addToStoreFromDump implementationRobert Hensing
It was accidentally removed in commit ca30abb3fb36440e5a13161c39647189036fc18f
2020-10-30BoehmGCStackAllocator: increase stack size to 8MBRobert Hensing
The default stack size was not based on the normal stack size and was too small.
2020-10-30Fix RemoteStore pool deadlock in filterSource etcRobert Hensing
2020-10-30Fix memory corruption caused by GC-invisible coroutine stacksRobert Hensing
Crucially this introduces BoehmGCStackAllocator, but it also adds a bunch of wiring to avoid making libutil depend on bdw-gc. Part of the solutions for #4178, #4200
2020-10-30Fix testEelco Dolstra
2020-10-30Merge pull request #4202 from hercules-ci/nix-shell-docEelco Dolstra
Nix shell doc
2020-10-30nix-shell.md: Extend shellHook exampleRobert Hensing
2020-10-30nix-shell.md: evaluated -> runRobert Hensing
Use "run" to avoid confusion with Nix evaluation. "evaluated" was intended to reference bash eval but it's ambiguous.
2020-10-29Fix assertion failure in tab completion for --optionEelco Dolstra
2020-10-29Generalize extra-* settingsEelco Dolstra
This removes the extra-substituters and extra-sandbox-paths settings and instead makes every array setting extensible by setting "extra-<name> = <value>" in the configuration file or passing "--<name> <value>" on the command line.
2020-10-29Merge pull request #4199 from stefanjaax/replaceWantedBySpecifiedEelco Dolstra
Alter "wanted:" to "specified:" in hash mismatch output
2020-10-29Merge pull request #4198 from mkenigs/capitalize-JSONEelco Dolstra
Capitalize JSON for consistency
2020-10-29Alter "wanted:" to "specified:" in hash mismatch outputstev
This makes it even clearer which of the two hashes was specified in the nix files. Some may think that "wanted" and "got" is obvious, but: "got" could mean "got in nix file" and "wanted" could mean "want to see in nix file".
2020-10-28Capitalize JSON for consistencyMatthew Kenigsberg
2020-10-28ConsistencyEelco Dolstra
2020-10-28Merge pull request #4194 from Ericson2314/skip-bad-staticEelco Dolstra
No x86_32 static nix jobs for now
2020-10-28No x86_32 static nix jobs for nowJohn Ericson
Fixes #4175