-
Notifications
You must be signed in to change notification settings - Fork 235
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
[Bug Report] Application runtime exception in IotHubTransport. #1718
Comments
This does look like a bug. We'll try to get this fixed soon. |
We don't want cases where one thread is calling callbacks.get("some id") while another just removed that entry. #1718
- Make correlation callback cleanup job run less frequently - Previously ran several times per second. Now runs once per hour - Make correlation callback operation blocks atomic - We don't want cases where one thread is calling callbacks.get("some id") while another just removed that entry. #1718
Thank you @timtay-microsoft for the quick response to the issue.
|
|
The release is now complete. This bug is fixed as of DeviceClient version 2.2.0. See release notes for additional details. I'll go ahead and close this thread, but feel free to open a new thread if you encounter any further issues! |
Context
Description of the issue
While working throws runtime exception:
Happens frequently.
MQTT connection is used.
Code sample exhibiting the issue
Just as sample, nothing wrong, I belive, in here.
Console log of the issue
Remove partly because of legal and privacy.
Obviously they are not going to show you the whole run.
The investigations
Extremely hard to reproduce. Manually I didn't have luck to do it.
But it seems that is because of the concurrency.
What happened in the rows of IotHubTransport.java:851:
The only call here can bring null is
correlationStartTimeMillis.get(correlationId)
which can cause the NPE in above code.And the concurrently running thread that will remove the entry can lead on this rows:
The text was updated successfully, but these errors were encountered: