Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.4.1 GA (4.5.0 GA Suite Release)
-
Fix Version/s: 3.5.0 GA (4.8.0 GA Suite Release)
-
Component/s: None
-
Labels:None
-
QA Validation Status:Not Yet Validated
Description
I am using Mondrian in JRuby using mondrian-olap library (https://github.com/rsim/mondrian-olap).
Recently I upgraded mondrian-olap library from Mondrian 3.3.0 to 3.4.1 and in my production application I started to experience random exceptions when executing queries. When I start many different queries against the same cube (and all these queries run in separate threads in my JRuby application) then I get random IllegalArgumentException and NullPointerException exceptions. Here are example of top of stack traces that I have recorded in my logs:
org.olap4j.OlapException: mondrian gave exception while executing query
"root cause: java.lang.IllegalArgumentException: ",
"root cause: mondrian.rolap.RolapAggregator$1.aggregate(RolapAggregator.java:73)",
"root cause: mondrian.rolap.agg.SegmentBuilder.rollup(SegmentBuilder.java:408)",
"root cause: mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:293)",
"root cause: mondrian.rolap.RolapResult.phase(RolapResult.java:500)",
"root cause: mondrian.rolap.RolapResult.executeBody(RolapResult.java:839)",
"mondrian/olap4j/MondrianOlap4jConnection.java:759:in `createException'",
"mondrian/olap4j/MondrianOlap4jStatement.java:421:in `executeOlapQueryInternal'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:72:in `executeQuery'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:42:in `executeQuery'",
org.olap4j.OlapException: mondrian gave exception while executing query
"root cause: java.lang.NullPointerException: ",
"root cause: mondrian.rolap.RolapAggregator$1.aggregate(RolapAggregator.java:62)",
"root cause: mondrian.rolap.agg.SegmentBuilder.rollup(SegmentBuilder.java:376)",
"root cause: mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:293)",
"root cause: mondrian.rolap.RolapResult.phase(RolapResult.java:500)",
"root cause: mondrian.rolap.RolapResult.loadMembers(RolapResult.java:609)",
"mondrian/olap4j/MondrianOlap4jConnection.java:759:in `createException'",
"mondrian/olap4j/MondrianOlap4jStatement.java:421:in `executeOlapQueryInternal'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:72:in `executeQuery'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:42:in `executeQuery'",
It's quite hard to reproduce this issue on some sample schema. For additional information I can include some anonymized sample MDX that are failing (each time some different MDX statements are failing):
SELECT NON EMPTY HIERARCHIZE([Time].[Year].Members) ON COLUMNS,
NON EMPTY HIERARCHIZE([People].[Person].Members) ON ROWS
FROM [Projects]
WHERE ([Project Status].[Active], [Projects and Tasks].[Company 1], [Completion Status].[All Completion Statuses], [Measures].[Actual hours])
SELECT NON EMPTY HIERARCHIZE([Projects and Tasks].[Company].Members) ON COLUMNS,
NON EMPTY {[Measures].[Actual hours]} ON ROWS
FROM [Projects]
WHERE ([People].[Company 1].[Person 1], [Time.Weekly].[2011], [Project Status].[Active], [Completion Status].[All Completion Statuses])
When I run reports (which execute these MDX statements) sequentially then I do not get any errors. But when I run about 10 reports in parallel then I always can get that some MDX execution is failing.
When I downgraded mondrian.jar and olap4j.jar to versions from Mondrian 3.3.0 version then I cannot reproduce issue any more. So I think that the issue is caused by some changes between Mondrian 3.3.0 and Mondrian 3.4.1 that something is not thread-safe anymore.
If you have any suggestions what could be causing this issue and what additional debug information I should collect then please let me know and then I could try to provide additional details.
Recently I upgraded mondrian-olap library from Mondrian 3.3.0 to 3.4.1 and in my production application I started to experience random exceptions when executing queries. When I start many different queries against the same cube (and all these queries run in separate threads in my JRuby application) then I get random IllegalArgumentException and NullPointerException exceptions. Here are example of top of stack traces that I have recorded in my logs:
org.olap4j.OlapException: mondrian gave exception while executing query
"root cause: java.lang.IllegalArgumentException: ",
"root cause: mondrian.rolap.RolapAggregator$1.aggregate(RolapAggregator.java:73)",
"root cause: mondrian.rolap.agg.SegmentBuilder.rollup(SegmentBuilder.java:408)",
"root cause: mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:293)",
"root cause: mondrian.rolap.RolapResult.phase(RolapResult.java:500)",
"root cause: mondrian.rolap.RolapResult.executeBody(RolapResult.java:839)",
"mondrian/olap4j/MondrianOlap4jConnection.java:759:in `createException'",
"mondrian/olap4j/MondrianOlap4jStatement.java:421:in `executeOlapQueryInternal'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:72:in `executeQuery'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:42:in `executeQuery'",
org.olap4j.OlapException: mondrian gave exception while executing query
"root cause: java.lang.NullPointerException: ",
"root cause: mondrian.rolap.RolapAggregator$1.aggregate(RolapAggregator.java:62)",
"root cause: mondrian.rolap.agg.SegmentBuilder.rollup(SegmentBuilder.java:376)",
"root cause: mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:293)",
"root cause: mondrian.rolap.RolapResult.phase(RolapResult.java:500)",
"root cause: mondrian.rolap.RolapResult.loadMembers(RolapResult.java:609)",
"mondrian/olap4j/MondrianOlap4jConnection.java:759:in `createException'",
"mondrian/olap4j/MondrianOlap4jStatement.java:421:in `executeOlapQueryInternal'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:72:in `executeQuery'",
"mondrian/olap4j/MondrianOlap4jPreparedStatement.java:42:in `executeQuery'",
It's quite hard to reproduce this issue on some sample schema. For additional information I can include some anonymized sample MDX that are failing (each time some different MDX statements are failing):
SELECT NON EMPTY HIERARCHIZE([Time].[Year].Members) ON COLUMNS,
NON EMPTY HIERARCHIZE([People].[Person].Members) ON ROWS
FROM [Projects]
WHERE ([Project Status].[Active], [Projects and Tasks].[Company 1], [Completion Status].[All Completion Statuses], [Measures].[Actual hours])
SELECT NON EMPTY HIERARCHIZE([Projects and Tasks].[Company].Members) ON COLUMNS,
NON EMPTY {[Measures].[Actual hours]} ON ROWS
FROM [Projects]
WHERE ([People].[Company 1].[Person 1], [Time.Weekly].[2011], [Project Status].[Active], [Completion Status].[All Completion Statuses])
When I run reports (which execute these MDX statements) sequentially then I do not get any errors. But when I run about 10 reports in parallel then I always can get that some MDX execution is failing.
When I downgraded mondrian.jar and olap4j.jar to versions from Mondrian 3.3.0 version then I cannot reproduce issue any more. So I think that the issue is caused by some changes between Mondrian 3.3.0 and Mondrian 3.4.1 that something is not thread-safe anymore.
If you have any suggestions what could be causing this issue and what additional debug information I should collect then please let me know and then I could try to provide additional details.
Just spend 10 minutes looking at it and let me know if you could think of a probable cause. We can ask the Raimonds to gather extra diagnostics.