Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection.openSession can create a deadlock situation #113

Open
daniel-trang opened this issue Mar 26, 2021 · 0 comments
Open

Connection.openSession can create a deadlock situation #113

daniel-trang opened this issue Mar 26, 2021 · 0 comments

Comments

@daniel-trang
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant