nix-community / lorri

Your project’s nix-env [maintainer=@Profpatsch,@nyarly]
Apache License 2.0
677 stars 24 forks source link

Lorri Crash Report #96

Closed ZachFontenot closed 2 months ago

ZachFontenot commented 1 year ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Upgrade to MacOS Ventura
  2. Nix gets blown up
  3. Reinstall Nix after Uninstalling

Expected behavior

Permission isn't an issue with Nix tools

Metadata

name = 'lorri'
operating_system = 'unix:OSX'
crate_version = '1.6.0'
explanation = '''
Panic occurred in file 'src/build_loop.rs' at line 238
'''
cause = '''
Unrecoverable error:
Io {
    msg: "AddRootError { source: Os { code: 13, kind: PermissionDenied, message: \"Permission denied\" }, msg: \"Failed to symlink /Users/zachary.fontenot/Library/Caches/com.github.nix-community.lorri.lorri.lorri/gc_roots/a3d0adcfdf492e50ffe5a2ecd4ae5030/gc_root/shell_gc_root to /nix/var/nix/gcroots/per-user/zachary.fontenot/a3d0adcfdf492e50ffe5a2ecd4ae5030-shell_gc_root\" }",
}'''
method = 'Panic'
backtrace = '''

   0: 0x10b5f9933 - <unresolved>
   1: 0x10b3f3649 - <unresolved>
   2: 0x10b42a298 - <unresolved>
   3: 0x10b3fdabf - <unresolved>
   4: 0x10b5b7bf7 - <unresolved>
   5: 0x7ff8158af1d3 - __pthread_start'''
$ lorri info
GC roots exist, shell_gc_root: /Users/zachary.fontenot/Library/Caches/com.github.nix-community.lorri.lorri.lorri/gc_roots/a3d0adcfdf492e50ffe5a2ecd4ae5030/gc_root/shell_gc_root
$ uname -a
Darwin AC02GJ1EVMD6Q 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64 i386 Darwin

Additional context

I know what happened, but I don't know how to fix it without breaking more things. Namely the directories are owned by root with group nixbld, but this isn't the same nixbld group as previously existed. The first problem I had was with home-manager, but I managed to get that to work by deleting all of my channel links and rebuilding them. But chown and remaking the dirs under gcroots doesn't seem to help. And I'm not comfortable going up the path to /nix/var/nix and deleting that or whatever. I hate mac

nyarly commented 3 months ago

Hey @ZachFontenot, I think this is related to https://github.com/nix-community/lorri/issues/119#issuecomment-2195297067

nyarly commented 2 months ago

This bug is fixed in 1.7.0, which is in nixpkgs as of NixOS 24.05. Thank you for your patience!