Skip to content

[Bug Report] Microsoft.Azure.Devices.Client can throw uncaught NREs causing applications to crash #1959

@ccruden-shookiot

Description

@ccruden-shookiot

Context

  • OS, version, SKU and CPU architecture used: Windows Server 2016 Datacenter
  • Application's .NET Target Framework : .NET Core 5.0.1
  • Device: Azure Virtual Machine
  • SDK version used: Microsoft.Azure.Devices.Client 1.36.0

Description of the issue

MSADC can throw an uncaught, uncatchable null reference exception which causes applications to crash. This happens infrequently - on the order of once every couple of weeks for applications continually transmitting roughly 30-60G/day - but often enough to increase downtime on applications that are meant to have near 100% uptime.

Event viewer logs the following:
Application: StoreAndForward.exe
CoreCLR Version: 5.0.120.57516
.NET Version: 5.0.1
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Azure.Devices.Client.Transport.Mqtt.OrderedTwoPhaseWorkQueue`2.Abort(Exception exception)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttIotHubAdapter.ShutdownOnErrorAsync(IChannelHandlerContext context, Exception exception)
at System.Threading.Tasks.Task.<>c.b__140_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Metadata

Metadata

Assignees

Labels

IoTSDKTracks all IoT SDK issues across the boardbugSomething isn't working.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions