Users of an application that I work on are reporting this particular exception with neo4j 2.1.1. This appears to be sporadic and difficult to reproduce. Is this a known issue, or is it associated with any particular misuse or error? I would love to provide more information on how to reproduce this, but I cannot.
The code that creates this stacktrace is really dead simple:
Node n = null;
try (Transaction tx = db.beginTx()) {
n = db.createNode();
// Lots of extra code snipped here because it never makes it that far...
}
The exception seems to be thrown on the createNode() method:
SEVERE: Servlet.service() for servlet [Jersey REST Service] in context with path [/plus] threw exception
org.neo4j.kernel.impl.persistence.ResourceAcquisitionFailedException: TM encountered an unexpected error condition.
at org.neo4j.kernel.impl.persistence.PersistenceManager$ResourceHolder.enlist(PersistenceManager.java:412)
at org.neo4j.kernel.impl.persistence.PersistenceManager$ResourceHolder.forWriting(PersistenceManager.java:394)
at org.neo4j.kernel.impl.api.KernelTransactionImplementation.ensureWriteTransaction(KernelTransactionImplementation.java:190)
at org.neo4j.kernel.impl.api.KernelTransactionImplementation.upgradeToDataTransaction(KernelTransactionImplementation.java:220)
at org.neo4j.kernel.impl.api.KernelStatement.dataWriteOperations(KernelStatement.java:83)
at org.neo4j.kernel.InternalAbstractGraphDatabase.createNode(InternalAbstractGraphDatabase.java:1107)
at org.mitre.provenance.db.neo4j.Neo4JStorage.store(Neo4JStorage.java:1101)
(big stack of servlet related exceptions snipped out here that)
At the bottom, there is this:
Caused by: javax.transaction.RollbackException: Tx status is: STATUS_MARKED_ROLLBACK
at org.neo4j.kernel.impl.transaction.TransactionImpl.enlistResource(TransactionImpl.java:191)
at org.neo4j.kernel.impl.persistence.PersistenceManager$ResourceHolder.enlist(PersistenceManager.java:405)
... 45 more
A lot of fixes have been applied since 2.1.1, so make sure to run on the latest stable version (2.1.4 as of today). If the problem persists on 2.1.4, consider filing a github issue at https://github.com/neo4j/neo4j/issues/new
Related
some other team is calling our FileNet custom app for searching documents. I believe some of the users are facing intermittent failure because we are getting tickets(although none of the user has reported this issue) for the error below and I tried validating our service with different scenarios and they all worked but I don't know what's causing this error. any suggestions/help would be greatly appreciated.
<stackTrace>
at com.filenet.apiimpl.transport.ejb.EJBSession.throwException(EJBSession.java:1122)
at com.filenet.apiimpl.transport.ejb.EJBSession.throwException(EJBSession.java:1045)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl._getObjects(EJBSession.java:650)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl.getObjects(EJBSession.java:575)
at com.filenet.apiimpl.transport.ejb.EJBSession.getObjects(EJBSession.java:471)
at com.filenet.apiimpl.util.SessionHandle.getObjects(SessionHandle.java:346)
at com.filenet.apiimpl.core.Session.callGetObjects(Session.java:132)
at com.filenet.apiimpl.core.Session.executeGetObject(Session.java:340)
at com.filenet.apiimpl.core.Session.getObject(Session.java:354)
at com.filenet.apiimpl.core.DispatchEntries.FetchObject_28(DispatchEntries.java:907)
at com.filenet.apiimpl.core.ObjectStoreImpl.fetchObject(ObjectStoreImpl.java:1643)
at com.filenet.api.core.Factory$ClassDescription.fetchInstance(Factory.java:21761)
at ecm.service.p8ceservices.implementation.integration.SearchP8ObjectAdapter.retrievePropertyDefinitions(SearchP8ObjectAdapter.java:352)
at ecm.service.p8ceservices.implementation.integration.SearchP8ObjectAdapter.integrate(SearchP8ObjectAdapter.java:158)
at ecm.service.p8ceservices.implementation.integration.ContentEngineAdapter.execute(ContentEngineAdapter.java:37)
</stackTrace>
</exception><exception name="java.lang.IndexOutOfBoundsException" message="Data to be copied (length 2124) exceeds space available (480)" sequence="0" guid="sfr2mx3l:jewe2wkf:00000000:00000121"><source class="com.ibm.rmi.util.buffer.SimpleByteBuffer" archive="" vendor="" version="" /><stackTrace>
at com.ibm.rmi.util.buffer.SimpleByteBuffer.write(SimpleByteBuffer.java:166) at com.ibm.rmi.iiop.ClientRequestImpl.reInvoke(ClientRequestImpl.java:489)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:637) at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1377)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:695) at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1407)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:484) at com.filenet.apiimpl.transport.ejbstubs._Engine_Stub.getObjects(Unknown Source)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl._getObjects(EJBSession.java:638)</stackTrace>
It could be the following issue:
ClientRequestImpl.reInvoke retry requests which failed due to errors.
The retry itself fails with IndexOutOfBoundsException because ORB is using fixed length SimpleByteBuffer.
See also this IBM Fix
Since I've decided to switch to server-side rendering from client-side react, I began to create my components and use them in the app.
However I came across this error:
Unknown error (RangeError); potential stack overflow detected
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.ClearScript.ScriptEngineException: Unknown error (RangeError); potential stack overflow detected
And this is a part from the stack-trace
[ScriptEngineException: Unknown error (RangeError); potential stack overflow detected]
V8Exception.ThrowScriptEngineException(V8Exception* ) +169
Microsoft.ClearScript.V8.V8ContextProxyImpl.Execute(String gcDocumentName, String gcCode, Boolean evaluate, Boolean discard) +462
Microsoft.ClearScript.V8.<>c__DisplayClass1b.<Execute>b__19() +197
Microsoft.ClearScript.ScriptEngine.ScriptInvoke(Func`1 func) +70
Microsoft.ClearScript.V8.V8ScriptEngine.BaseScriptInvoke(Func`1 func) +49
Microsoft.ClearScript.V8.<>c__DisplayClass25`1.<ScriptInvoke>b__24() +45
Microsoft.ClearScript.V8.?A0x792c8756.LockCallback(Void* pvArg) +9
Microsoft.ClearScript.V8.V8ContextProxyImpl.InvokeWithLock(Action gcAction) +176
Microsoft.ClearScript.V8.V8ScriptEngine.ScriptInvoke(Func`1 func) +118
Microsoft.ClearScript.V8.V8ScriptEngine.Execute(String documentName, String code, Boolean evaluate, Boolean discard) +118
JavaScriptEngineSwitcher.V8.V8JsEngine.InnerEvaluate(String expression) +89
So I don't know what causes this error but I think it is some code that goes in a loop or something similar. Furthermore if I refresh the page this error goes away and if I continue to refresh intensively it shows up again which is very frustrating.
I was getting the same error (web app in azure) and after some investigation and tests, setting SetAllowMsieEngine to true did in fact fixed the issue also to me.
As Luke McGregor said, this seems to be an issue with V8ScriptEngine and using SetAllowMsieEngine does the job, however this method is latest version of react.net is deprecated and is recommended to "managed in the JavaScriptEngineSwitcher configuration".
So the solution I found so far is to switch js engine switcher by setting it directly in code:
JsEngineSwitcher engineSwitcher = JsEngineSwitcher.Instance;
engineSwitcher.EngineFactories
.AddChakraCore()
.AddMsie( new MsieSettings() { EngineMode = JsEngineMode.Auto } );
engineSwitcher.DefaultEngineName = ChakraCoreJsEngine.EngineName;
Like this I'm using ChakraCore engine rather than default V8 which was causing the error.
So far, during our performance tests with around 250 concurrent requests, we do not have this error anymore when previously in the same conditions for sure this error would have occurred.
This is a known issue, see https://github.com/reactjs/React.NET/issues/190
The work around is to not use V8 to do the render ie:
app.UseReact(config =>
{
config
// ..other configuration settings
.SetAllowMsieEngine(true);
});
This is happening in neo4j version 2.3.0-M02
Why might this code ....
Iterable<Relationship> rels = node.getRelationships( ... any various args ... );
for (Relationship rel : rels) {
// Some computation
}
... cause this stack trace ?
Caused by: java.lang.IndexOutOfBoundsException
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.setOffset(MuninnPageCursor.java:410)
at org.neo4j.kernel.impl.store.RelationshipGroupStore.getRecord(RelationshipGroupStore.java:117)
at org.neo4j.kernel.impl.store.RelationshipGroupStore.getRecord(RelationshipGroupStore.java:77)
at org.neo4j.kernel.impl.api.StoreRelationshipIterable$DenseIterator.<init>(StoreRelationshipIterable.java:214)
at org.neo4j.kernel.impl.api.StoreRelationshipIterable.iterator(StoreRelationshipIterable.java:96)
at org.neo4j.kernel.impl.api.StoreRelationshipIterable.iterator(StoreRelationshipIterable.java:76)
at org.neo4j.kernel.impl.api.store.DiskLayer.nodeListRelationships(DiskLayer.java:241)
at org.neo4j.kernel.impl.api.store.CacheLayer.nodeListRelationships(CacheLayer.java:424)
at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeGetRelationships(StateHandlingStatementOperations.java:925)
at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeGetRelationships(StateHandlingStatementOperations.java:933)
at org.neo4j.kernel.impl.api.ConstraintEnforcingEntityOperations.nodeGetRelationships(ConstraintEnforcingEntityOperations.java:426)
at org.neo4j.kernel.impl.api.OperationsFacade.nodeGetRelationships(OperationsFacade.java:361)
at org.neo4j.kernel.impl.core.NodeProxy$2.iterator(NodeProxy.java:194)
at org.neo4j.kernel.impl.core.NodeProxy$2.iterator(NodeProxy.java:186)
Update:
Issue #5691 on Github
Same bug again in version 2.3.0
You should upgrade to Neo4j 2.3.0-M03.
Milestone releases tend to be unstable and you are using old one. It is known that M02 has bugs, and lot of them are fixed in M03.
So, upgrade and check if this works for you.
I've noticed that calling hh_client is not always returning correct result. For example: I have following pieces of code:
backend\ConvertMessage.hh:
<?hh // strict
namespace ApiBackend\ConvertMessage {
enum Status: int {
success = 0;
// ... error codes
};
// ... some other classes
};
other place in project:
throw new \SoapFault(
'Server',
\ApiBackend\ConvertMessage\Status::getNames()[$result->status]
);
Sometimes, after doing some changes in project I get following error message: Could not find static method getNames in type ApiBackend\ConvertMessage\Status (Typing[4090])
When I remove a semicolon after one of closing curly brackets, hh_client stops displaying error. But when I insert semicolon back on its place, typechecker still gives me No errors! message.
This is not the only file that causes this problem - it happens to all enums.
It seems to me that it is problem with some cache of either hh_client or hh_server.
Thanks in advance for helping me with solving this problem (and sorry if my english is not too good).
You are probably using an outdated version of HHVM. This problem sounds an awful lot like this race condition, which was fixed in HHVM 3.5.0 and newer (and was backported into the 3.3.3 LTS release). Notably, 3.4.x still had the bug.
What version of HHVM are you using?
I have a working solution that is using Neo4jClient 1.0.0.646 with no problem. When I install the nuget package for the latest 1.0.0.651 I receive a NullReferenceException on every attempt to return query results. Given the stack trace details below can someone diagnose the issue for me? I am on Json.NET 5.0.6 if that is relevant. I see the REST calls going out and coming back with the correct data so the Cypher is good.
System.NullReferenceException was unhandled by user code
HResult=-2147467261 Message=Object reference not set to an instance
of an object. Source=Neo4jClient StackTrace:
at Neo4jClient.Cypher.CypherQuery.b__0(String
current, String paramName) in
c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\Cypher\CypherQuery.cs:line
46
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1
source, TAccumulate seed, Func3 func)
at Neo4jClient.Cypher.CypherQuery.get_DebugQueryText() in c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\Cypher\CypherQuery.cs:line
43
at Neo4jClient.GraphClient.<>c__DisplayClass1e1.<Neo4jClient.IRawGraphClient.ExecuteGetCypherResultsAsync>b__1d(Task1
responseTask) in
c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\GraphClient.cs:line
825
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute() InnerException:
You haven't provided enough of the exception detail for me to identify exactly where this is occurring.
Please include the full text of the exception in a new issue at https://github.com/readify/Neo4jClient/issues/new
Here are all the changes since 1.0.0.646, if you want to take a peek for anything related to what you're doing: https://github.com/Readify/Neo4jClient/compare/v1.0.0.646...master