Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixd crashes repeatedly with SIGPIPE #591

Open
ian-h-chamberlain opened this issue Sep 10, 2024 · 2 comments
Open

nixd crashes repeatedly with SIGPIPE #591

ian-h-chamberlain opened this issue Sep 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ian-h-chamberlain
Copy link

Describe the bug

nixd crashes repeatedly until VSCode client decides not to restart it:

I[20:48:39.631] 60519: unhandled notification $/cancelRequest
I[20:48:39.631] 60519: <-- textDocument/inlayHint(6)
I[20:48:39.631] 60519: --> call attrset/attrpathInfo(3)
[Error - 8:48:39 PM] The Nix server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 8:48:39 PM] Server process exited with signal SIGPIPE.

Logs (Required)

1-Nix.log

Configuration

I think this is the default from the flake:

{
"security.workspace.trust.enabled": false,
"nix.enableLanguageServer": true,
"nix.serverPath": "nixd",
}

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/ian-h-chamberlain/dotfiles
  2. nix develop github:nix-community/nixd#vscodium
  3. codium-test
  4. Open .config/flake.nix and .config/nix-darwin/configuration.nix (maybe also .config/home-manager/home.nix it seems)
  5. Try to do some hovers, go-to-definition, etc.

Expected behavior
Not to crash

Screenshots
Not sure this is necessary but can provide if it helps.

Additional context
None I can think of. I can try to come up with a smaller example too if it's too complicated to figure out with this one, I just notice it pretty frequently in my dotfile so thought it might be easiest to point to that as an example.

@ian-h-chamberlain ian-h-chamberlain added the bug Something isn't working label Sep 10, 2024
@inclyc
Copy link
Member

inclyc commented Sep 18, 2024

截屏2024-09-18 14 36 23

I followed the steps to reproduce the behavior. However on my machine it works perfectly and does not crash. Would you like to provide some additional context?

@ian-h-chamberlain
Copy link
Author

Sorry for the delay in responding; other info that might be helpful that I can think of offhand

  • nixd, version: 2.3.2 (I can try 2.4.0 too now)
  • macOS 14.6.1 (arm64)

My system has these, not sure if codium-test would be different:

  • VSCode version: 1.94.0
  • Nix IDE extension v0.3.5

Maybe I can try wrapping the nixd invocation in a debugger so I can see where it's crashing? It seems like certain files are more problematic than others, as I can sometimes run nixd without issues - but when I filed this issue I was able to reproduce the crash pretty consistently. I'll post back here if I come up with any additional info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants