Skip to content

execnet version 1.7.0 breaks ssh mode #460

Open

Description

@Kreisfahrer

it looks like new execnet version 1.7.0 breaks pytest-xdist ssh execution with error
OSError: cannot send to <Channel id=5 closed>

I could reproduce it on python 3.6 and 3.7. Could we exclude this version in setup.py install_requirements?

Activity

  1. nicoddemus commented on Aug 16, 2019

    @nicoddemus
    Member

    Hi @Kreisfahrer,

    Strange, the changes have been small and should not cause this problem.

    Could you please include a minimal working example and the resulting traceback?

  2. Kreisfahrer commented on Aug 16, 2019

    @Kreisfahrer
    Author

    yes, let me gather some information

  3. Kreisfahrer commented on Aug 19, 2019

    @Kreisfahrer
    Author

    Some details.
    pytest session with xdist connection is started on:
    Windows Server 2012r2 with Python 3.6.7 (64 bit)
    pytest-3.6.0
    xdist-1.25.0
    execnet-1.7.0 (is installed with xdist)
    command:
    -d --tx 'ssh=user@host//chdir=some-folder' --max-slave-restart=5 --rsyncdir .
    Targeted host(the only one) is windows 10 os.
    ssh server details:
    OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
    It can be some specific issue with OpenSSH for windows. I didn't try it on any linux yet. But it was working perfectly fine with execnet <1,7.0 which breaks with

    File ".\lib\site-packages\_pytest\main.py", line 105, in wrap_session
    config.hook.pytest_sessionstart(session=session)
    File ".\lib\site-packages\pluggy\__init__.py", line 617, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
    File ".\lib\site-packages\pluggy\__init__.py", line 222, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
    File ".\lib\site-packages\pluggy\__init__.py", line 216, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
    File ".\pluggy\callers.py", line 201, in _multicall
    return outcome.get_result()
    File ".\lib\site-packages\pluggy\callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
    File ".\site-packages\pluggy\callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
    File ".\lib\site-packages\xdist\dsession.py", line 81, in pytest_sessionstart
    nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
    File ".\lib\site-packages\xdist\workermanage.py", line 68, in setup_nodes
    nodes.append(self.setup_node(spec, putevent))
    File ".\lib\site-packages\xdist\workermanage.py", line 74, in setup_node
    self.rsync_roots(gw)
    File ".\lib\site-packages\xdist\workermanage.py", line 61, in rsync_roots
    self.rsync(gateway, root, **self.rsyncoptions)
    File ".\lib\site-packages\xdist\workermanage.py", line 148, in rsync
    rsync.send()
    File ".\site-packages\execnet\rsync.py", line 114, in send
    self._send_directory_structure(self._sourcedir)
    File ".\lib\site-packages\execnet\rsync.py", line 202, in _send_directory_structure
    self._send_directory(path)
    File ".\lib\site-packages\execnet\rsync.py", line 178, in _send_directory
    self._send_directory_structure(p)
    File ".\lib\site-packages\execnet\rsync.py", line 200, in _send_directory_structure
    self._broadcast((st.st_mode, st.st_mtime, st.st_size))
    File ".\lib\site-packages\execnet\rsync.py", line 161, in _broadcast
    channel.send(msg)
     .\lib\site-packages\execnet\gateway_base.py", line 709, in send
    [raise IOError("cannot send to {!r}".format(self))
     OSError: cannot send to <Channel id=5 closed>```
    
  4. CorbinBogert commented on Sep 4, 2019

    @CorbinBogert

    I'm getting a similar error from my Jenkin's server environment. Execnet on the server's workspace was version 1.7.1. Reverting to execnet 1.6.1 worked.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions