"ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

classic Classic list List threaded Threaded
12 messages Options
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

"ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

Recentely I updated Ignite version from  1.5.8 to 1.6.0 and found some queries failed with the following information.
It never happened in Ignite version 1.5.8.
Could anyone help me to confirm it?

[14:04:45,486][SEVERE][pub-#14%null%][GridMapQueryExecutor] Failed to execute local query: GridQueryRequest [reqId=1013355, pageSize=1024, space=eqtLnkRlCache, qrys=[GridCacheSqlQuery [qry=SELECT
E.LINKID __C0,
E.LINKNAME __C1
FROM "eqtLnkRlCache".EQTLINKRELATED E
WHERE (E.EQTEMSNAME = '218.5.204.111-1-0-3.1-8') AND ((E.LINKTYPE = 3) AND (E.REGIONID = 350600)), params=[], paramIdxs=[], paramsSize=0, cols={__C0=GridSqlType [type=13, scale=0, precision=2147483647, displaySize=2147483647, sql=VARCHAR], __C1=GridSqlType [type=13, scale=0, precision=2147483647, displaySize=2147483647, sql=VARCHAR]}, alias=null]], topVer=AffinityTopologyVersion [topVer=24, minorTopVer=0], extraSpaces=null, parts=null]
class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query.
        at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:847)
        at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:870)
        at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:454)
        at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:184)
        at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1065)
        at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:572)
        at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$2.iterator(IgniteH2Indexing.java:971)
        at org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:61)
        at org.apache.ignite.internal.processors.cache.QueryCursorImpl.getAll(QueryCursorImpl.java:73)
        at com.caa.test.ignite.rlam.service.impl.IgnitePublicServiceImpl.queryBySqlFieldCommon(IgnitePublicServiceImpl.java:222)
        at com.caa.test.ignite.rlam.service.impl.IgnitePublicServiceImpl.queryBySqlFieldCommon(IgnitePublicServiceImpl.java:243)
        at com.caa.test.ignite.rlam.service.impl.TopoRelatedServiceImpl.findCableLinkInfo2(TopoRelatedServiceImpl.java:356)
        at com.caa.test.ignite.rlam.service.impl.TopoRelatedServiceImpl.addCableLink(TopoRelatedServiceImpl.java:282)
        at com.caa.test.ignite.rlam.service.impl.TopoRelatedServiceImpl.fullTopoRelatedInfo(TopoRelatedServiceImpl.java:92)
        at com.caa.test.ignite.rlam.compute.TopoRelatedRunnable.doLoadOrgAlarmInfo(TopoRelatedRunnable.java:58)
        at com.caa.test.ignite.rlam.compute.TopoRelatedRunnable.run(TopoRelatedRunnable.java:47)
        at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C4V2.execute(GridClosureProcessor.java:2206)
        at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:509)
        at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6459)
        at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:503)
        at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:456)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException"; SQL statement:
SELECT
E.LINKID __C0,
E.LINKNAME __C1
FROM "eqtLnkRlCache".EQTLINKRELATED E
WHERE (E.EQTEMSNAME = '218.5.204.111-1-0-3.1-8') AND ((E.LINKTYPE = 3) AND (E.REGIONID = 350600)) [50000-175]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
        at org.h2.message.DbException.get(DbException.java:161)
        at org.h2.message.DbException.convert(DbException.java:284)
        at org.h2.command.Command.executeQuery(Command.java:208)
        at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:106)
        at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:844)
        ... 24 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

Hi,

The exception looks truncated as it ends with 'Caused by: java.lang.ArrayIndexOutOfBoundsException'. Can you please provide the whole trace?

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

What trace do you need?

The log files in work/log?
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

I need the trace of ArrayIndexOutOfBoundsException which is the root cause. The log you provided shows 'caused by' line, but then it should also have the actual trace for it. It's fine if you simply attach the full log file.

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

This post was updated on .
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

Hi,

Can you provide your configuration? Are you using custom affinity?
Also please try to run the test with assertions (set -ea JVM property). If something is wrong, most likely it will give more informative error.

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

nohup2.outI have ran the test with assertions .

Please refer to the attachment!
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

Hi,

Can you please also attach your configuration?

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

ignite-related.xmlPlease refer to the attachment.
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

Crossposting to dev@

Folks,

I noticed the exception below in couple of user threads already. This actually means that partition number for the key is -1, which doesn't make much sense to me. Does anyone has any ideas?

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:400)
	at java.util.ArrayList.get(ArrayList.java:413)
	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignment.get(GridAffinityAssignment.java:152)
	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.nodes(GridAffinityAssignmentCache.java:387)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.nodes(GridCacheAffinityManager.java:251)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:287)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:278)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:302)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$7$3.apply(IgniteH2Indexing.java:1730)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase$FilteringIterator.accept(GridH2IndexBase.java:251)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase$FilteringIterator.accept(GridH2IndexBase.java:200)
	at org.apache.ignite.internal.util.lang.GridFilteredIterator.hasNext(GridFilteredIterator.java:59)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2Cursor.next(GridH2Cursor.java:59)
	at org.h2.index.IndexCursor.next(IndexCursor.java:274)
	at org.h2.table.TableFilter.next(TableFilter.java:359)
	at org.h2.command.dml.Select.queryFlat(Select.java:527)
	at org.h2.command.dml.Select.queryWithoutCache(Select.java:632)
	at org.h2.command.dml.Query.query(Query.java:297)
	at org.h2.command.dml.Query.query(Query.java:284)
	at org.h2.command.dml.Query.query(Query.java:36)
	at org.h2.command.CommandContainer.query(CommandContainer.java:91)
	at org.h2.command.Command.executeQuery(Command.java:196)
	... 26 more

