Opened 7 years ago

Last modified 7 years ago

#2782 defect new

Channel is not notified, if Connection fails between openChannel and ssh_CHANNEL_OPEN_CONFIRM

Reported by: cebewee Owned by:
Priority: normal Milestone:
Component: conch Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

There is a race condition in twisted.conch.ssh.connection.SSHConnection: Since commit 20700, channelClosed ignores half-open channels (openChannel was called, but not yet ssh_CHANNEL_OPEN_CONFIRM). So if channelClosed is called by serviceStopped due to a connection loss, neither ssh_CHANNEL_OPEN_CONFIRM nor ssh_CHANNEL_OPEN_FAILURE is ever called.

So an application expecting either SSHChannel.channelOpen or SSHChannel.openFailed to be called, will wait infinitely. Maybe SSHConnection.channelClosed should call SSHChannel.openFailed in the channel-not-yet-really-open case?

Change History (2)

comment:1 Changed 7 years ago by cebewee

  • Summary changed from channel to Channel is not notified, if Connection fails between openChannel and ssh_CHANNEL_OPEN_CONFIRM

Change subject to something meaningful.

comment:2 Changed 4 years ago by <automation>

  • Owner z3p deleted
Note: See TracTickets for help on using tickets.