Crash running nix flake update #759

Closed
opened 2025-03-24 18:10:26 +00:00 by 9p4 · 4 comments

Describe the bug

When running nix flake update, Lix crashes occasionally.

Steps To Reproduce

  1. Run nix flake update in my Nix configs at commit 8c4a394 with the same version of Lix

Expected behavior

I expected nix flake update to not crash.

nix --version output

nix (Lix, like Nix) 2.93.0-dev-pre20250319-2491b7c
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/ersei/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/home/ersei/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/share

Additional context

warning: error: unable to download 'https://api.github.com/repos/nix-community/home-manager/commits/master': Resolving timed out after 5000 milliseconds (curl error code=28); retrying in 314 ms (attempt 1/5)
downloading 'https://api.github.com/repos/nix-community/home-manager/commits/master'Lix crashed. This is a bug. We would appreciate if you report it along with what caused it at https://git.lix.systems/lix-project/lix/issues with the following information included:

Exception: nlohmann::json_abi_v3_11_3::detail::parse_error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '<U+001F>'
Stack trace:
 0# nix::getStackTrace[abi:cxx11]() in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixutil.so
 1# 0x00007F4E759FE853 in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixmain.so
 2# 0x00007F4E748BF20A in /nix/store/6kbrc4ca98srlfpgyaayl2q9zpg1gys6-gcc-14-20241116-lib/lib/libstdc++.so.6
 3# std::unexpected() in /nix/store/6kbrc4ca98srlfpgyaayl2q9zpg1gys6-gcc-14-20241116-lib/lib/libstdc++.so.6
 4# 0x00007F4E748BF1FE in /nix/store/6kbrc4ca98srlfpgyaayl2q9zpg1gys6-gcc-14-20241116-lib/lib/libstdc++.so.6
 5# void boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void>::wide_value_check<boost::outcome_v2::detail::basic_result_value_observers<boost::outcome_v2::detail::basic_result_storage<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> >, std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> > >(boost::outcome_v2::detail::basic_result_value_observers<boost::outcome_v2::detail::basic_result_storage<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> >, std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> >&&) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so
 6# std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef> nix::detail::runAsyncUnwrap<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef> >(boost::outcome_v2::basic_result<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, std::conditional<false, boost::outcome_v2::policy::terminate, std::conditional<false, boost::outcome_v2::policy::error_code_throw_as_system_error<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void>, std::conditional<true, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void>, boost::outcome_v2::policy::fail_to_compile_observers>::type>::type>::type>) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so
 7# 0x00007F4E7502F8E9 in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so
 8# 0x00007F4E7503E2F5 in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so
 9# 0x00007F4E7503B9FF in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so
10# nix::flake::lockFlake(nix::EvalState&, nix::FlakeRef const&, nix::flake::LockFlags const&) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so
11# 0x000055C2C0E2E581 in nix
12# nix::StoreCommand::run() in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixcmd.so
13# 0x000055C2C0E2CF0A in nix
14# 0x000055C2C0E6AB50 in nix
15# 0x000055C2C0E6D4DD in nix
16# nix::handleExceptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()>) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixmain.so
17# 0x000055C2C0E6CF9B in nix
18# 0x00007F4E7442A1FE in /nix/store/cmpyglinc9xl9pr4ymx8akl286ygl64x-glibc-2.40-66/lib/libc.so.6
19# __libc_start_main in /nix/store/cmpyglinc9xl9pr4ymx8akl286ygl64x-glibc-2.40-66/lib/libc.so.6
20# 0x000055C2C0D986A5 in nix

