{"action":"opened","issue":{"url":"https://api.github.com/repos/NixOS/nix/issues/2176","repository_url":"https://api.github.com/repos/NixOS/nix","labels_url":"https://api.github.com/repos/NixOS/nix/issues/2176/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nix/issues/2176/comments","events_url":"https://api.github.com/repos/NixOS/nix/issues/2176/events","html_url":"https://github.com/NixOS/nix/issues/2176","id":325688419,"number":2176,"title":"Builder is sometimes unexpectidly killed","user":{"login":"nlewo","id":3425311,"avatar_url":"https://avatars2.githubusercontent.com/u/3425311?v=4","gravatar_id":"","url":"https://api.github.com/users/nlewo","html_url":"https://github.com/nlewo","followers_url":"https://api.github.com/users/nlewo/followers","following_url":"https://api.github.com/users/nlewo/following{/other_user}","gists_url":"https://api.github.com/users/nlewo/gists{/gist_id}","starred_url":"https://api.github.com/users/nlewo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlewo/subscriptions","organizations_url":"https://api.github.com/users/nlewo/orgs","repos_url":"https://api.github.com/users/nlewo/repos","events_url":"https://api.github.com/users/nlewo/events{/privacy}","received_events_url":"https://api.github.com/users/nlewo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T12:44:17Z","updated_at":"2018-05-23T12:44:17Z","closed_at":null,"author_association":"MEMBER","body":"Nix sometimes fails to build the expression\r\n```nix\r\nwith import <nix/config.nix>;\r\n\r\n{ simple = builtins.derivation {\r\n    name = \"simple\";\r\n    system = \"x86_64-linux\";\r\n    PATH = coreutils;\r\n    builder = shell;\r\n    args = [\"-c\" \"touch $out\"];\r\n  };\r\n}\r\n```\r\n\r\nGenerally, the build works but for ~1% of attempts, it fails with\r\n```\r\nbuilder for '/nix/store/94yfdqk4r6vmja7qhqkyy0hl25bvvfjj-simple.drv' failed due to signal 9 (Killed)\r\n```\r\n\r\nI can reproduce on my laptop (nix 2.0) and in a vm (nix 2.0.2) with:\r\n```sh\r\n$ nix-build -E 'with import <nix/config.nix>; { simple = builtins.derivation {name=\"simple\";system=\"x86_64-linux\";PATH=coreutils;builder=shell;args=[\"-c\" \"touch $out\"];};}'\r\n\r\n$ i=0; while nix-build -E 'with import <nix/config.nix>; { simple = builtins.derivation {name=\"simple\";system=\"x86_64-linux\";PATH=coreutils;builder=shell;args=[\"-c\" \"touch $out\"];};}' --check; do echo $i; i=$(($i+1)); done\r\n```\r\n\r\n\r\nNote I'm not able to reproduce if a delay is introduced. The following expression has been successfully built 6000 times:\r\n```nix\r\nwith import <nix/config.nix>;\r\n\r\n{ simple = builtins.derivation {\r\n    name = \"simple\";\r\n    system = \"x86_64-linux\";\r\n    PATH = coreutils;\r\n    builder = shell;\r\n    args = [\"-c\" \"sleep 0.5; touch $out\"];\r\n  };\r\n}\r\n```\r\n\r\nAre you also able to reproduce?"}}
{"actor":{"display_login":"nlewo"}}