-
Notifications
You must be signed in to change notification settings - Fork 226
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
AMQP Transport: Unexpected exception being thrown when connectivity is unstable. #569
Comments
@anthonyvercolano Stefan works on my team, so this likely relates to previous issues. We see it less often, but we do still see the same behavior. |
This is a bug in our code.
At this point, the application hasn't been notified of the disconnection yet, and it enqueues a message:
Given there is still a sender link, a message is enqueued, but the link is detached so the SDK tries to attach it:
At this point, the SDK puts the message in the queue and transitions to the "attaching" without passing a callback when attaching is finished (it assumes that it'll either succeed and go to "attached" or fail and go to "detached" and in both cases the enqueued message callback would be processed: At this point, the code that processes the disconnection catches up with the fact that there is an attaching link that needs to be "forceDetached" and the problem is that the "forceDetach" handler assumes that if we're in in the except that like i said.. because attach was triggered by a message being enqueued, there is no callback, and therefore the code crashes with a I'm not sure what the right fix is yet but this is definitely on us and will get fixed. additional updates coming soon. |
Thanks you @pierreca |
@stefannilsson, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey |
reopening until it's released in a package. |
Any updates on release? |
@stefannilsson we are closing in on resolving a bug (not related to this one), and once that is done will put out a new release. |
Release 2019-07-17 includes this bugfix. @stefannilsson |
Context
Description of the issue:
We have a node in production installed in a location where connectivity is pretty bad.
The application, primarily sending messages (every second) via azure iot sdk (amqp), have been running & working fine for several days but after seeing the error below our application stopped behaving properly and our connecting handler did get into a faulty state due to the exception being thrown.
We're running our own persistence handler and handle connects/disconnects ourselves via subscribing to connected/disconnected/error events.
We're using NoRetry RetryPolicy.
We have a very hard time replicating the error.
Console log of the issue:
The text was updated successfully, but these errors were encountered: