NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.38k stars 14.33k forks source link

nixos-rebuild: failed to create initrd secrets with memoryAllocator #93116

Open Izorkin opened 4 years ago

Izorkin commented 4 years ago

Describe the bug Error update current system. Error with nixops:

vm01-web.> failed to create initrd secrets: No such file or directory
vm01-web.> error: Traceback (most recent call last):
  File "/nix/store/4gwja7ngvgph6ziwp486xgb7laqwp773-nixops-1.7/lib/python2.7/site-packages/nixops/deployment.py", line 743, in worker
    raise Exception("unable to activate new configuration (exit code {})".format(res))
Exception: unable to activate new configuration (exit code 1)

After remove file /etc/ld-nix.so.preload:

vm01-web.> ● apparmor.service
vm01-web.>      Loaded: loaded (/nix/store/5i5hvjqrjjgzv4iajwg08qs54swys576-unit-apparmor.service/apparmor.service; enabled; vendor preset: enabled)
vm01-web.>      Active: failed (Result: exit-code) since Tue 2020-07-14 15:46:09 MSK; 1s ago
vm01-web.>     Process: 6150 ExecStart=/nix/store/2n8jviip5429k0s5pdsxw7b81r81zhsy-apparmor-parser-2.13.4/bin/apparmor_parser -rKv -I /nix/store/al19b89bpgxpxyi4ip7gfk7gpyiby1d2-apparmor-profiles-2.13.4/etc/apparmor.d /nix/store/6bar6kggcc2vjz9p0864jz2g1ik2n6ky-ping (code=exited, status=1/FAILURE)
vm01-web.>    Main PID: 6150 (code=exited, status=1/FAILURE)
vm01-web.>          IP: 0B in, 0B out
vm01-web.>         CPU: 14ms
vm01-web.>
vm01-web.> июл 14 15:46:08 web systemd[1]: Starting apparmor.service...
vm01-web.> июл 14 15:46:09 web apparmor_parser[6150]: Warning from stdin (line 1): config file '/etc/apparmor/parser.conf' not found
vm01-web.> июл 14 15:46:09 web apparmor_parser[6151]: AppArmor parser error for /nix/store/6bar6kggcc2vjz9p0864jz2g1ik2n6ky-ping in /nix/store/al19b89bpgxpxyi4ip7gfk7gpyiby1d2-apparmor-profiles-2.13.4/etc/apparmor.d/abstractions/nis at line 14: Invalid capability net_bind_service.
vm01-web.> июл 14 15:46:09 web systemd[1]: apparmor.service: Main process exited, code=exited, status=1/FAILURE
vm01-web.> июл 14 15:46:09 web systemd[1]: apparmor.service: Failed with result 'exit-code'.
vm01-web.> июл 14 15:46:09 web systemd[1]: Failed to start apparmor.service.
vm01-web.> error: Traceback (most recent call last):
  File "/nix/store/4gwja7ngvgph6ziwp486xgb7laqwp773-nixops-1.7/lib/python2.7/site-packages/nixops/deployment.py", line 743, in worker
    raise Exception("unable to activate new configuration (exit code {})".format(res))
Exception: unable to activate new configuration (exit code 4)

My configuration:

  imports = [
    <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
    <nixpkgs/nixos/modules/profiles/hardened.nix>
  ];

  environment.memoryAllocator.provider = "jemalloc";

Metadata

Used commit 196e480ef7cf3c743dffee9c1e51e21d34ec5584

Izorkin commented 4 years ago

Apparmor fixed in PR 93288. Error work with environment.memoryAllocator.provider = "jemalloc"; and glibc 2.31. How can fix it?

Izorkin commented 4 years ago

With

environment.memoryAllocator.provider = "scudo";

same error

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info