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

hydra-eval-jobs crashes with SIGSEGV when evaluating a specific nixos toplevel #1409

Open
linyinfeng opened this issue Sep 19, 2024 · 2 comments
Labels

Comments

@linyinfeng
Copy link
Member

Describe the bug

hydra-eval-jobs crashes with SIGSEGV when evaluating my nixos toplevel when I am using niri-flake's config.lib.niri.actions in my configuration.

The same toplevel can be successfully evaluated using nix.

Remove config.lib.niri.actions from my configuration (the commit), the toplevel can be successfully evaluated.

I created a gist holding the coredump information and I host the core file in https://static.li7g.com/hydra-eval-jobs.core.zst.

To Reproduce

Steps to reproduce the behavior: https://gist.github.com/linyinfeng/b94fea3293dabe14bf9246f5a05fc541#file-reproduce-sh

Expected behavior

No coredump.

Hydra Server:

github:nixos/nixpkgs/99dc8785f6a0adac95f5e2ab05cc2e1bf666d172#hydra (current (2024-09-19) nixos-unstable)

Additional context

The crash happens in libnixexpr.so. So the issue seems to be highly related to https://github.com/nixos/nix, but I can not reproduce the same behavior with nix.

@linyinfeng linyinfeng added the bug label Sep 19, 2024
@Mic92
Copy link
Member

Mic92 commented Sep 20, 2024

@linyinfeng can you reproduce the same issue with nix-eval-jobs? It could be a stack overflow.

@linyinfeng
Copy link
Member Author

@linyinfeng can you reproduce the same issue with nix-eval-jobs? It could be a stack overflow.

I tried the following command. It outputted nothing (except some warnings/fetching information) and exited with status code 0.

$ nix shell github:nixos/nixpkgs/99dc8785f6a0adac95f5e2ab05cc2e1bf666d172#nix-eval-jobs \
  --command \
  nix-eval-jobs \
  --flake github:linyinfeng/dotfiles/de751ffa5f6d27ef32753bab263f13ca7c47fe1e#hydraJobs
warning: unknown setting 'allowed-users'
warning: unknown setting 'extra-allowed-users'
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified

By adding --debug to the command I saw logs like this:

...
instantiated 'libunistring-1.2.tar.gz' -> '/nix/store/kq0mb8gd9zmblcf568vc6k6dlgmp6l09-libunistring-1.2.tar.gz.drv'
performing daemon worker op: 7
instantiated 'libunistring-1.2' -> '/nix/store/yxrg0x043lp0pyijblwbm89vbyqrfbm8-libunistring-1.2.drv'
performing daemon worker op: 7
instantiated 'libidn2-2.3.7.tar.gz' -> '/nix/store/jnfrr555w6xpqvwyvcav4r86yi4dyb10-libidn2-2.3.7.tar.gz.drv'
performing daemon worker op: 7
instantiated 'libidn2-2.3.7' -> '/nix/store/sngcd3gqdqqg8rbszrwh0qjf9mlpmx62-libidn2-2.3.7.drv'
performing daemon worker op: 7
instantiated 'glibc-2.39.tar.xz' -> '/nix/store/gxv8zyycd4g400h51gfzpg0isk3b7qqd-glibc-2.39.tar.xz.drv'
performing daemon worker op: 7
instantiated 'glibc-2.39-52' -> '/nix/store/ca3ks9a7cahwg0rn27pz3hf1h60r16sc-glibc-2.39-52.drv'
performing daemon worker op: 1
performing daemon worker op: 1
evaluating file '/nix/store/5nl0s0d4v9y2bjf80hrb476lys3dci00-source/modules/modules.nix'
killing process 179616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants