orientechnologies / orientechnologies/orientdb
OrientDB live lock thread in collection.size
@luigidellaquila is already working on this.
Since Dec 21, 2020.
- Dominant language
- Java
- Stars
- 5k
- Forks
- 868
- Avg merge
- 15h 6m
- Merged PRs (30d)
- 18
Description
OrientDB Version: 3.0.34
Java Version: 1.8
OS: Linux
Expected behavior
Threads don't live lock and consume all cpu
Actual behavior
This thread is live locked consuming 100% CPU with this stack. I've also attached the full thread dump
orient-server-boot.txt
"OrientDB (/172.25.1.18:2424) <- BinaryClient (/172.25.5.171:54870)" #1663 daemon prio=5 os_prio=0 tid=0x00007f8de40a4800 nid=0x53e8 runnable [0x00007f8dee3dd000]
java.lang.Thread.State: RUNNABLE
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1032)
at com.orientechnologies.orient.core.tx.OTransactionRealAbstract.isIndexKeyMayDependOnRid(OTransactionRealAbstract.java:503)
at com.orientechnologies.orient.core.tx.OTransactionRealAbstract.updateIdentityAfterCommit(OTransactionRealAbstract.java:338)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:2651)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:2489)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.internalCommit(ODatabaseDocumentAbstract.java:2757)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:533)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:103)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.commit(ODatabaseDocumentAbstract.java:2238)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.commit(ODatabaseDocumentAbstract.java:2208)
at com.orientechnologies.orient.core.sql.parser.OCommitStatement.executeSimple(OCommitStatement.java:30)
at com.orientechnologies.orient.core.sql.executor.OSingleOpExecutionPlan.executeInternal(OSingleOpExecutionPlan.java:99)
at com.orientechnologies.orient.core.sql.executor.ScriptLineStep.syncPull(ScriptLineStep.java:37)
at com.orientechnologies.orient.core.sql.executor.OScriptExecutionPlan.doExecute(OScriptExecutionPlan.java:89)
at com.orientechnologies.orient.core.sql.executor.OScriptExecutionPlan.fetchNext(OScriptExecutionPlan.java:50)
at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.fetchNext(OLocalResultSet.java:39)
at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.(OLocalResultSet.java:30)
at com.orientechnologies.orient.core.command.OSqlScriptExecutor.executeInternal(OSqlScriptExecutor.java:114)
at com.orientechnologies.orient.core.command.OSqlScriptExecutor.execute(OSqlScriptExecutor.java:60)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.execute(ODatabaseDocumentEmbedded.java:638)
at com.orientechnologies.orient.server.OConnectionBinaryExecutor.executeQuery(OConnectionBinaryExecutor.java:1192)
at com.orientechnologies.orient.client.remote.message.OQueryRequest.execute(OQueryRequest.java:136)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:320)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:215)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69)
Steps to reproduce
I'm upserting in OrientDB using multiple threads with remote binary connections.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.