You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
In issue #3055, a validation has been added that makes it impossible to save a point with a cyclic dependency, but in the old configuration such a dependency could have been saved earlier and with such a dependency, a StackOverflowError error occurred when stopping and starting the point.
To Reproduce
Steps to reproduce the behavior:
Case 1:
Login as admin;
Import config from cyclic_conf.txt;
Enabled/Disabled point 'vds_1_vdp_1' then StackOverflowError in tomcat/logs/mango.log;
java.lang.StackOverflowError: null
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at org.apache.commons.logging.LogFactory.getContextClassLoaderInternal(LogFactory.java:808) ~[commons-logging-1.2.jar:1.2]
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:419) ~[commons-logging-1.2.jar:1.2]
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655) ~[commons-logging-1.2.jar:1.2]
at com.serotonin.mango.rt.event.type.DataSourceEventType.<init>(DataSourceEventType.java:41) ~[classes/:?]
at com.serotonin.mango.rt.event.type.DataSourcePointEventType.<init>(DataSourcePointEventType.java:46) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.DataSourceRT.getDataSourceEventType(DataSourceRT.java:193) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.DataSourceRT._raiseEvent(DataSourceRT.java:174) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.DataSourceRT._raiseEvent(DataSourceRT.java:170) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.DataSourceRT.raiseEvent(DataSourceRT.java:203) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.meta.MetaDataSourceRT.raiseContextError(MetaDataSourceRT.java:129) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.meta.ScriptExecutor.convertContext(ScriptExecutor.java:95) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.meta.MetaPointLocatorRT.createContext(MetaPointLocatorRT.java:333) ~[classes/:?]
at com.serotonin.mango.rt.dataSource.meta.MetaPointLocatorRT.pointTerminated(MetaPointLocatorRT.java:198) ~[classes/:?]
Case 2:
Login as admin;
Created OPC UA Data Source;
Find nodes;
Case 3:
Login as admin;
Created Virtual Data Source as virtual_1(Update: 1s, enabled) with point as 'virutal_1 - vdp_1' (Numeric, Increment, enabled);
Created three Meta Data Source as: meta_1, meta_2, meta_3 (all enabled) with points:
'meta_1 - mdp_1' -> data type: Numeric, Add context 'virtual_1 - vdp_1' as p1, Script: 'return p1.value', enabled;
'meta_2 - mdp_1' -> data type: Numeric, Add context 'meta_1 - mdp_1' as p1, Script: 'return p1.value', enabled;
Then there are no such errors in the logs:: ERROR 2025-02-14T22:51:24,475 (com.serotonin.mango.rt.dataSource.meta.ScriptExecutor.convertContext:81) - Error DataPointRT null java.lang.Exception: key:206 value:p1 from:datapoint: meta_3 - mdp_1 (id: 208, xid: DP_193203, dataSourceId: 69, dataSourceXid: DS_328121, dataSourceName: meta_3)
Case 4:
Login as admin;
Created Virtual Data Source as virtual_1(Update: 1s, enabled) with point as 'virutal_1 - vdp_1' (Numeric, Increment, enabled);
Created three Meta Data Source as: meta_1, meta_2, meta_3 (all enabled) with points:
'meta_1 - mdp_1' -> data type: Numeric, Add context 'virtual_1 - vdp_1' as p1, Script: 'return p1.value', enabled;
'meta_2 - mdp_1' -> data type: Numeric, Add context 'meta_1 - mdp_1' as p1, Script: 'return p1.value', enabled;
…rce:
- Added validate cyclic dependency in methods: MetaPointLocatorRT.pointInitialized, MetaPointLocatorRT.pointTerminated;
- User Login Event set state 'Return To Normal' after logout user;
- Refactoring for recursive actions: SearchCyclicDependencyAction, SetUnreliableDataPointsAction, CollectMetaDataPointFromContextAction, SearchOpcUaNodesAction;
- Added param 'scadalts.validation.search-cyclic-depth' to env.properties;
- Invoke mangoContextListener.contextInitialized is not initialized mangoContextListener;
- Invoke 'Return To Normal' again only if changed unreliable;
- Added test cases in: CyclicDependencyValidationUtilsTest, DataPointUnreliableUtilsTest;
- Optimized test, closed timer, reduce number threads 'Serotonin Timer': DataPointUnreliableUtilsTest;
Description
In issue #3055, a validation has been added that makes it impossible to save a point with a cyclic dependency, but in the old configuration such a dependency could have been saved earlier and with such a dependency, a StackOverflowError error occurred when stopping and starting the point.
To Reproduce
Steps to reproduce the behavior:
Case 1:
Case 2:
Case 3:
ERROR 2025-02-14T22:51:24,475 (com.serotonin.mango.rt.dataSource.meta.ScriptExecutor.convertContext:81) - Error DataPointRT null java.lang.Exception: key:206 value:p1 from:datapoint: meta_3 - mdp_1 (id: 208, xid: DP_193203, dataSourceId: 69, dataSourceXid: DS_328121, dataSourceName: meta_3)
Case 4:
Spec:
Additional context
cyclic_conf.txt
The text was updated successfully, but these errors were encountered: