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
Elasticsearch version (bin/elasticsearch --version):
Version: 6.3.0, Build: default/rpm/424e937/2018-06-11T23:38:03.357887Z, JVM: 1.8.0_121
Plugins installed: []
JVM version (java -version):
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
OS version (uname -a if on a Unix-like system):
Linux se10tsnbe06.tclk.se.om.com 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Dec 28 14:23:39 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Running a query that has many OR expressions(in lac of IN clause) through the JDBC driver causes a stack overflow while parsing the SQL which crashes the instance of elasticsearch.
It's probably not ok to have a query with so many OR expression, but in lack of an IN clause we did what we could. But we would expect that this does not to crash the entire node.
Create an index with given mapping (attached file: index_mapping.json)
Perform given query through JDBC(attachd file: crashy.sql)
Notice at least one node in the cluster goes down.
Provide logs (if relevant):
[2018-08-16T17:41:34,222][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [SDD-N3] fatal error in thread [Thread-18], exiting
java.lang.StackOverflowError: null
at org.elasticsearch.xpack.sql.parser.SqlBaseParser$LogicalBinaryContext.accept(SqlBaseParser.java:2742) ~[?:?]
at org.elasticsearch.xpack.sql.parser.AbstractBuilder.typedParsing(AbstractBuilder.java:40) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.expression(ExpressionBuilder.java:101) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.visitLogicalBinary(ExpressionBuilder.java:410) ~[?:?]
at org.elasticsearch.xpack.sql.parser.SqlBaseParser$LogicalBinaryContext.accept(SqlBaseParser.java:2742) ~[?:?]
at org.elasticsearch.xpack.sql.parser.AbstractBuilder.typedParsing(AbstractBuilder.java:40) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.expression(ExpressionBuilder.java:101) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.visitLogicalBinary(ExpressionBuilder.java:410) ~[?:?]
at org.elasticsearch.xpack.sql.parser.SqlBaseParser$LogicalBinaryContext.accept(SqlBaseParser.java:2742) ~[?:?]
at org.elasticsearch.xpack.sql.parser.AbstractBuilder.typedParsing(AbstractBuilder.java:40) ~[?:?]
…
The text was updated successfully, but these errors were encountered:
Catch StackOverflowError exception and return a descriptive message
to the client. This prevents large statement from killing the cluster.
Fixes: elastic#32942
Elasticsearch version (
bin/elasticsearch --version
):Version: 6.3.0, Build: default/rpm/424e937/2018-06-11T23:38:03.357887Z, JVM: 1.8.0_121
Plugins installed: []
JVM version (
java -version
):java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
OS version (
uname -a
if on a Unix-like system):Linux se10tsnbe06.tclk.se.om.com 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Dec 28 14:23:39 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Running a query that has many OR expressions(in lac of IN clause) through the JDBC driver causes a stack overflow while parsing the SQL which crashes the instance of elasticsearch.
It's probably not ok to have a query with so many OR expression, but in lack of an IN clause we did what we could. But we would expect that this does not to crash the entire node.
stack_overflow_crash_files.zip
Steps to reproduce:
Provide logs (if relevant):
[2018-08-16T17:41:34,222][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [SDD-N3] fatal error in thread [Thread-18], exiting
java.lang.StackOverflowError: null
at org.elasticsearch.xpack.sql.parser.SqlBaseParser$LogicalBinaryContext.accept(SqlBaseParser.java:2742) ~[?:?]
at org.elasticsearch.xpack.sql.parser.AbstractBuilder.typedParsing(AbstractBuilder.java:40) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.expression(ExpressionBuilder.java:101) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.visitLogicalBinary(ExpressionBuilder.java:410) ~[?:?]
at org.elasticsearch.xpack.sql.parser.SqlBaseParser$LogicalBinaryContext.accept(SqlBaseParser.java:2742) ~[?:?]
at org.elasticsearch.xpack.sql.parser.AbstractBuilder.typedParsing(AbstractBuilder.java:40) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.expression(ExpressionBuilder.java:101) ~[?:?]
at org.elasticsearch.xpack.sql.parser.ExpressionBuilder.visitLogicalBinary(ExpressionBuilder.java:410) ~[?:?]
at org.elasticsearch.xpack.sql.parser.SqlBaseParser$LogicalBinaryContext.accept(SqlBaseParser.java:2742) ~[?:?]
at org.elasticsearch.xpack.sql.parser.AbstractBuilder.typedParsing(AbstractBuilder.java:40) ~[?:?]
…
The text was updated successfully, but these errors were encountered: