Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.24-maintenance] addToStore(): Evaluate on the main stack #11360

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

edolstra
Copy link
Member

Motivation

We observed a segfault on macOS with Nix 2.24.3 in BDW-GC inside a coroutine:

  * frame #0: 0x0000000100542f49 libgc.1.dylib`GC_push_all_stack + 201
    frame #1: 0x0000000100537a6b libgc.1.dylib`GC_default_push_other_roots + 1115
    frame #2: 0x000000010053dbe5 libgc.1.dylib`GC_push_roots + 2181
...
    frame #11: 0x0000000100801846 libnixexpr.dylib`nix::EvalState::allocBindings(unsigned long) + 102
...
    frame #64: 0x0000000100ed2708 libnixutil.dylib`nix::SourceAccessor::dumpPath(nix::CanonPath const&, nix::Sink&, std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)>&) + 216
    frame #65: 0x0000000100f63578 libnixutil.dylib`void boost::context::detail::fiber_entry<boost::context::detail::fiber_record<boost::context::fiber, nix::VirtualStackAllocator, boost::coroutines2::detail::pull_coroutine<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::control_block::control_block<nix::VirtualStackAllocator, nix::sinkToSource(std::__1::function<void (nix::Sink&)>, std::__1::function<void ()>)::SinkToSource::read(char*, unsigned long)::'lambda'(boost::coroutines2::detail::push_coroutine<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&)>(boost::context::preallocated, nix::VirtualStackAllocator&&, nix::sinkToSource(std::__1::function<void (nix::Sink&)>, std::__1::function<void ()>)::SinkToSource::read(char*, unsigned long)::'lambda'(boost::coroutines2::detail::push_coroutine<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&)&&)::'lambda'(boost::context::fiber&&)>>(boost::context::detail::transfer_t) + 216
    frame #66: 0x000000010040da2f libboost_context.dylib`trampoline + 3

Switching to Nix master made the segfault go away, so it's likely that #11152 fixed this issue.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added documentation store Issues and pull requests concerning the Nix store labels Aug 23, 2024
@edolstra edolstra requested a review from roberth August 23, 2024 12:29
@edolstra edolstra merged commit cb0439f into NixOS:2.24-maintenance Aug 23, 2024
13 checks passed
@edolstra edolstra deleted the backport-11152 branch August 23, 2024 13:08
@emilazy emilazy mentioned this pull request Aug 25, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation store Issues and pull requests concerning the Nix store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant