Skip to content

nix-env dies and logouts running user if running nix from linux container(LXC) in multy user mode #105

Closed as not planned

Description

@offlinehacker

I don't know what causes this error to happen, but disables me to use nix while updating channel and installing new packages if in multy user mode. First i taught it was related with ubuntu root filesystem in linux container, but it reappeared in debian rootfs filesystem at the end of installing of a profile(for some wierd reason it didn't happen when installing single packages like hello or vim).

This is output from strace of a nix-daemon at the end when it dies:

[pid 324] unlink("/nix/var/nix/db/db.sqlite-shm") = 0
[pid 324] munmap(0x7fdd4d7bc000, 32768) = 0
[pid 324] close(9) = 0
[pid 324] close(8) = 0
[pid 324] close(7) = 0
[pid 324] unlink("/nix/var/nix/db/db.sqlite-wal") = 0
[pid 324] fcntl(6, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=1073741824, len=2}) = 0
[pid 324] fcntl(6, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
[pid 324] close(6) = 0
[pid 324] close(5) = 0
[pid 324] close(15) = 0
[pid 324] close(18) = 0
[pid 324] close(11) = 0
[pid 324] unlink("/nix/var/nix/temproots/324") = 0
[pid 324] exit_group(0) = ?
Process 324 detached
<... accept resumed> 0x7fffdb9106f0, [110]) = ? ERESTARTSYS (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---

And from the nix-env itself:

open("/nix/store/vaaz708dnxh8hj1s3g527p0qydaq1n7p-vim_configurable-7.3.drv", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=3682, ...}) = 0
read(4, "Derive([("out","/nix/store/p4i5k"..., 3682) = 3682
close(4) = 0
write(3, "\1\0\0\0\0\0\0\0@\0\0\0\0\0\0\0/nix/store/p4i5k"..., 80) = 80
read(3, "stla\0\0\0\0\1\0\0\0\0\0\0\0", 32768) = 16
write(2, "these derivations will be built:"..., 33these derivations will be built:
) = 33
write(2, " /nix/store/wbsd1n91pj6mld1rbfc"..., 59 /nix/store/wbsd1n91pj6mld1rbfcvpp554b0jc2lh-standard.drv
) = 59
write(3, "\t\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0008\0\0\0\0\0\0\0/nix/sto"..., 80) = 80
read(3, Connection to 172.16.10.15 closed by remote host.
Connection to 172.16.10.15 closed.

It turns out that it works just fine in single user mode.

Activity

  1. gilligan commented on Mar 6, 2020

    @gilligan
    Contributor

    @offlinehacker this has been reported quite a while ago, can you still reproduce this? Can you provide instructions to reproduce this in case this is still relevant?

  2. stale commented on Feb 15, 2021

    @stale

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

  3. stale commented on Apr 30, 2022

    @stale

    I closed this issue due to inactivity. → More info

  4. added a commit that references this issue on Jan 1, 2024
  5. removed their assignment
    on Apr 26, 2024
  6. added a commit that references this issue on Jul 25, 2025
  7. tomberek commented on Aug 13, 2026

    @tomberek
    Contributor

    Closing as stale. Re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions