newrelic / nri-perfmon

Windows Perfmon / WMI On-Host Integration for New Relic Infrastructure
Other
13 stars 19 forks source link

Unhandled exception #45

Closed david-garcia-garcia closed 9 months ago

david-garcia-garcia commented 1 year ago

message:Application: nri-perfmon.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException at System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource) at System.Collections.Generic.Dictionary2+KeyCollection+Enumerator[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at NewRelic.PerfmonPlugin.PollPerfCounters() at NewRelic.RemoteUser.RunAsRemoteUser[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func1) at NewRelic.PerfmonPlugin.RunThread() at NewRelic.Program.Main(System.String[])

david-garcia-garcia commented 1 year ago

The exception message seems to be swallowed in the application's error handling some way, but looking at the implementation this totally might be due to iterating the keys of a dictionary and the dictionary being mutated (either from within the loop or another thread).

david-garcia-garcia commented 1 year ago

https://github.com/newrelic/nri-perfmon/pull/46

jbeveland27 commented 9 months ago

Fixed in #46.