[Bug 2659] Fix race conditions in forwarding tests

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Mon Jan 30 18:47:36 AEDT 2017


https://bugzilla.mindrot.org/show_bug.cgi?id=2659

Damien Miller <djm at mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Damien Miller <djm at mindrot.org> ---
Figured it out, here's the essence of the fix:

- ${SSH} -S $CTL -O exit somehost
+ ${SSH} -F $OBJ/ssh_config -S $CTL -O exit somehost

The "transfer over forwarded channels and check result" section started
a ssh mux master and tried to stop it at the end. Unfortunately, the
$SSH invocation used to kill the mux master would pick up the
~/.ssh/config of the user running the test because it didn't specify an
explicit configuration. This would result in the mux master persisting
to the next block.

Previously, this would work because of two coincidences: 1) the $CTL
socket would be carried over to the next test block
(ExitOnForwardFailure) and 2) the forwarding specification is the same
in each block, so there was no collision between them.

When this change added the "rm -f $CTL" to the ExitOnForwardFailure
test block, this invalidated coincidence #1 and the forwarding attempts
there would get EADDRINUSE because the ports were already busy
(forwarded by the lingering mux master from the previous block).

Anyway, I've committed the fix

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list