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

Nix develop segmentation fault evaluating derivation for devShells.x86_64-linux.default #4932

Closed
rbmdotdev opened this issue Oct 27, 2022 · 18 comments

Comments

@rbmdotdev
Copy link

Summary

@zeme-iohk pinging you as per the request in the nix-shell deprecation message

I checked out pltuus:master and ran nix-shell, saw the deprecation message and switched to nix develop and got the following error:

evaluating derivation 'git+file:///home/mark/workspace/cardano/plutus#devShells.x86_64-linux.default'[1] 471603 segmentation fault nix develop

nix-shell seems to work fine however I think this relates to an issue I was experiencing this morning when trying to spin up plutip:

mlabs-haskell/plutip#147

with plutip my shell / session just seemed to crash. it doesn't crash when running in this repo

I also had the same problem today with the pluts-apps repo and the latest 1.0.0-alpha tag when running nix-shell which caused my session to crash. if I checkout the 0.1.0 tag in that project nix-shell works fine

I am running Arch Linux in Windows Subsystem for linux and nix 2.11 however I can reproduce in debian running on bare metal also so I do not think it is specific to my Arch and WSL setup

If you need anymore info let me know and I would love a workaround to get unblocked if it is not a quick fix

thanks

Steps to reproduce the behavior

checkout master
run nix develop from shell

Actual Result

evaluating derivation 'git+file:///home/mark/workspace/cardano/plutus#devShells.x86_64-linux.default'[1] 471603 segmentation fault nix develop

Expected Result

nix develop to complete successfully

Describe the approach you would take to fix this

no idea

System info

I am running Arch Linux in Windows Subsystem for linux and nix 2.11 however I can reproduce in debian running on bare metal also so I do not think it is specific to my Arch and WSL setup

@rbmdotdev rbmdotdev added the bug label Oct 27, 2022
@zeme-iohk
Copy link

zeme-iohk commented Oct 27, 2022

Is it nix develop that's segfaulting or nix build .#haskell-language-server or both?
Can you also try nix build .#haskell-language-server if you haven't already?

@rbmdotdev
Copy link
Author

rbmdotdev commented Oct 27, 2022

nix build .#haskell-language-server

executes successfully

edit: and thank you so much for the prompt reply

@zeme-iohk
Copy link

oh dead, super weird that one would work and not the other...
Can you try nix develop a couple more times?
I've have segfaults disappear by doing that.
Still worth investigating ofc, but do try and see if that works please

@rbmdotdev
Copy link
Author

running about 10 times with no change, will keep trying intermittently over the course of the evening but as I can reproduce across different projects and different machines I am not super optimistic unfortunately

thanks again

@zeme-iohk
Copy link

zeme-iohk commented Oct 27, 2022

I also had the same problem today with the pluts-apps repo and the latest 1.0.0-alpha tag when running nix-shell which caused my session to crash.

You mean this? https://github.com/input-output-hk/plutus-apps/tree/v1.0.0-alpha1
doing nix-shell there also segfaults?
Does nix-shell in plutus-apps master also segfaults?

What other projects are you having problems with?
Unfortunately I can't easily replicate your error as I'm on darwin.

@rbmdotdev
Copy link
Author

You mean this? https://github.com/input-output-hk/plutus-apps/tree/v1.0.0-alpha1 doing nix-shell there also segfaults?

yes that tag of plutus-apps but I don't get the same printed error as shown above, see screenshot and see segv error on right side of command prompt
alpha1-segv

Does nix-shell in plutus-apps master also segfaults?

Actually no I just tried it and nix-shell on plutus-apps master succeeds

What other projects are you having problems with?
plutip:

mlabs-haskell/plutip#147

it crashes in a more severe way than plutus or plutus-apps in that it kills my whole user session. it crashes whether I use nix-shell or nix develop in plutip

@zeme-iohk
Copy link

Ok. I've had nix segfaults disappear before by upgrading nixpkgs. I'll try that. Which is more urgent to you now, plutus or plutus-apps?

@rbmdotdev
Copy link
Author

plutus-apps please and thank you

@zeme-iohk
Copy link

Wait but you need plutus-apps 1.0.0-alpha to work?
Even if master works?

@rbmdotdev
Copy link
Author

sorry you are right, as long as master is stable enough to work on I am fine to use that for now.

@zeme-iohk
Copy link

Thank you, I'll look into fixing plutus master then

@zeme-iohk
Copy link

Are you sure you are running the latest nix? version 2.11.1?
Can I ask you to upgrade?
Also are you on the IOHK slack? What's your handle?

@rbmdotdev
Copy link
Author

I am not in the slack but would love to join if I am able! I am in the iog technical discord.

also I fetched latest plutus master and ran nix develop just now with no other changes and it worked.........sooooo did you do anything or it just fixed itself like you suspected it might?

@zeme-iohk
Copy link

A few commits have been merged today, but nothing to address your problem specifically.
I've had non-deterministic segfaults in nix before, which I've fixed by bashing the Enter key until they were gone.
So I think it fixed itself.
I'll keep this issue open for some time in case the problem reappears on your end.
I was gonna ask for your slack so that we could work on this together as there is no way for me currently to replicate your setup.
What's the discord link?

@rbmdotdev
Copy link
Author

Is the slack public? I will happily join if so

just in case it helps the following chain of events just occurred:

I ran nix-store --gc to free up some space
plutus-apps main nix-shell now seg faulted
plutus main nix develop worked correctly
plutus-apps main nix-shell still seg faulted
checked out plutus-apps tags/v0.1.0
nix-shell succeeds
checked out plutus-apps main
nix-shell succeeds
checked out nix-shell tags/v1.0.0-alpha1
nix-shell seg faults

I am good to go on my side for now though, thank you for the help.

@effectfully
Copy link
Contributor

@rbmdotdev do you still experience this issue?

@effectfully
Copy link
Contributor

(sorry about the labels and the (deleted) comment noise, I stupidly confused this ticket with another one)

@effectfully
Copy link
Contributor

This ticket is really old, it talks about nix-shell and it's been a while since we introduced nix develop and changed a lot of things at that moment, plus the reproducer mentions plutus-apps. For these reasons I'm inclined to close it, so doing that.

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

No branches or pull requests

3 participants