aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-24boehmgc: Crude support for coroutinesRobert Hensing
Fixes the problem where a stack pointer outside the original thread causes the collector to crash. It could be made more accurate by recording the stack pointer every time we switch to a coroutine. We can use this information to update our own coroutine stacks like normal data. When the stack pointer is on a thread, we can add a field to GC_thread "fallback_sp" to be used when the thread sp is outside the original thread range.
2021-06-24BoehmGCStackAllocator: ignore stack protection pageRobert Hensing
This fixes a crash that looks like: ``` Thread 1 "nix-build" received signal SIGSEGV, Segmentation fault. 0x00007ffff7ad22a0 in GC_push_all_eager () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 (gdb) bt 0 0x00007ffff7ad22a0 in GC_push_all_eager () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 1 0x00007ffff7adeefb in GC_push_all_stacks () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 2 0x00007ffff7ad5ac7 in GC_mark_some () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 3 0x00007ffff7ad77bd in GC_stopped_mark () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 4 0x00007ffff7adbe3a in GC_try_to_collect_inner.part.0 () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 5 0x00007ffff7adc2a2 in GC_collect_or_expand () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 6 0x00007ffff7adc4f8 in GC_allocobj () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 7 0x00007ffff7adc88f in GC_generic_malloc_inner () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 8 0x00007ffff7ae1a04 in GC_generic_malloc_many () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 9 0x00007ffff7ae1c72 in GC_malloc_kind () from /nix/store/p1z58l18klf88iijpd0qi8yd2n9lhlk4-boehm-gc-8.0.4/lib/libgc.so.1 10 0x00007ffff7e003d6 in nix::EvalState::allocValue() () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 11 0x00007ffff7e04b9c in nix::EvalState::callPrimOp(nix::Value&, nix::Value&, nix::Value&, nix::Pos const&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 12 0x00007ffff7e0a773 in nix::EvalState::callFunction(nix::Value&, nix::Value&, nix::Value&, nix::Pos const&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 13 0x00007ffff7e0a91d in nix::ExprApp::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 14 0x00007ffff7e0a8f8 in nix::ExprApp::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 15 0x00007ffff7e0e0e8 in nix::ExprOpNEq::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 16 0x00007ffff7e0d708 in nix::ExprOpOr::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 17 0x00007ffff7e0d695 in nix::ExprOpOr::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 18 0x00007ffff7e0d695 in nix::ExprOpOr::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 19 0x00007ffff7e0d695 in nix::ExprOpOr::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 20 0x00007ffff7e0d695 in nix::ExprOpOr::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 21 0x00007ffff7e09e19 in nix::ExprOpNot::eval(nix::EvalState&, nix::Env&, nix::Value&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 22 0x00007ffff7e0a792 in nix::EvalState::callFunction(nix::Value&, nix::Value&, nix::Value&, nix::Pos const&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 23 0x00007ffff7e8cba0 in nix::addPath(nix::EvalState&, nix::Pos const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Value*, nix::FileIngestionMethod, std::optional<nix::Hash>, nix::Value&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)#1}::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixexpr.so 24 0x00007ffff752e6f9 in nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 25 0x00007ffff752e8e2 in nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 26 0x00007ffff752e8e2 in nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 27 0x00007ffff752e8e2 in nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 28 0x00007ffff752e8e2 in nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 29 0x00007ffff752e8e2 in nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 30 0x00007ffff757f8c0 in void boost::context::detail::fiber_entry<boost::context::detail::fiber_record<boost::context::fiber, nix::VirtualStackAllocator, boost::coroutines2::detail::pull_coroutine<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::control_block::control_block<nix::VirtualStackAllocator, nix::sinkToSource(std::function<void (nix::Sink&)>, std::function<void ()>)::SinkToSource::read(char*, unsigned long)::{lambda(boost::coroutines2::detail::push_coroutine<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&)#1}>(boost::context::preallocated, nix::VirtualStackAllocator&&, nix::sinkToSource(std::function<void (nix::Sink&)>, std::function<void ()>)::SinkToSource::read(char*, unsigned long)::{lambda(boost::coroutines2::detail::push_coroutine<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&)#1}&&)::{lambda(boost::context::fiber&&)#1}> >(boost::context::detail::transfer_t) () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libnixutil.so 31 0x00007ffff6f331ef in make_fcontext () from /nix/store/hzdzcv9d3bc8rlsaphh7x54zsf0x8nx6-nix-2.4pre20210601_5985b8b/lib/libboost_context.so.1.69.0 32 0x0000000000000000 in ?? () ```
2021-06-15nix develop: Filter out NIX_REMOTEEelco Dolstra
When recursive Nix is enabled, NIX_REMOTE is set to unix:///build/.nix-socket, which doesn't work outside of the sandbox.
2021-06-04Merge pull request #4889 from puckipedia/fix-atomic-sunosEelco Dolstra
configure.ac: fix use of unread LIBS variable
2021-06-04configure.ac: fix use of unread LIBS variablePuck Meerburg
This fixes both the SunOS/Solaris check, and the libatomic check, which reference $LIBS, which has not been used since automake was stripped out of the code.
2021-06-02Merge pull request #4871 from chuahou/masterEelco Dolstra
Install zsh completion script
2021-06-02Merge pull request #4879 from keke-cute/fix-optional-namespaceEelco Dolstra
Fix error: 'optional' in namespace 'std' does not name a template type
2021-06-02fix error: 'optional' in namespace 'std' does not name a template typekeke
2021-06-02flake.lock: UpdateDomen Kožar
Flake input changes: * Updated 'nixpkgs': 'github:NixOS/nixpkgs/3a2e0c36e79cecaf196cbea23e75e74710140ea4' -> 'github:NixOS/nixpkgs/bb8a5e54845012ed1375ffd5f317d2fdf434b20e'
2021-06-02Merge pull request #4878 from NixOS/flake-check-keep-goingEelco Dolstra
Let nix flake check keep going when keep-going is set
2021-06-02doc: Wrap at 80 charactersregnat
2021-06-02Fix a documentation typoThéophane Hufschmitt
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-06-02throw_ -> reportErrorregnat
This function might or might not throw depending on the value of `keepGoing`, so naming it `throw_` was a bit confusing
2021-06-02Let `nix flake check` keep going when keep-going is setregnat
When the `keep-going` option is set to `true`, make `nix flake check` continue as much as it can before failing. The UI isn’t perfect as-it-is as all the lines currently start with a mostly useless `error (ignored): error:` prefix, but I’m not sure what the best output would be, so I’ll leave it as-it-is for the time being (This is a bit hijacking the `keep-going` flag as it’s supposed to be a build-time only thing. But I think it’s faire to reuse it here). Fix https://github.com/NixOS/nix/issues/4450
2021-06-02Install zsh completion scriptChua Hou
2021-06-01Check the CA hash when importing stuff in the local storeregnat
When adding a path to the local store (via `LocalStore::addToStore`), ensure that the `ca` field of the provided `ValidPathInfo` does indeed correspond to the content of the path. Otherwise any untrusted user (or any binary cache) can add arbitrary content-addressed paths to the store (as content-addressed paths don’t need a signature).
2021-06-01Merge pull request #4866 from alyssais/libdlEelco Dolstra
Only link with libdl on Linux
2021-06-01Merge pull request #4864 from jeremyschlatter/fix-typoEelco Dolstra
Fix typo in documentation
2021-06-01Run autoupdateEelco Dolstra
2021-06-01Merge branch 'aarch64-darwin' of https://github.com/Kloenk/nixos-nixEelco Dolstra
2021-06-01Merge pull request #4734 from p01arst0rm/fix-s3-ifdefEelco Dolstra
unified macro style for ENABLE_S3
2021-06-01Only link with libdl on LinuxAlyssa Ross
Linux is (as far as I know) the only mainstream operating system that requires linking with libdl for dlopen. On BSD, libdl doesn't exist, so on non-FreeBSD BSDs linking will currently fail. On macOS, it's apparently just a symlink to libSystem (macOS libc), presumably present for compatibility with things that assume Linux. So the right thing to do here is to only add -ldl on Linux, not to add it for everything that isn't FreeBSD.
2021-06-01Include aarch64-darwin in installerFinn Behrens
Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
2021-06-01enable aarch64-darwin buildFinn Behrens
disable lowdown sandbox on aarch64-darwin
2021-06-01Fix typo in documentationJeremy Schlatter
2021-05-31Merge pull request #4855 from timothyklim/masterEelco Dolstra
Add .tar.zst support for TarballInputScheme
2021-05-29Build for aarch64-darwinDomen Kožar
2021-05-29Add .tar.zst support for TarballInputSchemeTimothy Klim
2021-05-28Merge pull request #4849 from NixOS/ca/fix-nix-store--exportEelco Dolstra
Make the Nar hash non modulo
2021-05-28Merge pull request #4853 from Synthetica9/no-freenodeEelco Dolstra
Throw freenode down the memory hole
2021-05-27throw freenode down the memory holePatrick Hilhorst
2021-05-26Remove the remaining occurenceses of a NarHash moduloregnat
2021-05-25Make the Nar hash non moduloregnat
It makes much more sense to have the Nar hash be a plain straight hash rather than a hash modulo
2021-05-25Merge pull request #4846 from michaeladler/fix-docEelco Dolstra
fix doc: nix profile info -> nix profile list
2021-05-24fix doc: nix profile info -> nix profile listMichael Adler
Signed-off-by: Michael Adler <therisen06@gmail.com>
2021-05-19Merge pull request #4834 from NixOS/generic-closure-functionEelco Dolstra
Extract a generic `computeClosure` function
2021-05-19Extract a generic `computeClosure` functionregnat
Move the `closure` logic of `computeFSClosure` to its own (templated) function. This doesn’t bring much by itself (except for the ability to properly test the “closure” functionality independently from the rest), but it allows reusing it (in particular for the realisations which will require a very similar closure computation)
2021-05-19Merge pull request #4831 from matthewbauer/fix-extra-slash-in-canon-pathEelco Dolstra
Fix extra slash in canonPath output
2021-05-18Fix extra slash in canonPath outputMatthew Bauer
When you have a symlink like: /tmp -> ./private/tmp you need to resolve ./private/tmp relative to /tmp’s dir: ‘/’. Unlike any other path output by dirOf, / ends with a slash. We don’t want trailing slashes here since we will append another slash in the next comoponent, so clear s like we would if it was a symlink to an absoute path. This should fix at least part of the issue in https://github.com/NixOS/nix/issues/4822, will need confirmation that it actually fixes the problem to close though. Introduced in f3f228700a52857fe6e8632df4e935551ea219ff.
2021-05-18Merge pull request #4828 from NixOS/ca/fix-nix-runEelco Dolstra
Restore an accidentally suppressed negation
2021-05-18Restore an accidentally suppressed negationregnat
Accidentally removed in ca96f5219489c1002499bfe2c580fdd458219144. This caused `nix run` to systematically fail with ``` error: app program '/nix/store/…' is not in the Nix store ```
2021-05-18Merge pull request #4827 from matthewbauer/run-bashrc-first-in-nix-developEelco Dolstra
Source bashrc first in nix develop
2021-05-18Merge pull request #4825 from NixOS/split-app-parsing-and-resolvingEelco Dolstra
Split the parsing of an `App` and its resolving
2021-05-17Source bashrc first in nix developMatthew Bauer
~/.bashrc should be sourced first in the rc script so that PATH & other env vars give precedence over the bashrc PATH. Also, in my bashrc I alias rm as: alias rm='rm -Iv' To avoid running this alias (which shows ‘removed '/tmp/nix-shell.*'), we can just prefix rm with command.
2021-05-17Split the parsing of an `App` and its resolvingregnat
That way things (like `nix flake check`) can evaluate the `app` outputs without having to build anything
2021-05-17Merge pull request #4819 from NixOS/ca/fix-nix-runEelco Dolstra
Resolve the program path in `nix run`
2021-05-17Merge pull request #4818 from NixOS/ca/cli-use-builtpathsEelco Dolstra
Enforce the use of properly built paths in libcmd
2021-05-17Add a test for `nix run` with CA derivationsregnat
2021-05-17Merge pull request #4817 from ↵Eelco Dolstra
emilazy/fix-sandboxed-big-sur-system-version-access sandbox: allow SystemVersionCompat.plist on Darwin
2021-05-17Resolve the program path in `nix run`regnat
Fix #4768