Skip to content

'mm_send_fd: sendmsg(0): Message too long' during CopyClosures (running 'nixops deploy') #243

Closed

Description

@alpmestan

Hi,

I tried deploying to a virtualbox image but got stuck at some point with the following error:

<snip>
building `/nix/store/ycwiwm4cmzd5frxa64n5a56avj1n51gm-linux-3.12.17.drv' on `[email protected]'
building /nix/store/zgj2c55i4yp9y3h3jh71yjs19hm338lq-linux-3.12.17
unpacking sources
unpacking source archive /nix/store/i5nsyj3sqwyi2ay18r8j8j80kai7nrjv-linux-3.12.17.tar.xz
mm_send_fd: sendmsg(0): Message too long
mux_client_request_session: send fds failed
mm_receive_fd: recvmsg: expected received 1 got 0
process_mux_new_session: failed to receive fd 0 from slave
Died at /nix/store/7m61x2ywlrh9000llm0bk4w0p8lcnwwb-nix-1.7/lib/perl5/site_perl/5.16.3/darwin-2level/Nix/CopyClosure.pm line 38.
<snip>

(the complete log is available here)

I thought I could work around that by avoiding to build from the sources, by running this command, courtesy of Shea:

$ nixops deploy -d blah --option binary-caches "http://cache.nixos.org http://hydra.nixos.org"

but it just fails with the same error, at a different point:

fetching path `/nix/store/ihazgkzzdwjkpyn6390s764j0irl7scp-firmware'...

*** Downloading ‘http://hydra.nixos.org/nar/ihazgkzzdwjkpyn6390s764j0irl7scp-firmware’ to ‘/nix/store/ihazgkzzdwjkpyn6390s764j0irl7scp-firmware’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
mm_send_fd: sendmsg(0): Message too long
mux_client_request_session: send fds failed
mm_receive_fd: recvmsg: expected received 1 got 0
process_mux_new_session: failed to receive fd 0 from slave
Died at /nix/store/7m61x2ywlrh9000llm0bk4w0p8lcnwwb-nix-1.7/lib/perl5/site_perl/5.16.3/darwin-2level/Nix/CopyClosure.pm line 38.
builder for `/nix/store/mwx4ra3wx6d3l892vh9gspphgv36wcvf-libmemcached-1.0.18.drv' failed with exit code 255

I'm not sure what other information you guys would need to understand where this is coming from, so just ask me anything that's missing.

The following versions are installed on my OS X (10.8.4, x86_64), VirtualBox 4.3.8:

$ nixops --version
NixOps 1.2
$ nix-env --version
nix-env (Nix) 1.7

Activity

  1. shlevy commented on Apr 16, 2014

    @shlevy
    Member

    Seems like this might be caused by some issue with the ssh master connection multiplexing.

  2. proger commented on Apr 24, 2014

    @proger

    Confirming the same problem, using env NIX_SSHOPTS="-o 'ControlMaster none' -S none" helps.

  3. benmos commented on Apr 30, 2014

    @benmos

    Same behaviour here - OS X (10.8.5, x86_64), VirtualBox 4.3.10. Same nixops & nix-env versions. Workaround suggested by proger seems to fix it.

  4. aszlig commented on Jun 19, 2014

    @aszlig
    Member

    I'm not an OS X expert, so I'm just guessing that it is unable to pass fd 0 because ssh_util is passing /dev/null to stdin. Can you retry by instead just closing stdin over there?

    Never mind, because /dev/null is only passed if using the Hetzner backend.
    Can you create DTrace output (with sensitive information removed) of this?

  5. pikajude commented on Jul 14, 2014

    @pikajude
    Contributor

    @aszlig any idea of the required dtrace options?

  6. aszlig commented on Jul 15, 2014

    @aszlig
    Member

    @joelteon: I guess -f should be enough, but again I'm no OS X expert.

  7. edolstra commented on Jul 15, 2014

    @edolstra
    Member

    FWIW nix-copy-closure in Nix master no longer uses a master connection.

  8. pikajude commented on Jul 15, 2014

    @pikajude
    Contributor

    @edolstra that definitely changes the error message, at least:

    building all machine configurations...
    using predefined remote systems file: /Users/joelteon/.dev/nix/nix.machines
    these derivations will be built:
      /nix/store/771470l2bfbm62vqsyls11hgrv014c2c-nixos-14.10pre-git.drv
      /nix/store/ahrgfqskd9jrh8lmvysx0km8cjd6hzlr-etc.drv
      /nix/store/l3wpxivv2b6g9z39q1wpd5sp3kgl6cyb-nixops-machines.drv
    got EOF while expecting 8 bytes from remote side
    unable to open SSH connection to `[email protected]', trying other available machines...
    building path(s) `/nix/store/zkvx8xhwwp5r5cyfs3jymk8byslrvbgq-etc'
    killing process 94273
    error: a `x86_64-linux' is required to build `/nix/store/ahrgfqskd9jrh8lmvysx0km8cjd6hzlr-etc.drv', but I am a `x86_64-darwin'
    
  9. edolstra commented on Jul 15, 2014

    @edolstra
    Member

    The new build-remote.pl is unfortunately not backwards compatible with Nix 1.7, so you'll need to upgrade the remote machine as well.

  10. domenkozar commented on Jun 3, 2016

    @domenkozar
    Member

    @pikajude I take it this is no longer relevant in recent Nix. Please reopen if that's not the case.

  11. added 2 commits that reference this issue on Jan 1, 2024
  12. added a commit that references this issue on Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions