orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.76k stars 872 forks source link

ODirectMemoryViolationException #6417

Closed kerner1000 closed 8 years ago

kerner1000 commented 8 years ago

Expected behavior and actual behavior

Steps to reproduce the problem

Important Questions

Runninng Mode

Sys errors and stack trace:

Jul 13, 2016 7:02:02 PM com.orientechnologies.common.log.OLogManager log
INFO: OrientDB auto-config DISKCACHE=4,550MB (heap=910MB os=7,509MB disk=12,200MB)
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
SEVERE: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Cannot restore 0 WAL master record for storage $home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3 crc check is failed
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Storage '$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3' was not closed properly. Will try to recover from write ahead log
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Looking for last checkpoint...
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} FULL checkpoint found.
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Data restore procedure from full checkpoint is started. Restore is performed from LSN OLogSequenceNumber{segment=0, position=2597}
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=2621}} will be skipped during data restore.
Jul 13, 2016 7:02:03 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Non tx operation was used during data modification we will need index rebuild.

[..]

INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Storage data recover was completed
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Wait till indexes restore after crash was finished.
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Start creation of index OUser.name
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Index OUser.name was successfully created and rebuild is going to be started.
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} - Rebuilding index $home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3.OUser.name (estimated 3 items)...
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} --> OK, indexed 3 items in 84 ms
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Rebuild of OUser.name index was successfully finished.
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Start creation of index ORole.name
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Index ORole.name was successfully created and rebuild is going to be started.
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} - Rebuilding index $home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3.ORole.name (estimated 3 items)...
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} --> OK, indexed 3 items in 9 ms
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Rebuild of ORole.name index was successfully finished.
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Index dictionary is not automatic index and will be added as is.
Jul 13, 2016 7:03:04 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Index dictionary was added in DB index list.
Jul 13, 2016 7:03:06 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} 3 indexes were restored successfully, 0 errors
Jul 13, 2016 7:03:06 PM com.orientechnologies.common.log.OLogManager log
INFO: {db=$home$alex$.openchrom$1.1.x$net.openchrom.chromatogram.xxd.identifier.supplier.chromident$HuR3} Indexes restore after crash was finished.
Caused by: com.orientechnologies.common.directmemory.ODirectMemoryViolationException: Last position of provided data interval [1279618461] is more than size of allocated area [65552]
    at com.orientechnologies.common.directmemory.OUntrackedDirectMemoryPointer.rangeCheck(OUntrackedDirectMemoryPointer.java:240)
    at com.orientechnologies.common.directmemory.OUntrackedDirectMemoryPointer.get(OUntrackedDirectMemoryPointer.java:83)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage.getBinaryValue(ODurablePage.java:113)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OClusterPage.getRecordBinaryValue(OClusterPage.java:395)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.readFullEntry(OPaginatedCluster.java:1341)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.readRecord(OPaginatedCluster.java:516)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doReadRecord(OAbstractPaginatedStorage.java:2076)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.readRecord(OAbstractPaginatedStorage.java:1804)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.readRecord(OAbstractPaginatedStorage.java:782)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx$SimpleRecordReader.readRecord(ODatabaseDocumentTx.java:3092)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeReadRecord(ODatabaseDocumentTx.java:1820)
    ... 10 more
lvca commented 8 years ago

Please provide this JVM setting at start: -XX:MaxDirectMemorySize=512g. For more information about upgrade, look at: http://orientdb.com/docs/2.2/Release-2.2.0.html

kerner1000 commented 8 years ago

Its version 2.1.16, not 2.2.x.

andrii0lomakin commented 8 years ago

Hi @kerner1000 , in 2.1.x version before 2.1.14 release, there will be the probability of data corruption during data commit. So my first question which version of the database was used to create this database?

kerner1000 commented 8 years ago

Hi @Laa, thanks again for taking care! I cannot tell you exactly, I think it was version 2.1.9, also a slight chance that it was 2.1.16 already.

andrii0lomakin commented 8 years ago

Hi @kerner1000 , well that is no surprise that you got this exception. Could you do following export database in json and then import back form json. If issue still persist please reopen this ticket.

kerner1000 commented 8 years ago

It was only a test-database, I already re-created it. Thanks a lot!