Interrupting distributed testing does not clean up processes on the remote host

Issue #71 resolved
memedough created an issue

Hi Holger,

For distributed testing pressing control C (SIGINT) will terminate the testing which is good.

However on the remote host(s) the python processes are not cleaned up.

This probably does not cause any issues but they do build up so there are quite a few of them not doing anything on the remote host.

http://pastebin.com/m4fdd823b

:)

Comments (3)

  1. Holger Krekel repo owner

    just verified: If the remote processes are blocking in IO or executing, the sshd-daemon will not kill them. Not sure if there is an option to cause all session-started processes to be killed when the stdin/stdout to the initiating ssh-client goes away. If you find one, please let me know :)

    I think a solution from the py.test side would be to install a controler-process that runs independently and can kill test-processes, or to self-terminate from the receiver-thread with a os.kill(os.getpid(), 15) like construct. With 1.2 we are planning for a refined new model for distributed testing and will see to always have an intermediate controler process which does not run tests itself but starts another process for that so that a terminating session can kill everything cleanly.

  2. memedough reporter

    Hi Holger,

    This appears to be fixed, I have not seen any lingering processes when interrupting distributed testing (though I did raise a separate issue where interrupting distributed testing doesn't call teardown fns).

    :)

  3. Log in to comment