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

hash '' has wrong length for hash type 'md5' #3799

Open
jtojnar opened this issue Jul 10, 2020 · 2 comments
Open

hash '' has wrong length for hash type 'md5' #3799

jtojnar opened this issue Jul 10, 2020 · 2 comments

Comments

@jtojnar
Copy link
Contributor

jtojnar commented Jul 10, 2020

Describe the bug

I am trying to build python3.pkgs.libevdev from NixOS/nixpkgs#92715 on aarch64 community box by running nix-build -A python3.pkgs.libevdev --argstr system aarch64-linux but it fails:

these derivations will be built:
  /nix/store/q701iz58annc5swl5v9w5gjbwbcjgkkl-fix-paths.patch.drv
  /nix/store/jamh4v46nbmk40ak1643xxczdx0hxkjk-python3.8-libevdev-0.9.drv
these paths will be fetched (43.20 MiB download, 219.85 MiB unpacked):
  /nix/store/1w51j2y63wvpcy04grgaf5axva13qdpa-pip-install-hook
  /nix/store/3mh2mdnh38f6argfplwjz48477qhvb03-python3.8-py-1.8.1
  /nix/store/4jq0pdh3nn4228amaaq1w054xdns856m-setuptools-check-hook
  /nix/store/4qvamlvbqn2vd2qa26bky72726vgyd07-python3.8-setuptools-46.1.3
  /nix/store/5dkkjjhq0gdiwl8a2b1i5w5zjjw8jw6j-python3.8-packaging-20.4
  /nix/store/7i2ry8cj3c5lgyazmhnk70s1j16fwins-python-recompile-bytecode-hook
  /nix/store/7w8p324gd26vpkcs78qjk3mdjpldjjmh-python3.8-zipp-3.1.0
  /nix/store/8ac15d2gfyz8vfazl28d5p8z9k98npqj-python3.8-wheel-0.33.6
  /nix/store/8mzhhh6ib8ydmf6b1cl1w7l1ppydgl1q-binutils-2.31.1
  /nix/store/8n3f4f3dhdcp0hi7yqiinwsy2a289r5j-gcc-wrapper-9.3.0
  /nix/store/8nhjqwdd5b1f7zmm37a4fmb8b7nx5r5r-python-catch-conflicts-hook
  /nix/store/akivgaqxccl21r2wck29d8s9zh6i572q-binutils-wrapper-2.31.1
  /nix/store/cfjj10lx6bk7w2qrfbwljrfkqjqqn310-python3.8-pyparsing-2.4.6
  /nix/store/cigmvyr1cnvkaz91i4i29jbi1wlzzbls-python3.8-pip-20.1.1
  /nix/store/cngwjyxw63sblwkpk94j309n8wny29aq-pytest-check-hook
  /nix/store/gyydp378c5sxijhchdvl2kkn2x4vvc82-hook
  /nix/store/i4nfqm06fq366q634gzmi6al5p9czq5y-python3.8-six-1.15.0
  /nix/store/mrplxkbwmxwmf5kq201paxv27hyx2ff7-setuptools-setup-hook
  /nix/store/mzc0v098i0i0zylp3i0fnjk38kxsz48x-python3.8-pluggy-0.13.1
  /nix/store/nwfisv57z29dak533dhrbnxwj5ggnnjm-stdenv-linux
  /nix/store/padhfcd4ijwry3lnddfi1rp4649cb7wg-python3.8-attrs-19.3.0
  /nix/store/q8hgkcm6giww7r9lbfl5sf12ykv57sgy-python3-3.8.3
  /nix/store/qds92qssvzs5x2gdg3gika51whvq2fjk-python3.8-importlib-metadata-1.6.0
  /nix/store/qrgyjiaxxjmmn15051jxxj7wkkj0y01v-python-imports-check-hook.sh
  /nix/store/s6zhjxwinnw6liz6kqwdyiv6cf2m3ax6-sqlite-3.32.2
  /nix/store/vrr4fx5z16jxnmwm6hzj4wdp1cqqha6z-python3.8-pytest-5.4.3
  /nix/store/wbb1vlxzap2ih25q2gmxxs5nniny1myl-python3.8-more-itertools-8.3.0
  /nix/store/xgh4vpggyhjlfafjn31j2s38vwwkpprd-python3.8-wcwidth-0.2.3
  /nix/store/ywf0kxg9x89jxg40riv40nxfr5by350r-python3.8-atomicwrites-1.4.0
  /nix/store/zzrvbbq37l6ykksqrj7n0pxcr2g6hj5q-gcc-9.3.0
building '/nix/store/q701iz58annc5swl5v9w5gjbwbcjgkkl-fix-paths.patch.drv' on 'ssh://jtojnar@aarch64.nixos.community'...
copying path '/nix/store/s6zhjxwinnw6liz6kqwdyiv6cf2m3ax6-sqlite-3.32.2' from 'https://cache.nixos.org'...
copying path '/nix/store/zzrvbbq37l6ykksqrj7n0pxcr2g6hj5q-gcc-9.3.0' from 'https://cache.nixos.org'...
copying path '/nix/store/8mzhhh6ib8ydmf6b1cl1w7l1ppydgl1q-binutils-2.31.1' from 'https://cache.nixos.org'...
copying 1 paths...
copying path '/nix/store/f75n3yqnbj5ji3qlx6j9d58fzbg22fss-fix-paths.patch' to 'ssh://jtojnar@aarch64.nixos.community'...
error: --- Error --- nix-store
error: --- BadHash --- nix-daemon
hash '' has wrong length for hash type 'md5'
error: --- EndOfFile --- build-remote
unexpected end-of-file
error: --- Error --- nix-daemon
builder for '/nix/store/q701iz58annc5swl5v9w5gjbwbcjgkkl-fix-paths.patch.drv' failed with exit code 1; last 3 log lines:
  error: --- Error --- nix-store
  error: --- BadHash --- nix-daemon
  hash '' has wrong length for hash type 'md5'
error: --- Error --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
got unknown message type 1 from Nix daemon

Steps To Reproduce

  1. Create test.nix with the following contents in your nixpkgs tree:
{ system ? builtins.currentSystem, pkgs ? import ./. { inherit system; } }:
pkgs.runCommand "test" {
  foo = ./test.nix;
} ''
  cp $foo $out
''
  1. Configure your system to use nix-community aarch64 builder
  2. Run nix-build test.nix --argstr system aarch64-linux
  3. See error
these derivations will be built:
  /nix/store/cld1lxvy0axs1ags3g6i1a418a4p8w8w-test.drv
building '/nix/store/cld1lxvy0axs1ags3g6i1a418a4p8w8w-test.drv' on 'ssh://jtojnar@aarch64.nixos.community'...
copying 1 paths...
copying path '/nix/store/gm6k4xha2x93376amsa192nf2dkm536p-test.nix' to 'ssh://jtojnar@aarch64.nixos.community'...
error: --- Error --- nix-store
error: --- BadHash --- nix-daemon
hash '' has wrong length for hash type 'md5'
error: --- EndOfFile --- build-remote
unexpected end-of-file
error: --- Error --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
error: --- Error --- nix-daemon
builder for '/nix/store/cld1lxvy0axs1ags3g6i1a418a4p8w8w-test.drv' failed with exit code 1; last 3 log lines:
  error: --- Error --- nix-store
  error: --- BadHash --- nix-daemon
  hash '' has wrong length for hash type 'md5'

Expected behavior

Build should succeed.

nix-env --version output

nix-env (Nix) 2.4pre20200622_334e26b

Additional context

Both derivations look pretty much the same:

