I created https://issues.apache.org/jira/browse/JENA-252
to track this problem Simon From: Simon Helsen/Toronto/IBM@IBMCA To: [email protected] Cc: [email protected] Date: 06/08/2012 02:55 PM Subject: Re: Release 2.7.1 hi again, k, so, it is tricky to distill a test case out of our framework because this one is based on multiple threads, but I am debugging it myself instead. So, I put the breakpoint in DatasetControlMRSW.policyError where the cme is thrown. When I do that and rerun the test suite, I get into a scenario where 4 threads hang on the breakpoint. 3 of these are 'read' threads and 1 is a 'write' thread. Now, the writeCounter says it has 4 (and the readCounter is 0), which is why the cme is thrown. So, the question is why the writeCounter says 4. In order to find that out, I set a different breakpoint at startUpdate in DatasetControlMRSW. I notice that it came from a query, i.e. a READ transaction. The violating code is this: @Override protected void _begin(ReadWrite readWrite) { synchronized(lock) { if ( ! haveUsedInTransaction ) getBaseDatasetGraph().sync() ; haveUsedInTransaction = true ; DatasetGraphTxn dsgTxn = sConn.begin(readWrite) ; txn.set(dsgTxn) ; inTransaction.set(true) ; } } The bit if ( ! haveUsedInTransaction ) getBaseDatasetGraph().sync() ; is the problem. It calls prefixes.sync() which calls nodeTupleTable.sync() which calls startWrite() ; any ideas how to fix this? Simon From: Simon Helsen/Toronto/IBM@IBMCA To: [email protected] Cc: [email protected] Date: 06/08/2012 02:09 PM Subject: Re: Release 2.7.1 btw, that is the first exception I see. After that, I see different other exceptions, but I suspect they are a consequence of this one e.g. Caused by: java.lang.NullPointerException at com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction._end( DatasetGraphTransaction.java:168) at com.hp.hpl.jena.tdb.migrate.DatasetGraphTrackActive.end( DatasetGraphTrackActive.java:76) at com.hp.hpl.jena.sparql.core.DatasetImpl.end( DatasetImpl.java:159) at com.ibm.team.jfs.rdf.internal.jena.tdb.JenaTxTdbProvider.storeOperation( JenaTxTdbProvider.java:196) at com.ibm.team.jfs.rdf.internal.jena.tdb.JenaTxTdbProvider.query( JenaTxTdbProvider.java:1573) ... 39 more From: Simon Helsen/Toronto/IBM@IBMCA To: [email protected] Cc: "[email protected]" <[email protected]> Date: 06/08/2012 02:00 PM Subject: Re: Release 2.7.1 Andy, since your latest fix, I am running into another serious error I have not seen before. It is possible that the problem is on our end - I will investigate, but since I didn't touch any code, I am rather worried the issue is related to your fix for 250. I would rather have you hold off 2.7.1 and make sure things are ok. I know you need test cases etc, but let me already provide a stack trace to show the seriousness of the problem Simon 13:01:36,504 [273813586@qtp-2076933067-43] ERROR com.ibm.team.jfs - Originating Exception: java.util.ConcurrentModificationException: Reader = 0, Writer = 2 at com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.policyError( DatasetControlMRSW.java:157) at com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.policyError( DatasetControlMRSW.java:152) at com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.checkConcurrency( DatasetControlMRSW.java:81) at com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.startUpdate( DatasetControlMRSW.java:60) at com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.startWrite( NodeTupleTableConcrete.java:64) at com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.sync( NodeTupleTableConcrete.java:255) at com.hp.hpl.jena.tdb.store.DatasetPrefixesTDB.sync( DatasetPrefixesTDB.java:235) at com.hp.hpl.jena.tdb.store.DatasetGraphTDB.sync( DatasetGraphTDB.java:283) at com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction._begin( DatasetGraphTransaction.java:143) at com.hp.hpl.jena.tdb.migrate.DatasetGraphTrackActive.begin( DatasetGraphTrackActive.java:52) at com.hp.hpl.jena.sparql.core.DatasetImpl.begin( DatasetImpl.java:126) at com.ibm.team.jfs.rdf.internal.jena.tdb.JenaTxTdbProvider.storeOperation( JenaTxTdbProvider.java:183) at com.ibm.team.jfs.rdf.internal.jena.tdb.JenaTxTdbProvider.query( JenaTxTdbProvider.java:1573) at com.ibm.team.jfs.rdf.internal.jena.JenaQueryService.performQuery( JenaQueryService.java:511) at com.ibm.team.jfs.rdf.internal.jena.JenaQueryService.perform_GET( JenaQueryService.java:225) at com.ibm.team.repository.service.TeamRawService.service( TeamRawService.java:82) at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke( ExportProxyServiceRecord.java:361) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0( ExportProxyServiceRecord.java:347) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke( ExportProxyServiceRecord.java:56) at $Proxy21075.service(Unknown Source) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doRestService( AbstractTeamServerServlet.java:872) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2( AbstractTeamServerServlet.java:2054) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest( AbstractTeamServerServlet.java:1878) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.access$0( AbstractTeamServerServlet.java:1863) at com.ibm.team.repository.servlet.AbstractTeamServerServlet$1.service( AbstractTeamServerServlet.java:208) at com.ibm.team.repository.service.internal.oauth.OAuthServiceProvider$3.run( OAuthServiceProvider.java:763) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service( AbstractTeamServerServlet.java:1682) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service( ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service( ServletRegistration.java:61) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias( ProxyServlet.java:126) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service( ProxyServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle( ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle( ServletHandler.java:390) at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle( SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle( ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle( WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle( HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest( HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete( HttpConnection.java:924) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212 ) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404 ) at org.mortbay.jetty.bio.SocketConnector$Connection.run( SocketConnector.java:228) at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run( SslSocketConnector.java:680) From: Rob Vesse <[email protected]> To: "[email protected]" <[email protected]> Date: 06/08/2012 01:04 PM Subject: Re: Release 2.7.1 Thanks for pushing forward on this Andy, I wish I had more time to do stuff on Jena at the moment as there's bits and pieces that I'd like to work on (e.g. Streaming parsing on SPARQL JSON, war-ifying Fuseki etc) that I don't have the cycles for right now Thanks for all the work Rob On 6/8/12 9:54 AM, "Andy Seaborne" <[email protected]> wrote: >With the (hopeful) resolution of JENA-250, I have rebuilt the >pre-release binaries: > >http://people.apache.org/~andy/Jena-2.7.1/ > >apache-jena-2.7.1-SNAPSHOT.zip >jena-2.7.1-SNAPSHOT-source-release.zip >jena-fuseki-0.2.2-SNAPSHOT-distribution.zip > >At this point, I have one oddity I noticed in TDB I want to investigate >- this is probably nothing more than me not remembering how the >transactional node table actually works. > >Other than that I will do the formal build and call the vote. Even if >something in TDB is not optimal, I am very unlikely to change anything >at this stage. It is better to go with deployment-tested code than with >an "improvement" then test out changes and issue an incremental release >quite soon. > > Andy
