orientechnologies / orientechnologies/orientdb

Getting NullPointerException on database startup (at com.orientechnologies.orient.core.storage.cache.chm.AsyncReadCache.releaseFromRead)

Open
#9,367 10 comments 0 reactions 1 assignee View on GitHub

@andrii0lomakin is already working on this.

Since Aug 13, 2020.

waiting reply
Dominant language
Java
Stars
5k
Forks
868
Avg merge
15h 6m
Merged PRs (30d)
18

Description

OrientDB Version: 3.0.31
Java Version:
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
OS:
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian

Expected behavior

No exceptions on startup.

Actual behavior

         ,,.     `,                                              VELOCE  
       ``        `.                                                          
                 ``                                       www.orientdb.com
                 `                                    
2020-08-07 14:59:26:321 INFO  Detected limit of amount of simultaneously open files is 1048576,  limit of open files for disk cache will be set to 523776 [ONative]
2020-08-07 14:59:26:332 INFO  Loading configuration from: /orientdb/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2020-08-07 14:59:26:486 INFO  OrientDB Server v3.0.31 - Veloce (build 2a8412458048d53cd1e1a3544d19b87c190c2d73, branch UNKNOWN) is starting up... [OServer]
2020-08-07 14:59:26:531 INFO  67557953536 B/64428 MB/62 GB of physical memory were detected on machine [ONative]
2020-08-07 14:59:26:532 INFO  Soft memory limit for this process is set to -1 B/-1 MB/-1 GB [ONative]
2020-08-07 14:59:26:532 INFO  Hard memory limit for this process is set to -1 B/-1 MB/-1 GB [ONative]
2020-08-07 14:59:26:533 INFO  Path to 'memory' cgroup is '/kubepods/burstable/pod381302ef-d709-11ea-9320-525400a3535a/d8d499430f21742087c284f2ee53229e346b4baac671b4b44099b5ad521cb32d' [ONative]
2020-08-07 14:59:26:535 INFO  Mounting path for memory cgroup controller is '/sys/fs/cgroup/memory' [ONative]
2020-08-07 14:59:26:535 INFO  Can not find '/sys/fs/cgroup/memory/kubepods/burstable/pod381302ef-d709-11ea-9320-525400a3535a/d8d499430f21742087c284f2ee53229e346b4baac671b4b44099b5ad521cb32d' path for memory cgroup, it is supposed that process is running in container, will try to read root '/sys/fs/cgroup/memory' memory cgroup data [ONative]
2020-08-07 14:59:26:535 INFO  cgroup soft memory limit is 9223372036854771712 B/8796093022207 MB/8589934591 GB [ONative]
2020-08-07 14:59:26:536 INFO  cgroup hard memory limit is 524288000 B/500 MB/0 GB [ONative]
2020-08-07 14:59:26:536 INFO  Detected memory limit for current process is 524288000 B/500 MB/0 GB [ONative]
2020-08-07 14:59:26:537 INFO  JVM can use maximum 371MB of heap memory [OMemoryAndLocalPaginatedEnginesInitializer]
2020-08-07 14:59:26:537 INFO  Because OrientDB is running inside a container 12% of memory will be left unallocated according to the setting 'memory.leftToContainer' not taking into account heap memory [OMemoryAndLocalPaginatedEnginesInitializer]
2020-08-07 14:59:26:539 INFO  OrientDB auto-config DISKCACHE=68MB (heap=371MB os=500MB) [orientechnologies]
2020-08-07 14:59:26:543 INFO  System is started under an effective user : `root` [OEngineLocalPaginated]
2020-08-07 14:59:26:544 INFO  Allocation of 1033 pages. [OEngineLocalPaginated]
2020-08-07 14:59:26:643 INFO  WAL maximum segment size is set to 190,617 MB [OrientDBDistributed]
2020-08-07 14:59:26:644 INFO  Databases directory: /orientdb/databases [OServer]
2020-08-07 14:59:26:710 INFO  Page size for WAL located in /orientdb/databases/OSystem is set to 4096 bytes. [OCASDiskWriteAheadLog]
2020-08-07 14:59:27:020 INFO  Storage 'plocal:/orientdb/databases/OSystem' is opened under OrientDB distribution : 3.0.31 - Veloce (build 2a8412458048d53cd1e1a3544d19b87c190c2d73, branch UNKNOWN) [OLocalPaginatedStorage]Exception `558633DB` in storage `plocal:/orientdb/databases/OSystem`: 3.0.31 - Veloce (build 2a8412458048d53cd1e1a3544d19b87c190c2d73, branch UNKNOWN)
java.lang.NullPointerException
	at com.orientechnologies.orient.core.storage.cache.chm.AsyncReadCache.releaseFromRead(AsyncReadCache.java:226)
	at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.releasePageFromRead(ODurableComponent.java:167)
	at com.orientechnologies.orient.core.storage.cluster.v1.OClusterPositionMapV1.getFirstPosition(OClusterPositionMapV1.java:511)
	at com.orientechnologies.orient.core.storage.cluster.v1.OPaginatedClusterV1.getFirstPosition(OPaginatedClusterV1.java:1231)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getClusterDataRange(OAbstractPaginatedStorage.java:1349)
	at com.orientechnologies.orient.core.iterator.ORecordIteratorCluster.<init>(ORecordIteratorCluster.java:62)
	at com.orientechnologies.orient.core.iterator.ORecordIteratorCluster.<init>(ORecordIteratorCluster.java:44)
	at com.orientechnologies.orient.core.sql.executor.FetchFromClusterExecutionStep.syncPull(FetchFromClusterExecutionStep.java:53)
	at com.orientechnologies.orient.core.sql.executor.FetchFromClassExecutionStep$1.hasNext(FetchFromClassExecutionStep.java:128)
	at com.orientechnologies.orient.core.sql.executor.OrderByStep.init(OrderByStep.java:101)
	at com.orientechnologies.orient.core.sql.executor.OrderByStep.lambda$syncPull$0(OrderByStep.java:40)
	at java.util.Optional.ifPresent(Optional.java:159)
	at com.orientechnologies.orient.core.sql.executor.OrderByStep.syncPull(OrderByStep.java:40)
	at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:37)
	at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.fetchNext(OLocalResultSet.java:39)
	at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.<init>(OLocalResultSet.java:30)
	at com.orientechnologies.orient.core.sql.parser.OSelectStatement.execute(OSelectStatement.java:276)
	at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:79)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.query(ODatabaseDocumentEmbedded.java:538)
	at com.orientechnologies.orient.core.metadata.function.OFunctionLibraryImpl.load(OFunctionLibraryImpl.java:83)
	at com.orientechnologies.orient.core.db.OSharedContextEmbedded.load(OSharedContextEmbedded.java:69)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.loadMetadata(ODatabaseDocumentEmbedded.java:291)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.init(ODatabaseDocumentEmbedded.java:161)
	at com.orientechnologies.orient.core.db.OrientDBEmbedded.openNoAuthorization(OrientDBEmbedded.java:262)
	at com.orientechnologies.orient.core.db.OrientDBEmbedded.openNoAuthorization(OrientDBEmbedded.java:56)
	at com.orientechnologies.orient.server.OSystemDatabase.openSystemDatabase(OSystemDatabase.java:97)
	at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1212)
	at com.orientechnologies.orient.server.OServer.activate(OServer.java:421)
	at com.orientechnologies.orient.server.OServerMain$1.run(OServerMain.java:48)
2020-08-07 14:59:27:222 INFO  - shutdown storage: OSystem... [OrientDBDistributed]Error during server execution
com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database 'OSystem'
	at com.orientechnologies.orient.core.db.OrientDBEmbedded.openNoAuthorization(OrientDBEmbedded.java:268)
	at com.orientechnologies.orient.core.db.OrientDBEmbedded.openNoAuthorization(OrientDBEmbedded.java:56)
	at com.orientechnologies.orient.server.OSystemDatabase.openSystemDatabase(OSystemDatabase.java:97)
	at com.orientechnologies.orient.server.OSystemDatabase.checkServerId(OSystemDatabase.java:174)
	at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:162)
	at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:49)
	at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1212)
	at com.orientechnologies.orient.server.OServer.activate(OServer.java:421)
	at com.orientechnologies.orient.server.OServerMain$1.run(OServerMain.java:48)
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database url=plocal:/orientdb/databases/OSystem
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.init(ODatabaseDocumentEmbedded.java:175)
	at com.orientechnologies.orient.core.db.OrientDBEmbedded.openNoAuthorization(OrientDBEmbedded.java:262)
	... 8 more
Caused by: java.lang.NullPointerException
	at com.orientechnologies.orient.core.storage.cache.chm.AsyncReadCache.releaseFromRead(AsyncReadCache.java:226)
	at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.releasePageFromRead(ODurableComponent.java:167)
	at com.orientechnologies.orient.core.storage.cluster.v1.OClusterPositionMapV1.getFirstPosition(OClusterPositionMapV1.java:511)
	at com.orientechnologies.orient.core.storage.cluster.v1.OPaginatedClusterV1.getFirstPosition(OPaginatedClusterV1.java:1231)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getClusterDataRange(OAbstractPaginatedStorage.java:1349)
	at com.orientechnologies.orient.core.iterator.ORecordIteratorCluster.<init>(ORecordIteratorCluster.java:62)
	at com.orientechnologies.orient.core.iterator.ORecordIteratorCluster.<init>(ORecordIteratorCluster.java:44)
	at com.orientechnologies.orient.core.sql.executor.FetchFromClusterExecutionStep.syncPull(FetchFromClusterExecutionStep.java:53)
	at com.orientechnologies.orient.core.sql.executor.FetchFromClassExecutionStep$1.hasNext(FetchFromClassExecutionStep.java:128)
	at com.orientechnologies.orient.core.sql.executor.OrderByStep.init(OrderByStep.java:101)
	at com.orientechnologies.orient.core.sql.executor.OrderByStep.lambda$syncPull$0(OrderByStep.java:40)
	at java.util.Optional.ifPresent(Optional.java:159)
	at com.orientechnologies.orient.core.sql.executor.OrderByStep.syncPull(OrderByStep.java:40)
	at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:37)
	at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.fetchNext(OLocalResultSet.java:39)
	at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.<init>(OLocalResultSet.java:30)
	at com.orientechnologies.orient.core.sql.parser.OSelectStatement.execute(OSelectStatement.java:276)
	at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:79)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.query(ODatabaseDocumentEmbedded.java:538)
	at com.orientechnologies.orient.core.metadata.function.OFunctionLibraryImpl.load(OFunctionLibraryImpl.java:83)
	at com.orientechnologies.orient.core.db.OSharedContextEmbedded.load(OSharedContextEmbedded.java:69)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.loadMetadata(ODatabaseDocumentEmbedded.java:291)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.init(ODatabaseDocumentEmbedded.java:161)
	... 9 more

Steps to reproduce

None, but maybe you have come clues?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.