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
If user add policy to a large amount of indices in one call, this code logic just recursively call itself to check managed index permission one by one.
In the end, it will cause stackoverflow error and causes the node to go down.
[2023-05-09T14:38:56,649][ERROR][o.o.s.f.SecurityFilter ] [3fd290699e29bc6eedad27f6fa967a48] Unexpected exception java.lang.StackOverflowError
java.lang.StackOverflowError
at org.apache.logging.log4j.util.PropertiesUtil$Environment.access$200(PropertiesUtil.java:420)
at org.apache.logging.log4j.util.PropertiesUtil.getStringProperty(PropertiesUtil.java:368)
at org.apache.logging.log4j.util.PropertiesUtil.getBooleanProperty(PropertiesUtil.java:155)
at org.apache.logging.log4j.status.StatusLogger.isDebugPropertyEnabled(StatusLogger.java:120)
at org.apache.logging.log4j.status.StatusLogger.isEnabled(StatusLogger.java:403)
at org.apache.logging.log4j.status.StatusLogger.isEnabled(StatusLogger.java:344)
at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1930)
at org.apache.logging.log4j.spi.AbstractLogger.warn(AbstractLogger.java:2805)
at org.apache.logging.log4j.spi.AbstractLogger.handleLogMessageException(AbstractLogger.java:2225)
at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2208)
at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2159)
at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2142)
at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2058)
at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1931)
at org.apache.logging.log4j.spi.AbstractLogger.warn(AbstractLogger.java:2805)
at org.apache.logging.log4j.spi.AbstractLogger.handleLogMessageException(AbstractLogger.java:2225)
at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2208)
at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2159)
at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2142)
at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2017)
at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
at org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:750)
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:373)
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:189)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:108)
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110)
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97)
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:461)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.validateIndexPermissions(TransportAddPolicyAction.kt:160)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.proceed(TransportAddPolicyAction.kt:186)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.access$proceed(TransportAddPolicyAction.kt:103)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onFailure(TransportAddPolicyAction.kt:172)
at org.opensearch.action.support.TransportAction$1.onFailure(TransportAction.java:123)
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:374)
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:189)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:108)
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110)
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97)
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:461)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.validateIndexPermissions(TransportAddPolicyAction.kt:160)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.proceed(TransportAddPolicyAction.kt:186)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.access$proceed(TransportAddPolicyAction.kt:103)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onFailure(TransportAddPolicyAction.kt:172)
at org.opensearch.action.support.TransportAction$1.onFailure(TransportAction.java:123)
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:374)
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:189)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:108)
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110)
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97)
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:461)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.validateIndexPermissions(TransportAddPolicyAction.kt:160)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.proceed(TransportAddPolicyAction.kt:186)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.access$proceed(TransportAddPolicyAction.kt:103)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onFailure(TransportAddPolicyAction.kt:172)
at org.opensearch.action.support.TransportAction$1.onFailure(TransportAction.java:123)
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:374)
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:189)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:108)
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110)
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97)
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:461)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.validateIndexPermissions(TransportAddPolicyAction.kt:160)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.proceed(TransportAddPolicyAction.kt:186)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.access$proceed(TransportAddPolicyAction.kt:103)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onResponse(TransportAddPolicyAction.kt:166)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onResponse(TransportAddPolicyAction.kt:163)
at org.opensearch.action.support.TransportAction$1.onResponse(TransportAction.java:114)
at org.opensearch.action.support.TransportAction$1.onResponse(TransportAction.java:108)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.managedIndex.TransportManagedIndexAction.doExecute(TransportManagedIndexAction.kt:30)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.managedIndex.TransportManagedIndexAction.doExecute(TransportManagedIndexAction.kt:20)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:219)
at org.opensearch.indexmanagement.rollup.actionfilter.FieldCapsFilter.apply(FieldCapsFilter.kt:118)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:264)
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:189)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:108)
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110)
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97)
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:461)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.validateIndexPermissions(TransportAddPolicyAction.kt:160)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.proceed(TransportAddPolicyAction.kt:186)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.access$proceed(TransportAddPolicyAction.kt:103)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onFailure(TransportAddPolicyAction.kt:172)
at org.opensearch.action.support.TransportAction$1.onFailure(TransportAction.java:123)
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:374)
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78)
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:217)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:189)
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:108)
at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110)
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97)
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:461)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.validateIndexPermissions(TransportAddPolicyAction.kt:160)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.proceed(TransportAddPolicyAction.kt:186)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler.access$proceed(TransportAddPolicyAction.kt:103)
at org.opensearch.indexmanagement.indexstatemanagement.transport.action.addpolicy.TransportAddPolicyAction$AddPolicyHandler$validateIndexPermissions$1.onFailure(TransportAddPolicyAction.kt:172)
The text was updated successfully, but these errors were encountered:
Code: https://github.com/opensearch-project/index-management/blob/main/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt#L158-L182
If user add policy to a large amount of indices in one call, this code logic just recursively call itself to check managed index permission one by one.
In the end, it will cause stackoverflow error and causes the node to go down.
The text was updated successfully, but these errors were encountered: