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

Improve error message when child dies #132

Open
Mic92 opened this issue Oct 22, 2022 · 2 comments
Open

Improve error message when child dies #132

Mic92 opened this issue Oct 22, 2022 · 2 comments

Comments

@Mic92
Copy link
Member

Mic92 commented Oct 22, 2022

Currently we use a very adhoc way of communicating with our eval process based on a line based protocol
We are using readLine which if the worker dies just return EndOfFile("unexpected EOF reading a line");.
We should replace this with just read followed by a wait on the child process to get its exit status.

@runeksvendsen
Copy link

Try evaluating default.nix in nixpkgs 20.09 to reproduce:

git clone -b 20.09 --single-branch https://github.com/NixOS/nixpkgs.git
nix-eval-jobs nixpkgs/default.nix 

output:

[...]

{"attr":"mandoc","attrPath":["mandoc"],"drvPath":"/nix/store/swvnn1pbp7ipg1rh6f39a9vgjpm7c0vm-mandoc-1.14.5.drv","name":"mandoc-1.14.5","outputs":{"out":"/nix/store/wfkxr2iljszzmffq4pddzwwjxzkw8zhq-mandoc-1.14.5"},"system":"x86_64-linux"}
error: unexpected EOF reading a line

Exit code is 1.

@runeksvendsen
Copy link

@Mic92 Actually, this looks like more than a poor error message. nix-eval-jobs seemingly dies trying to evaluate the "mandoc" attribute in nixpkgs 20.09.

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

No branches or pull requests

2 participants