8000 Connection.openSession can create a deadlock situation · Issue #113 · connectbot/sshlib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Connection.openSession can create a deadlock situation #113
Open
@daniel-trang

Description

@daniel-trang

Scenario:

  • Create a Connection and connect it to a linux machine.
  • Authenticate user/connection.
  • Drop the network connection (ex: disable network card on linux machine)
  • Try to open a session using connection.openSession(), this method will waitUntilChannelOpen
  • Despite restoring the network connection, waitUntilChannelOpen does not return.
  • The only way to notify waitUntilChannelOpen to wake it up is by closing the channel it is waiting on.
  • Connection.close is the only way to close the channel but it cannot be called because it is also synchronized and the previous call to openSession currently holds the monitor lock on the connection object. Consequently, there is no way to abort the hung openSession call or close the connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0