|
From: <tho...@us...> - 2014-06-16 14:18:07
|
Revision: 8483
http://sourceforge.net/p/bigdata/code/8483
Author: thompsonbry
Date: 2014-06-16 14:17:57 +0000 (Mon, 16 Jun 2014)
Log Message:
-----------
It looks like the ArbitraryLengthPathOp could be more defensive to avoid an NPE:
ArbitraryLengthPathOp.java line 778
{{{
if (parentSolutionIn.isBound(gearing.outVar)) {
// do this later now
if (!bs.get(gearing.tVarOut).equals(parentSolutionIn.get(gearing.outVar))) {
}}}
Since we already know that there is a binding for gearing.outVar, this could be written as:
{{{
if (parentSolutionIn.isBound(gearing.outVar)) {
// do this now: note already known to be bound per test above.
final IConstant<?> poutVar = parentSolutionIn.get(gearing.outVar);
if (!poutVar.equals(bs.get(gearing.tVarOut))) {
}}}
This was noticed when observing an NPE when {{{bs.get(gearing.tVarOut)}}} evaluated to null. This is not the root cause of the problem. I am still looking for that.
I have enabled the property-path test suite for the BigdataEmbeddedFederationSparqlTest. This test suite is not automatically run in CI due to resource leaks (which is documented on another ticket). However, you can now trivially recreate the problem by uncommenting the following line in BigdataSparqlTest and running the BigdataEmbeddedFederationSparqlTest.
{{{
static final Collection<String> testURIs = Arrays.asList(new String[] {
// property paths
// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#sparql11-collection-01",
}}}
When run locally, the test fails as follows. The failure is the same as the one documented above. It is attempting to bind a null value onto a variable. The root cause is likely to be a failure to flow the solutions back to the query controller such that the results from the sub-query appear as unbound on the query controller. It could also be a failure to run the sub-query from the query controller. I have not diagnosed this further.
{{{
org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eb7362c8-a987-4448-9113-99816a82311d,bopId=14,partitionId=-1,sinkId=17,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:188)
at org.openrdf.query.impl.TupleQueryResultImpl.hasNext(TupleQueryResultImpl.java:90)
at info.aduna.iteration.Iterations.addAll(Iterations.java:71)
at org.openrdf.query.impl.MutableTupleQueryResult.<init>(MutableTupleQueryResult.java:86)
at org.openrdf.query.impl.MutableTupleQueryResult.<init>(MutableTupleQueryResult.java:92)
at org.openrdf.query.parser.sparql.SPARQLQueryTest.compareTupleQueryResults(SPARQLQueryTest.java:244)
at org.openrdf.query.parser.sparql.SPARQLASTQueryTest.runTest(SPARQLASTQueryTest.java:196)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eb7362c8-a987-4448-9113-99816a82311d,bopId=14,partitionId=-1,sinkId=17,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.checkFuture(BlockingBuffer.java:1523)
at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator._hasNext(BlockingBuffer.java:1710)
at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.hasNext(BlockingBuffer.java:1563)
at com.bigdata.striterator.AbstractChunkedResolverator._hasNext(AbstractChunkedResolverator.java:365)
at com.bigdata.striterator.AbstractChunkedResolverator.hasNext(AbstractChunkedResolverator.java:341)
at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:134)
... 19 more
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eb7362c8-a987-4448-9113-99816a82311d,bopId=14,partitionId=-1,sinkId=17,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.checkFuture(BlockingBuffer.java:1454)
... 24 more
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eb7362c8-a987-4448-9113-99816a82311d,bopId=14,partitionId=-1,sinkId=17,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at com.bigdata.rdf.sail.RunningQueryCloseableIterator.checkFuture(RunningQueryCloseableIterator.java:59)
at com.bigdata.rdf.sail.RunningQueryCloseableIterator.close(RunningQueryCloseableIterator.java:73)
at com.bigdata.striterator.ChunkedWrappedIterator.close(ChunkedWrappedIterator.java:180)
at com.bigdata.striterator.AbstractChunkedResolverator$ChunkConsumerTask.call(AbstractChunkedResolverator.java:297)
at com.bigdata.striterator.AbstractChunkedResolverator$ChunkConsumerTask.call(AbstractChunkedResolverator.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eb7362c8-a987-4448-9113-99816a82311d,bopId=14,partitionId=-1,sinkId=17,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at com.bigdata.util.concurrent.Haltable.get(Haltable.java:273)
at com.bigdata.bop.engine.AbstractRunningQuery.get(AbstractRunningQuery.java:1477)
at com.bigdata.bop.engine.AbstractRunningQuery.get(AbstractRunningQuery.java:1)
at com.bigdata.rdf.sail.RunningQueryCloseableIterator.checkFuture(RunningQueryCloseableIterator.java:46)
... 8 more
Caused by: java.lang.Exception: task=ChunkTask{query=eb7362c8-a987-4448-9113-99816a82311d,bopId=14,partitionId=-1,sinkId=17,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1335)
at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTaskWrapper.run(ChunkedRunningQuery.java:894)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.bigdata.concurrent.FutureTaskMon.run(FutureTaskMon.java:63)
at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkFutureTask.run(ChunkedRunningQuery.java:789)
... 3 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1315)
... 8 more
Caused by: java.lang.IllegalArgumentException
at com.bigdata.bop.bindingSet.ListBindingSet.set(ListBindingSet.java:430)
at com.bigdata.bop.ContextBindingSet.set(ContextBindingSet.java:74)
at com.bigdata.bop.paths.ArbitraryLengthPathOp$ArbitraryLengthPathTask.processChunk(ArbitraryLengthPathOp.java:816)
at com.bigdata.bop.paths.ArbitraryLengthPathOp$ArbitraryLengthPathTask.call(ArbitraryLengthPathOp.java:270)
at com.bigdata.bop.paths.ArbitraryLengthPathOp$ArbitraryLengthPathTask.call(ArbitraryLengthPathOp.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1314)
... 8 more
}}}
See #942 (Property path failures in scale-out).
Revision Links:
--------------
http://sourceforge.net/p/bigdata/code/2
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataEmbeddedFederationSparqlTest.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java 2014-06-16 11:23:44 UTC (rev 8482)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java 2014-06-16 14:17:57 UTC (rev 8483)
@@ -777,13 +777,14 @@
*/
if (parentSolutionIn.isBound(gearing.outVar)) {
- // do this later now
-
- if (!bs.get(gearing.tVarOut).equals(parentSolutionIn.get(gearing.outVar))) {
-
- if (log.isDebugEnabled()) {
- log.debug("transitive output does not match incoming binding for output var, dropping");
- }
+ // do this now: note already known to be bound per test above.
+ final IConstant<?> poutVar = parentSolutionIn.get(gearing.outVar);
+
+ if (!poutVar.equals(bs.get(gearing.tVarOut))) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("transitive output does not match incoming binding for output var, dropping");
+ }
continue;
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataEmbeddedFederationSparqlTest.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataEmbeddedFederationSparqlTest.java 2014-06-16 11:23:44 UTC (rev 8482)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataEmbeddedFederationSparqlTest.java 2014-06-16 14:17:57 UTC (rev 8483)
@@ -65,7 +65,6 @@
* {@link EmbeddedFederation}.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public class BigdataEmbeddedFederationSparqlTest extends BigdataSparqlTest {
@@ -110,7 +109,7 @@
if(hideDatasetTests)
suite1 = filterOutTests(suite1,"dataset");
- suite1 = filterOutTests(suite1, "property-paths");
+// suite1 = filterOutTests(suite1, "property-paths");
/**
* BSBM BI use case query 5
@@ -157,6 +156,7 @@
final Factory factory = new Factory() {
+ @Override
public SPARQLQueryTest createSPARQLQueryTest(String testURI,
String name, String queryFileURL, String resultFileURL,
Dataset dataSet, boolean laxCardinality) {
@@ -166,6 +166,7 @@
}
+ @Override
public SPARQLQueryTest createSPARQLQueryTest(String testURI,
String name, String queryFileURL, String resultFileURL,
Dataset dataSet, boolean laxCardinality, boolean checkOrder) {
@@ -173,6 +174,7 @@
return new BigdataEmbeddedFederationSparqlTest(testURI, name, queryFileURL,
resultFileURL, dataSet, laxCardinality, checkOrder) {
+ @Override
protected Properties getProperties() {
final Properties p = new Properties(super
@@ -295,7 +297,8 @@
}
- protected void tearDownBackend(IIndexManager backend) {
+ @Override
+ protected void tearDownBackend(final IIndexManager backend) {
backend.destroy();
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java 2014-06-16 11:23:44 UTC (rev 8482)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java 2014-06-16 14:17:57 UTC (rev 8483)
@@ -67,7 +67,6 @@
* a {@link Journal} without full read/write transaction support.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public class BigdataSparqlTest
//extends SPARQLQueryTest // Sesame TupleExpr based evaluation
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|