$ cat /nix/store/qa79a9prdsknkc2bqlajmwws1ywacaql-fix-paths.patch.drv
Derive([("out","/nix/store/qndmc7phnipz0y14gyhv2kb6fc0lap83-fix-paths.patch","","")],[("/nix/store/2zjdbksfsb4xlqhq45vd1j1hifq3npnd-bash-4.4-p23.drv",["out"]),("/nix/store/n106hva3clw48b7qv5ll7asryn74l6hq-libevdev-1.9.0.drv",["out"]),("/nix/store/yr14ipdfc7hg5a6avd6m0lqx519vwxda-stdenv-linux.drv",["out"])],["/nix/store/4vq3350zc6sqnibkqpgic2d6cvi1r9hq-substitute-all.sh","/nix/store/f75n3yqnbj5ji3qlx6j9d58fzbg22fss-fix-paths.patch"],"x86_64-linux","/nix/store/ypag3bh7y7i15xf24zihr343wi6x5i6g-bash-4.4-p23/bin/bash",["-e","/nix/store/4vq3350zc6sqnibkqpgic2d6cvi1r9hq-substitute-all.sh"],[("allowSubstitutes",""),("buildInputs",""),("builder","/nix/store/ypag3bh7y7i15xf24zihr343wi6x5i6g-bash-4.4-p23/bin/bash"),("configureFlags",""),("depsBuildBuild",""),("depsBuildBuildPropagated",""),("depsBuildTarget",""),("depsBuildTargetPropagated",""),("depsHostHost",""),("depsHostHostPropagated",""),("depsTargetTarget",""),("depsTargetTargetPropagated",""),("doCheck",""),("doInstallCheck",""),("libevdev","/nix/store/23pqn2pj71j4pxyva3hkkqvp7cc71ymv-libevdev-1.9.0"),("name","fix-paths.patch"),("nativeBuildInputs",""),("out","/nix/store/qndmc7phnipz0y14gyhv2kb6fc0lap83-fix-paths.patch"),("outputs","out"),("patches",""),("preferLocalBuild","1"),("propagatedBuildInputs",""),("propagatedNativeBuildInputs",""),("src","/nix/store/f75n3yqnbj5ji3qlx6j9d58fzbg22fss-fix-paths.patch"),("stdenv","/nix/store/xrzmin0q0jrq3xavfxivwm0jf8znhi5a-stdenv-linux"),("strictDeps",""),("system","x86_64-linux")])⏎                                                                                                                                                                                                 $ cat /nix/store/q701iz58annc5swl5v9w5gjbwbcjgkkl-fix-paths.patch.drv
Derive([("out","/nix/store/wdsd8qkp0vfadln31f6x6l9fbsxc6rc4-fix-paths.patch","","")],[("/nix/store/7asxfvqs40ywpkf43bv0f9s66zdhi0a9-stdenv-linux.drv",["out"]),("/nix/store/9b58n0rf3i1la65aiizvb5d1fn3ydwz1-bash-4.4-p23.drv",["out"]),("/nix/store/f0jll9w3y631ng280irlcyfffsa8liwf-libevdev-1.9.0.drv",["out"])],["/nix/store/4vq3350zc6sqnibkqpgic2d6cvi1r9hq-substitute-all.sh","/nix/store/f75n3yqnbj5ji3qlx6j9d58fzbg22fss-fix-paths.patch"],"aarch64-linux","/nix/store/v2fg7mzwayjrkvbnhf766881zmf5afsv-bash-4.4-p23/bin/bash",["-e","/nix/store/4vq3350zc6sqnibkqpgic2d6cvi1r9hq-substitute-all.sh"],[("allowSubstitutes",""),("buildInputs",""),("builder","/nix/store/v2fg7mzwayjrkvbnhf766881zmf5afsv-bash-4.4-p23/bin/bash"),("configureFlags",""),("depsBuildBuild",""),("depsBuildBuildPropagated",""),("depsBuildTarget",""),("depsBuildTargetPropagated",""),("depsHostHost",""),("depsHostHostPropagated",""),("depsTargetTarget",""),("depsTargetTargetPropagated",""),("doCheck",""),("doInstallCheck",""),("libevdev","/nix/store/anawrr4rm8njbbf3w56bjgmw9d4jf2xs-libevdev-1.9.0"),("name","fix-paths.patch"),("nativeBuildInputs",""),("out","/nix/store/wdsd8qkp0vfadln31f6x6l9fbsxc6rc4-fix-paths.patch"),("outputs","out"),("patches",""),("preferLocalBuild","1"),("propagatedBuildInputs",""),("propagatedNativeBuildInputs",""),("src","/nix/store/f75n3yqnbj5ji3qlx6j9d58fzbg22fss-fix-paths.patch"),("stdenv","/nix/store/cnpd9k9sh5001q01zqrrrlci8wpkb64d-stdenv-linux"),("strictDeps",""),("system","aarch64-linux")])⏎                                                                                                                                                                                               

I have the remote builder configured as suggested in the community box README:

{
  nix = {
    distributedBuilds = true;
    buildMachines = [
      {
        hostName = "aarch64.nixos.community";
        maxJobs = 64;
        sshKey = "/root/id_aarch64box";
        sshUser = "jtojnar";
        system = "aarch64-linux";
        supportedFeatures = [ "big-parallel" ];
      }
    ];
  };
}
@jtojnar jtojnar added the bug label Jul 10, 2020
@colemickens
Copy link
Member

This is severely impacting my ability to use Nix, for example, for mobile-nixos I am almost completely blocked right now.

I had been getting around this by copying the drvs to the builder, but this doesn't work well in all scenarios.

@stale
Copy link

stale bot commented Feb 12, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 12, 2021
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

2 participants