Type of issue
Current Behavior
The OPC UA stack (OPCFoundation.NetStandard.Opc.Ua.Core 1.5.378.145) accesses a condition's branch collection (ConditionState.m_branches, a plain Dictionary<string, ConditionState>) from multiple threads without synchronization:
Readers: ConditionState.GetRetainState (via UpdateRetainState), ConditionState.ConditionRefresh, GetBranch
Writers: ConditionState.CreateBranch, ReplaceBranchEvent, RemoveBranchEvent, ClearBranches
When a condition's state changes on a background thread while the branch dictionary is concurrently enumerated, the enumeration can observe a torn/garbage entry and dereference it, crashing the process with a native access violation (observed as Opc.Ua.ConditionState.IsBranch on a null this).
This is on 1.5.378.145, therefore, could be on master378, but also on master branch, both - if exist - should be fixed.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:
Anything else?
No response
Type of issue
Current Behavior
The OPC UA stack (OPCFoundation.NetStandard.Opc.Ua.Core 1.5.378.145) accesses a condition's branch collection (ConditionState.m_branches, a plain Dictionary<string, ConditionState>) from multiple threads without synchronization:
Readers: ConditionState.GetRetainState (via UpdateRetainState), ConditionState.ConditionRefresh, GetBranch
Writers: ConditionState.CreateBranch, ReplaceBranchEvent, RemoveBranchEvent, ClearBranches
When a condition's state changes on a background thread while the branch dictionary is concurrently enumerated, the enumeration can observe a torn/garbage entry and dereference it, crashing the process with a native access violation (observed as Opc.Ua.ConditionState.IsBranch on a null this).
This is on 1.5.378.145, therefore, could be on master378, but also on master branch, both - if exist - should be fixed.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Anything else?
No response