Nixpkgs: nixos-rebuild: failed to create initrd secrets with memoryAllocator

Created on 14 Jul 2020  Β·  2Comments  Β·  Source: NixOS/nixpkgs

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

  • system: "x86_64-linux"
  • host os: Linux 5.7.8-hardened, NixOS, 20.09.git.dc13f22cdc5 (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.7
  • channels(root): "nixos-20.09pre231830.fd1c513acae"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

Used commit 196e480ef7cf3c743dffee9c1e51e21d34ec5584

bug nixos

Most helpful comment

With

environment.memoryAllocator.provider = "scudo";

same error

All 2 comments

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

With

environment.memoryAllocator.provider = "scudo";

same error

Was this page helpful?
0 / 5 - 0 ratings