Stream: nixos

Topic: QEMU internal SIGSEGV


view this post on Zulip Srid (Feb 20 2024 at 22:29):

Looks like we can't emulate x86_64-linux builds on aarch64-linux for all packages, like the treefmt-nix check,

treefmt-check> qemu-x86_64: QEMU internal SIGSEGV {code=MAPERR, addr=0x20}
treefmt-check> /build/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 22:    31 Segmentation fault      (core dumped) treefmt --version
error: builder for '/nix/store/rwsarq4sga22kchk3k2rhi30mjv6f4zd-treefmt-check.drv' failed with exit code 139;
       last 3 log lines:
       > Initialized empty Git repository in /build/project/.git/
       > qemu-x86_64: QEMU internal SIGSEGV {code=MAPERR, addr=0x20}
       > /build/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 22:    31 Segmentation fault      (core dumped) treefmt --version
       For full logs, run 'nix log /nix/store/rwsarq4sga22kchk3k2rhi30mjv6f4zd-treefmt-check.drv'.

https://github.com/srid/emanote/actions/runs/7980820965/job/21791270125

view this post on Zulip Tim DeHerrera (Feb 20 2024 at 22:35):

is this using the binfmt.emulatedSystems?

view this post on Zulip Srid (Feb 20 2024 at 22:40):

Yes.

view this post on Zulip Srid (Feb 20 2024 at 22:40):

https://github.com/srid/nixos-config/blob/df99c7efb60b93233ef6e626d4053afba0887ea0/systems/here.nix#L14

view this post on Zulip Srid (Feb 21 2024 at 13:23):

Another instance when building neovim-ruby-env

error: builder for '/nix/store/zyh6qa2nvjp9hnm0i1biv1lfzbixwmy8-neovim-ruby-env.drv' failed with exit code 139;
       last 3 log lines:
       > created 12 symlinks in user environment
       > qemu-x86_64: QEMU internal SIGSEGV {code=MAPERR, addr=0x20}
       > /build/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 8:    13 Segmentation fault      (core dumped) /nix/store/lpp53qxl39gc5vwvd8qn6ps6nh6kkffk-ruby-3.1.4/bin/ruby /nix/store/bcjdfm46ck1qfgc3vqkxxvp8jfwfprjl-gen-bin-stubs.rb "/nix/store/lpp53qxl39gc5vwvd8qn6ps6nh6kkffk-ruby-3.1.4/bin/ruby" "/nix/store/vljdmnfbkn57ld6n0p3kfjpxs8cmgv6b-gemfile-and-lockfile/Gemfile" "$out/lib/ruby/gems/3.1.0" "/nix/store/nfrdd8k4q5qwwhnghkvxaap96vlxmbmm-bundler-2.5.5/lib/ruby/gems/3.1.0/gems/bundler-2.5.5" '/nix/store/gpi0yf9rmzk18p3q421hajjk0iiwgm2c-ruby3.1-msgpack-1.5.1 /nix/store/c3p395d3p9w5ri0a8pb0nb0r37mda35l-ruby3.1-multi_json-1.15.0 /nix/store/mj9z389y61dvva11fi5nhf51caf6kpmk-ruby3.1-neovim-0.9.0 /nix/store/nfrdd8k4q5qwwhnghkvxaap96vlxmbmm-bundler-2.5.5' ''
       For full logs, run 'nix log /nix/store/zyh6qa2nvjp9hnm0i1biv1lfzbixwmy8-neovim-ruby-env.drv'.

This is just arm64 build (no emulation). So I don't know where qemu-x86_64 is coming into picture. :-/

https://github.com/srid/nixos-config/actions/runs/7989424170/job/21816714621

view this post on Zulip Srid (Feb 21 2024 at 13:29):

Huh, why is it using x86 ruby as build dependency?

# nix run nixpkgs#file /nix/store/lpp53qxl39gc5vwvd8qn6ps6nh6kkffk-ruby-3.1.4/bin/ruby
/nix/store/lpp53qxl39gc5vwvd8qn6ps6nh6kkffk-ruby-3.1.4/bin/ruby: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/cyrrf49i2hm1w7vn2j945ic3rrzgxbqs-glibc-2.38-44/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, not stripped

view this post on Zulip Srid (Feb 21 2024 at 13:30):

Because zyh6qa2nvjp9hnm0i1biv1lfzbixwmy8-neovim-ruby-env.drv is being built for that system
.

view this post on Zulip Srid (Feb 21 2024 at 13:34):

Oh, it is building the x86 configuration, because nixci (via devour-flake) will return all Linux systems,

https://github.com/srid/devour-flake/blob/c89ad7a611caef31899292bc8f9aae9e7aa251cb/flake.nix#L34-L35


Last updated: Nov 15 2024 at 12:33 UTC