[Neo4j] Fatty Stack Trace to Lift your Spirits

Mattias Persson mattias at neotechnology.com
Thu Dec 23 09:30:57 CET 2010


The HA test suite had the same problems... it turned out someone, somewhere
forgot to call shutdown on the database (me). After that was fixed those
errors ain't showin' up anymore.

And, yes, it's related to my latest changes, which only closes lucene
writers on shutdown as opposed to each commit, so make sure you don't leave
some dbs hanging, dude. If your code is correct and you still have problems
I'd have to dig into your code presumably.

2010/12/22 Peter Neubauer <peter.neubauer at neotechnology.com>

> Mattias,
> could this be related to the Index locking optimizations you have been
> doing?
>
> Cheers,
>
> /peter neubauer
>
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
>
> http://www.neo4j.org               - Your high performance graph database.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Wed, Dec 22, 2010 at 5:11 PM, Marko Rodriguez <okrammarko at gmail.com>
> wrote:
> > Hi Neo4jians,
> >
> > So I bumped Blueprints 0 .4-SNAPSHOT to use 1.2M06 and during the test
> suite evaluation, I was getting fatty stack traces being thrown all up in my
> face left, right, and yes, center.
> >
> > My random thought on the matter---Luca and I have been having
> *potentially* similar problems with OrientDB and shutting down, opening, and
> deleting the DB really fast. Don't know if this is the same issue now
> showing up in Neo4j? The TestSuite will, in general, create a graph
> (directory), use it, close it, open it, delete the directory, create a new
> graph (directory), etc. Is the OS not having happy good time? Why happy good
> time with 1.2M05?
> >
> > Solve my problem or be destroyed,
> > Marko.
> >
> > ------------------------------------------------------------
> >
> > Testing testClear...
> > ->
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)java.lang.RuntimeException:
> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out:
> NativeFSLock@
> /private/tmp/blueprints_test/index/lucene/relationship/edges/write.lock
> >        at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:581)
> >        at
> org.neo4j.index.impl.lucene.CommitContext.ensureWriterInstantiated(CommitContext.java:60)
> >        at
> org.neo4j.index.impl.lucene.LuceneCommand$AddRelationshipCommand.perform(LuceneCommand.java:211)
> >        at
> org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:231)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:319)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.commit(XaResourceManager.java:447)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.commit(XaResourceHelpImpl.java:65)
> >        at
> org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:517)
> >        at
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:623)
> >        at
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:586)
> >        at
> org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:105)
> >        at
> org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:86)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.autoStopTransaction(Neo4jGraph.java:331)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.addEdge(Neo4jGraph.java:216)
> >        at
> com.tinkerpop.blueprints.pgm.GraphTestSuite.testClear(GraphTestSuite.java:48)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.doTestSuite(Neo4jGraphTest.java:94)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.testGraphTestSuite(Neo4jGraphTest.java:43)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at junit.framework.TestCase.runTest(TestCase.java:168)
> >        at junit.framework.TestCase.runBare(TestCase.java:134)
> >        at junit.framework.TestResult$1.protect(TestResult.java:110)
> >        at junit.framework.TestResult.runProtected(TestResult.java:128)
> >        at junit.framework.TestResult.run(TestResult.java:113)
> >        at junit.framework.TestCase.run(TestCase.java:124)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >        at junit.framework.TestSuite.run(TestSuite.java:227)
> >        at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
> >        at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> >        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> >        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
> > Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain
> timed out: NativeFSLock@
> /private/tmp/blueprints_test/index/lucene/relationship/edges/write.lock
> >        at org.apache.lucene.store.Lock.obtain(Lock.java:84)
> >        at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1045)
> >        at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1022)
> >        at
> org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:891)
> >        at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:564)
> >        ... 43 more
> > javax.transaction.xa.XAException: Unknown
> xid[GlobalId[NEOKERNL|4823349069760941957|14491], BranchId[ 52 49 52 49 52
> 49 ]]
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.rollback(XaResourceManager.java:471)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.rollback(XaResourceHelpImpl.java:112)
> >        at
> org.neo4j.kernel.impl.transaction.TransactionImpl.doRollback(TransactionImpl.java:534)
> >        at
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:650)
> >        at
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:586)
> >        at
> org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:105)
> >        at
> org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:86)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.autoStopTransaction(Neo4jGraph.java:331)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.addEdge(Neo4jGraph.java:216)
> >        at
> com.tinkerpop.blueprints.pgm.GraphTestSuite.testClear(GraphTestSuite.java:48)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.doTestSuite(Neo4jGraphTest.java:94)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.testGraphTestSuite(Neo4jGraphTest.java:43)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at junit.framework.TestCase.runTest(TestCase.java:168)
> >        at junit.framework.TestCase.runBare(TestCase.java:134)
> >        at junit.framework.TestResult$1.protect(TestResult.java:110)
> >        at junit.framework.TestResult.runProtected(TestResult.java:128)
> >        at junit.framework.TestResult.run(TestResult.java:113)
> >        at junit.framework.TestCase.run(TestCase.java:124)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >        at junit.framework.TestSuite.run(TestSuite.java:227)
> >        at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
> >        at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> >        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> >        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
> > Unable to rollback transaction. Some resources may be commited others
> not. Neo4j kernel should be SHUTDOWN for resource maintance and transaction
> recovery ---->java.lang.RuntimeException:
> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out:
> NativeFSLock@
> /private/tmp/blueprints_test/index/lucene/relationship/edges/write.lock
> >        at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:581)
> >        at
> org.neo4j.index.impl.lucene.CommitContext.ensureWriterInstantiated(CommitContext.java:60)
> >        at
> org.neo4j.index.impl.lucene.LuceneCommand$AddRelationshipCommand.perform(LuceneCommand.java:211)
> >        at
> org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:231)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:319)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.commit(XaResourceManager.java:447)
> >        at
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.commit(XaResourceHelpImpl.java:65)
> >        at
> org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:517)
> >        at
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:623)
> >        at
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:586)
> >        at
> org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:105)
> >        at
> org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:86)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.autoStopTransaction(Neo4jGraph.java:331)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.addEdge(Neo4jGraph.java:216)
> >        at
> com.tinkerpop.blueprints.pgm.GraphTestSuite.testClear(GraphTestSuite.java:48)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.doTestSuite(Neo4jGraphTest.java:94)
> >        at
> com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.testGraphTestSuite(Neo4jGraphTest.java:43)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at junit.framework.TestCase.runTest(TestCase.java:168)
> >        at junit.framework.TestCase.runBare(TestCase.java:134)
> >        at junit.framework.TestResult$1.protect(TestResult.java:110)
> >        at junit.framework.TestResult.runProtected(TestResult.java:128)
> >        at junit.framework.TestResult.run(TestResult.java:113)
> >        at junit.framework.TestCase.run(TestCase.java:124)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >        at junit.framework.TestSuite.run(TestSuite.java:227)
> >        at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
> >        at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> >        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> >        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
> > Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain
> timed out: NativeFSLock@
> /private/tmp/blueprints_test/index/lucene/relationship/edges/write.lock
> >        at org.apache.lucene.store.Lock.obtain(Lock.java:84)
> >        at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1045)
> >        at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1022)
> >        at
> org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:891)
> >        at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:564)
> >        ... 43 more
> >
> > _______________________________________________
> > Neo4j mailing list
> > User at lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> _______________________________________________
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [mattias at neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com


More information about the User mailing list