orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

ODirectMemoryViolationException

Open andrii0lomakin opened this issue 12 years ago • 5 comments

We got this error from our application. Did anybody see this before? What does this exception mean? Looks like we can't write anything to the db now. We are using 1.7.9 plocal connection pool in our application. The OS is CentOS.

com.orientechnologies.orient.core.exception.OStorageException: Error on creating record in cluster: com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster@12c7298c at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.createRecord(OLocalPaginatedStorage.java:690) at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(ODatabaseRaw.java:271) at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:1136) at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:84) at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:322) at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:40) at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:335) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1439) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1428) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1417) at org.ndexbio.common.persistence.orientdb.PersistenceService.createNdexPropertyVertex(PersistenceService.java:114) at org.ndexbio.common.persistence.orientdb.NdexPersistenceService.addPropertyToVertex(NdexPersistenceService.java:289) at org.ndexbio.common.persistence.orientdb.NdexPersistenceService.setElementProperty(NdexPersistenceService.java:1037) at org.ndexbio.xbel.splitter.AnnotationDefinitionGroupSplitter.process(AnnotationDefinitionGroupSplitter.java:89) at org.ndexbio.xbel.splitter.XBelSplitter.endElement(XBelSplitter.java:146) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.ndexbio.task.parsingengines.XbelParser.processAnnotationDefinitions(XbelParser.java:169) at org.ndexbio.task.parsingengines.XbelParser.parseFile(XbelParser.java:95) at org.ndexbio.task.FileUploadTask.processFile(FileUploadTask.java:104) at org.ndexbio.task.FileUploadTask.call(FileUploadTask.java:47) at org.ndexbio.task.FileUploadTask.call(FileUploadTask.java:22) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 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: com.orientechnologies.orient.core.exception.OStorageException at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.createRecord(OPaginatedCluster.java:456) at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.createRecord(OLocalPaginatedStorage.java:673) ... 34 more Caused by: com.orientechnologies.common.directmemory.ODirectMemoryViolationException: Provided offset [90448] is more than size of allocated area [65552] at com.orientechnologies.common.directmemory.ODirectMemoryPointer.rangeCheck(ODirectMemoryPointer.java:163) at com.orientechnologies.common.directmemory.ODirectMemoryPointer.getInt(ODirectMemoryPointer.java:78) at com.orientechnologies.common.serialization.types.OIntegerSerializer.deserializeFromDirectMemory(OIntegerSerializer.java:87) at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage.getIntValue(ODurablePage.java:97) at com.orientechnologies.orient.core.storage.impl.local.paginated.OClusterPage.appendRecord(OClusterPage.java:99) at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.addEntry(OPaginatedCluster.java:1049) at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.createRecord(OPaginatedCluster.java:445) ... 35 more

andrii0lomakin avatar Oct 14 '14 05:10 andrii0lomakin

So, is this closed?

pires avatar Nov 03 '14 14:11 pires

No, it is not yet.

andrii0lomakin avatar Nov 03 '14 19:11 andrii0lomakin

Hi, a user of ours reported a similar issue. Please look at https://github.com/baasbox/baasbox/issues/294#issuecomment-63853394 There you can find some benchmarks and tests. OrientDB version is 1.7.9

In our code we just open a connection, in this case, in this way:

ODatabaseDocumentTx conn = new ODatabaseDocumentTx("plocal:" + BBConfiguration.getDBDir());
conn.open(username,password);

giastfader avatar Nov 20 '14 20:11 giastfader

Hi, It means that it is already fixed in 2.0 . We check RAM limits now and do not go out of them. About wal size it can be controlled by storage.wal.maxSize parameter (size in megabytes) but of course never delete them manually.

andrii0lomakin avatar Nov 20 '14 21:11 andrii0lomakin

So I am closing issue now. Please reopen it if will be reporduced. Buy you need version above M3 to be sure. Sorry for that.

andrii0lomakin avatar Nov 20 '14 21:11 andrii0lomakin