-Val

On Mon, Jul 25, 2016 at 5:07 AM, ght230 <[hidden email]> wrote:
ignite-related.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n6516/ignite-related.xml>
Please refer to the attachment.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ArrayIndexOutOfBoundsException-happened-when-doing-qurey-in-version-1-6-0-tp6245p6516.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Semyon Boikov Semyon Boikov
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0

We already have similar issue reproduced in our benchmarks - https://issues.apache.org/jira/browse/IGNITE-3300. I think this is related to optimziation done in 1.6 to store key partition in the cache key. I believe fix will be included in 1.7 release.

On Tue, Jul 26, 2016 at 2:13 AM, Valentin Kulichenko <[hidden email]> wrote:
Crossposting to dev@

Folks,

I noticed the exception below in couple of user threads already. This actually means that partition number for the key is -1, which doesn't make much sense to me. Does anyone has any ideas?

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:400)
	at java.util.ArrayList.get(ArrayList.java:413)
	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignment.get(GridAffinityAssignment.java:152)
	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.nodes(GridAffinityAssignmentCache.java:387)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.nodes(GridCacheAffinityManager.java:251)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:287)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:278)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:302)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$7$3.apply(IgniteH2Indexing.java:1730)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase$FilteringIterator.accept(GridH2IndexBase.java:251)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase$FilteringIterator.accept(GridH2IndexBase.java:200)
	at org.apache.ignite.internal.util.lang.GridFilteredIterator.hasNext(GridFilteredIterator.java:59)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2Cursor.next(GridH2Cursor.java:59)
	at org.h2.index.IndexCursor.next(IndexCursor.java:274)
	at org.h2.table.TableFilter.next(TableFilter.java:359)
	at org.h2.command.dml.Select.queryFlat(Select.java:527)
	at org.h2.command.dml.Select.queryWithoutCache(Select.java:632)
	at org.h2.command.dml.Query.query(Query.java:297)
	at org.h2.command.dml.Query.query(Query.java:284)
	at org.h2.command.dml.Query.query(Query.java:36)
	at org.h2.command.CommandContainer.query(CommandContainer.java:91)
	at org.h2.command.Command.executeQuery(Command.java:196)
	... 26 more

-Val

On Mon, Jul 25, 2016 at 5:07 AM, ght230 <[hidden email]> wrote:
ignite-related.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n6516/ignite-related.xml>
Please refer to the attachment.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ArrayIndexOutOfBoundsException-happened-when-doing-qurey-in-version-1-6-0-tp6245p6516.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Igor Sapego Igor Sapego
Reply | Threaded
Open this post in threaded view
|

Re: "ArrayIndexOutOfBoundsException" happened when doing qurey in version 1.6.0


Best Regards,
Igor

On Tue, Jul 26, 2016 at 8:43 AM, Semyon Boikov <[hidden email]> wrote:
We already have similar issue reproduced in our benchmarks - https://issues.apache.org/jira/browse/IGNITE-3300. I think this is related to optimziation done in 1.6 to store key partition in the cache key. I believe fix will be included in 1.7 release.

On Tue, Jul 26, 2016 at 2:13 AM, Valentin Kulichenko <[hidden email]> wrote:
Crossposting to dev@

Folks,

I noticed the exception below in couple of user threads already. This actually means that partition number for the key is -1, which doesn't make much sense to me. Does anyone has any ideas?

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:400)
	at java.util.ArrayList.get(ArrayList.java:413)
	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignment.get(GridAffinityAssignment.java:152)
	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.nodes(GridAffinityAssignmentCache.java:387)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.nodes(GridCacheAffinityManager.java:251)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:287)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:278)
	at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.primary(GridCacheAffinityManager.java:302)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$7$3.apply(IgniteH2Indexing.java:1730)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase$FilteringIterator.accept(GridH2IndexBase.java:251)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase$FilteringIterator.accept(GridH2IndexBase.java:200)
	at org.apache.ignite.internal.util.lang.GridFilteredIterator.hasNext(GridFilteredIterator.java:59)
	at org.apache.ignite.internal.processors.query.h2.opt.GridH2Cursor.next(GridH2Cursor.java:59)
	at org.h2.index.IndexCursor.next(IndexCursor.java:274)
	at org.h2.table.TableFilter.next(TableFilter.java:359)
	at org.h2.command.dml.Select.queryFlat(Select.java:527)
	at org.h2.command.dml.Select.queryWithoutCache(Select.java:632)
	at org.h2.command.dml.Query.query(Query.java:297)
	at org.h2.command.dml.Query.query(Query.java:284)
	at org.h2.command.dml.Query.query(Query.java:36)
	at org.h2.command.CommandContainer.query(CommandContainer.java:91)
	at org.h2.command.Command.executeQuery(Command.java:196)
	... 26 more

-Val

On Mon, Jul 25, 2016 at 5:07 AM, ght230 <[hidden email]> wrote:
ignite-related.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n6516/ignite-related.xml>
Please refer to the attachment.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ArrayIndexOutOfBoundsException-happened-when-doing-qurey-in-version-1-6-0-tp6245p6516.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.