fish: Job 1, '/nix/store/vgn2m44a8jx891zblms5…' terminated by signal SIGABRT (Abort)
## Describe the bug When running `nix flake update`, Lix crashes occasionally. ## Steps To Reproduce 1. Run `nix flake update` in my Nix configs at commit [8c4a394](https://git.ersei.net/nix-configs.git/commit/?id=8c4a39432ae3856b3d129a05b91c444b08eb7f75) with the same version of Lix ## Expected behavior I expected `nix flake update` to not crash. ## `nix --version` output ``` nix (Lix, like Nix) 2.93.0-dev-pre20250319-2491b7c System type: x86_64-linux Additional system types: aarch64-linux, i686-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/ersei/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/home/ersei/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/share ``` ## Additional context ``` warning: error: unable to download 'https://api.github.com/repos/nix-community/home-manager/commits/master': Resolving timed out after 5000 milliseconds (curl error code=28); retrying in 314 ms (attempt 1/5) downloading 'https://api.github.com/repos/nix-community/home-manager/commits/master'Lix crashed. This is a bug. We would appreciate if you report it along with what caused it at https://git.lix.systems/lix-project/lix/issues with the following information included: Exception: nlohmann::json_abi_v3_11_3::detail::parse_error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '<U+001F>' Stack trace: 0# nix::getStackTrace[abi:cxx11]() in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixutil.so 1# 0x00007F4E759FE853 in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixmain.so 2# 0x00007F4E748BF20A in /nix/store/6kbrc4ca98srlfpgyaayl2q9zpg1gys6-gcc-14-20241116-lib/lib/libstdc++.so.6 3# std::unexpected() in /nix/store/6kbrc4ca98srlfpgyaayl2q9zpg1gys6-gcc-14-20241116-lib/lib/libstdc++.so.6 4# 0x00007F4E748BF1FE in /nix/store/6kbrc4ca98srlfpgyaayl2q9zpg1gys6-gcc-14-20241116-lib/lib/libstdc++.so.6 5# void boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void>::wide_value_check<boost::outcome_v2::detail::basic_result_value_observers<boost::outcome_v2::detail::basic_result_storage<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> >, std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> > >(boost::outcome_v2::detail::basic_result_value_observers<boost::outcome_v2::detail::basic_result_storage<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> >, std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void> >&&) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so 6# std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef> nix::detail::runAsyncUnwrap<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef> >(boost::outcome_v2::basic_result<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, std::conditional<false, boost::outcome_v2::policy::terminate, std::conditional<false, boost::outcome_v2::policy::error_code_throw_as_system_error<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void>, std::conditional<true, boost::outcome_v2::policy::exception_ptr_rethrow<std::tuple<nix::fetchers::Tree, nix::FlakeRef, nix::FlakeRef>, std::__exception_ptr::exception_ptr, void>, boost::outcome_v2::policy::fail_to_compile_observers>::type>::type>::type>) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so 7# 0x00007F4E7502F8E9 in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so 8# 0x00007F4E7503E2F5 in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so 9# 0x00007F4E7503B9FF in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so 10# nix::flake::lockFlake(nix::EvalState&, nix::FlakeRef const&, nix::flake::LockFlags const&) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixexpr.so 11# 0x000055C2C0E2E581 in nix 12# nix::StoreCommand::run() in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixcmd.so 13# 0x000055C2C0E2CF0A in nix 14# 0x000055C2C0E6AB50 in nix 15# 0x000055C2C0E6D4DD in nix 16# nix::handleExceptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()>) in /nix/store/0z44c1bg3s7f2rw7z8b2ryvzncz3bqv3-lix-2.93.0-dev-pre20250319-2491b7c/lib/liblixmain.so 17# 0x000055C2C0E6CF9B in nix 18# 0x00007F4E7442A1FE in /nix/store/cmpyglinc9xl9pr4ymx8akl286ygl64x-glibc-2.40-66/lib/libc.so.6 19# __libc_start_main in /nix/store/cmpyglinc9xl9pr4ymx8akl286ygl64x-glibc-2.40-66/lib/libc.so.6 20# 0x000055C2C0D986A5 in nix fish: Job 1, '/nix/store/vgn2m44a8jx891zblms5…' terminated by signal SIGABRT (Abort) ```
Member

It seems to be a duplicate of #753 I opened I couple of days ago. For me it want away when I reran nix flake update and never came back, is it always crashing on your side?

It seems to be a duplicate of #753 I opened I couple of days ago. For me it want away when I reran `nix flake update` and never came back, is it always crashing on your side?
Author

It has only crashed once so far, but that "once" was when DNS was timing out on the first attempt. I'll see if that is part of the issue.

It has only crashed once so far, but that "once" was when DNS was timing out on the first attempt. I'll see if that is part of the issue.
Author

I forced a DNS timeout and the crash did not happen, so it might be something else instead. I'll poke around the coredump.

I forced a DNS timeout and the crash did not happen, so it might be something else instead. I'll poke around the coredump.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2907 ("treewide: handle JSON parse errors")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2907", "number": 2907, "kind": "commit message"}], "cl_meta": {"2907": {"change_title": "treewide: handle JSON parse errors"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2907](https://gerrit.lix.systems/c/lix/+/2907) ("treewide: handle JSON parse errors")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#759
No description provided.