clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür <r...@apache.org>
Subject Re: ConcurrentModicationException on TDB storage provider (SingleDataset)
Date Wed, 13 Mar 2013 17:04:03 GMT
Hi Minto

Interesting problem....

What I'm wondering is what graph is ARQ (com.hp.hpl.jena.sparql.engine)
iterating over here? It might be worth checking if at
com.hp.hpl.jena.sparql.engine.iterator.QueryIterTriplePatterm does anything
which could be mapped to entering a readlock on the graph while iterating
over it.

In principle I think for non-fastalane queries (i.e. the only thing there
is now) that all the graphs against which a query is directed should be
locked. For queries with a WildCard for the graph-name (like yours) the
TcManager should be locked as a whole.

Such a query would not be suitable for the fastlane anyway. Unless all
graphs in TcManager come from the same TcProvider. But this is hardly the
case as there typical instance there are also virtual graphs.

Cheers,
Reto


On Wed, Mar 13, 2013 at 5:31 PM, Minto van der Sluis <minto@xup.nl> wrote:

> Hi Folks,
>
> I ran into an issue is both the existing SingleTdbDatasetTcProvider and
> my customized version (see CLEREZZA-736).
>
> How to reproduce:
> 1) Have some process constantly inject new named graphs (I had a process
> injecting 1000 named graphs)
> 2) perform a query while 1 is still running. I used the following query:
>
>     SELECT ?graphName WHERE {   GRAPH ?graphName {} } LIMIT 10 OFFSET 0
>
> 3) repeat step 2 a number of times (since the error does not always occur)
>
> This results in a ConcurrentModificationException (see stacktrace
> below). I am not sure whether this is a Clerezza or Jena issue.
>
> Anyone an idea what is causing this? Or more importantly how to fix it?
>
> Should I create a Jira issue for this?
>
> Regards,
>
> --
> ir. ing. Minto van der Sluis
> Software innovator / renovator
> Xup BV
>
>
> Stacktrace:
> java.util.ConcurrentModificationException: Iterator: started at 7103, now
> 7105
>         at
> com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW.java:157)
>         at
> com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.access$000(DatasetControlMRSW.java:32)
>         at
> com.hp.hpl.jena.tdb.sys.DatasetControlMRSW$IteratorCheckNotConcurrent.checkCourrentModification(DatasetControlMRSW.java:110)
>         at
> com.hp.hpl.jena.tdb.sys.DatasetControlMRSW$IteratorCheckNotConcurrent.hasNext(DatasetControlMRSW.java:118)
>         at org.openjena.atlas.iterator.Iter$4.hasNext(Iter.java:295)
>         at
> com.hp.hpl.jena.tdb.store.GraphTDBBase$ProjectQuadsToTriples.hasNext(GraphTDBBase.java:173)
>         at
> com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:76)
>         at
> org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor$1.hasNext(JenaGraphAdaptor.java:106)
>         at
> org.apache.clerezza.rdf.core.impl.AbstractTripleCollection$1.hasNext(AbstractTripleCollection.java:78)
>         at
> org.apache.clerezza.rdf.core.access.LockingIterator.hasNext(LockingIterator.java:47)
>         at
> org.apache.clerezza.rdf.jena.facade.JenaGraph$1.hasNext(JenaGraph.java:95)
>         at
> com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:76)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.hasNextBinding(QueryIterTriplePattern.java:151)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:79)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:64)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.main.iterator.QueryIterGraph$QueryIterGraphInner.hasNextBinding(QueryIterGraph.java:123)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:79)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:59)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterSlice.hasNextBinding(QueryIterSlice.java:76)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:40)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:40)
>         at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:112)
>         at
> com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:72)
>         at
> org.apache.clerezza.rdf.jena.sparql.ResultSetWrapper.<init>(ResultSetWrapper.java:39)
>         at
> org.apache.clerezza.rdf.jena.sparql.JenaSparqlEngine.execute(JenaSparqlEngine.java:68)
>         at
> org.apache.clerezza.rdf.core.access.TcManager.executeSparqlQuery(TcManager.java:272)
> ...
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message