Hi,
I encoutered an issue with the
WriteMultipleItemValues method, which gets stuck when interacting with the OPC DA server. I can see this issue in both the logs and dump files. I captured 2 dump files - about 5 minutes apart after the application got stuck - and the same thread with the same stack trace is hanging in both:
Code:
System.Linq.Parallel.OrderPreservingPipeliningMergeHelper`2+OrderedPipeliningMergeEnumerator[[System.__Canon, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]].TryWaitForElement(Int32, System.Linq.Parallel.Pair`2<Int32,System.__Canon> ByRef)+bc
System.Linq.Parallel.OrderPreservingPipeliningMergeHelper`2+OrderedPipeliningMergeEnumerator[[System.__Canon, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]].MoveNext()+5d
System.Linq.Parallel.QueryOpeningEnumerator`1[[System.__Canon, System.Private.CoreLib]].MoveNext()+36
System.Collections.Generic.List`1[[System.__Canon, System.Private.CoreLib]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>;)+1f2
System.Linq.Enumerable.ToList[[System.__Canon, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1<System.__Canon>;)+9a
OpcLabs.EasyOpc.DataAccess.Internal.DelegatingEasyDAClient.WriteMultipleItemValues(OpcLabs.EasyOpc.DataAccess.OperationModel.DAItemValueArguments)+12c
OpcLabs.BaseLib.Threading.Extensions.IParallelismExtension+<>c__DisplayClass4_1`3[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].<GroupSelect>b__1()+e0
OpcLabs.BaseLib.Threading.TaskParallelism.Perform(System.Collections.Generic.IEnumerable`1<System.Action>;)+96
OpcLabs.BaseLib.Threading.Extensions.IParallelismExtension.GroupSelect[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]](OpcLabs.BaseLib.Threading.IParallelism, System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,System.__Canon>, System.Func`3<System.__Canon,System.Collections.Generic.IEnumerable`1<System.__Canon>,System.__Canon>, System.Collections.Generic.IEqualityComparer`1<System.__Canon>;)+24d
OpcLabs.BaseLib.Threading.Extensions.IParallelismExtension.GroupSelect[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]](OpcLabs.BaseLib.Threading.IParallelism, System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,System.__Canon>, System.Func`3<System.__Canon,System.Collections.Generic.IEnumerable`1<System.__Canon>,System.__Canon>;)+cf
OpcLabs.EasyOpc.DataAccess.Implementation.EasyDAClientCompositor.WriteMultipleItemValues(OpcLabs.EasyOpc.DataAccess.OperationModel.DAItemValueArguments)+ca
The
EasyDAClient.InstanceParameters.Timeouts.WriteItem is set to 2000ms, but seems to be not respected in this case.
I've also tested several versions of
OpcLabs.QuickOpc, and while the number of items is identical, there is a difference in how quickly the issue reproduces:
- for versions 5.81.485 and 5.80.347 it takes a few minutes (sometimes a few seconds) of application running
- for version 5.63.246 it takes from a few hours to a few days of application running
My application is using .NET 6.
Best regards,
Kristian