Describe the bug
I have reported an issue where restic panics upstream (https://github.com/restic/restic/issues/2919).
The panic shows /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.15.1 which does not exist and should not exist.
...
Sep 11 10:38:57 survey restic[6098]: will delete 224 packs and rewrite 1983 packs, this frees 4.523 GiB
Sep 11 11:47:37 survey restic[6098]: read tcp 78.47.220.153:33298->77.22.214.62:9001: read: connection reset by peer
Sep 11 11:47:37 survey restic[6098]: Load
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/internal/repository.DownloadAndHash
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/internal/repository/repository.go:786
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/internal/repository.Repack
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/internal/repository/repack.go:26
Sep 11 11:47:37 survey restic[6098]: main.pruneRepository
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/cmd_prune.go:278
Sep 11 11:47:37 survey restic[6098]: main.runForget
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/cmd_forget.go:215
Sep 11 11:47:37 survey restic[6098]: main.glob..func10
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/cmd_forget.go:22
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).execute
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:762
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).ExecuteC
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:852
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).Execute
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:800
Sep 11 11:47:37 survey restic[6098]: main.main
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/main.go:86
Sep 11 11:47:37 survey restic[6098]: runtime.main
Sep 11 11:47:37 survey restic[6098]: /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.15.1/share/go/src/runtime/proc.go:204
Sep 11 11:47:37 survey restic[6098]: runtime.goexit
Sep 11 11:47:37 survey restic[6098]: /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.15.1/share/go/src/runtime/asm_amd64.s:1374
Sep 11 11:47:37 survey restic[6098]: Repack
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/internal/repository.Repack
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/internal/repository/repack.go:28
Sep 11 11:47:37 survey restic[6098]: main.pruneRepository
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/cmd_prune.go:278
Sep 11 11:47:37 survey restic[6098]: main.runForget
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/cmd_forget.go:215
Sep 11 11:47:37 survey restic[6098]: main.glob..func10
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/cmd_forget.go:22
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).execute
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:762
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).ExecuteC
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:852
Sep 11 11:47:37 survey restic[6098]: github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).Execute
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:800
Sep 11 11:47:37 survey restic[6098]: main.main
Sep 11 11:47:37 survey restic[6098]: /build/go/src/github.com/restic/restic/cmd/restic/main.go:86
Sep 11 11:47:37 survey restic[6098]: runtime.main
Sep 11 11:47:37 survey restic[6098]: /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.15.1/share/go/src/runtime/proc.go:204
Sep 11 11:47:37 survey restic[6098]: runtime.goexit
Sep 11 11:47:37 survey restic[6098]: /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.15.1/share/go/src/runtime/asm_amd64.s:1374
Is this a problem with our package?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
no panic
Notify maintainers
@mbrgm
Metadata
"x86_64-linux"Linux 5.4.62, NixOS, 20.09pre-git (Nightingale)yesyesnix-env (Nix) 2.3.7/nix/var/nix/profiles/per-user/root/channels/nixosusing this branch https://github.com/davidak/nixpkgs/tree/survey-2020
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: restic
# a list of nixos modules affected by the problem
module:
Pretty sure this is because the Go infrastructure removes all references to the Go compiler (by replacing the store path with an impossible path) so the program doesn't depend on the compiler itself after it has been compiled... Though I could be totally wrong.
cc @zowoq who seems to be involved in our Go infra.
cc @NixOS/golang
This is intended to avoid store path references and add go as a runtime dependencies to every go package. This should not break anything in this case - also here the actual error is a closed connections from the looks of it. If you really want the original go paths than you can override fixupPhase for this package but this is really only cosmetics.
For reference here is where replace the references: https://github.com/NixOS/nixpkgs/blob/1350c410f6cc3b4ab2d819409d460fe732aaafbb/pkgs/development/go-modules/generic/default.nix#L237