planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
506 stars 142 forks source link

LiteDB lock timeout while reorg occurred #334

Closed longfin closed 1 year ago

longfin commented 5 years ago
07/02/2019 04:59:22 +00:00: Append Failed. exception: LiteDB.LiteException: Timeout. Database is locked for more than 00:01:00.
  at LiteDB.LockService.Read () [0x0006b] in <0e7fe05a592849968cfe23dfc2a26585>:0 
  at LiteDB.LiteEngine+<Find>d__9.MoveNext () [0x000a7] in <0e7fe05a592849968cfe23dfc2a26585>:0 
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) [0x00045] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at LiteDB.LiteStorage.FindById (System.String id) [0x00039] in <0e7fe05a592849968cfe23dfc2a26585>:0 
  at Libplanet.Store.LiteDBStore.GetTransaction[T] (Libplanet.Tx.TxId txid) [0x00013] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Store.LiteDBStore.<GetTransactions>b__40_0[T] (System.Byte[] bytes) [0x00007] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00048] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].ToArray () [0x00033] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at Libplanet.Blocks.Block`1[T]..ctor (System.Int64 index, System.Int64 difficulty, Libplanet.Nonce nonce, System.Nullable`1[T] miner, System.Nullable`1[T] previousHash, System.DateTimeOffset timestamp, System.Collections.Generic.IEnumerable`1[T] transactions) [0x00035] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Store.LiteDBStore.GetBlock[T] (Libplanet.HashDigest`1[T] blockHash) [0x000de] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Store.BlockSet`1[T].get_Item (Libplanet.HashDigest`1[T] key) [0x00007] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Blockchain.BlockChain`1+<GetEnumerator>d__32[T].MoveNext () [0x000ab] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at System.Linq.Enumerable.LongCount[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at Libplanet.Blockchain.BlockChain`1[T].Swap (Libplanet.Blockchain.BlockChain`1[T] other) [0x00016] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Net.Swarm+<AppendBlocksAsync>d__100`1[T].MoveNext () [0x001fe] in <c27953b2854441e5ad760c6eefe61d46>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at Libplanet.Net.Swarm+<ProcessBlockHashes>d__98`1[T].MoveNext () [0x002f2] in <c27953b2854441e5ad760c6eefe61d46>:0 
LiteDB.LiteException: Timeout. Database is locked for more than 00:01:00.
  at LiteDB.LockService.Read () [0x0006b] in <0e7fe05a592849968cfe23dfc2a26585>:0 
  at LiteDB.LiteEngine+<Find>d__9.MoveNext () [0x000a7] in <0e7fe05a592849968cfe23dfc2a26585>:0 
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) [0x00045] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at LiteDB.LiteStorage.FindById (System.String id) [0x00039] in <0e7fe05a592849968cfe23dfc2a26585>:0 
  at Libplanet.Store.LiteDBStore.GetTransaction[T] (Libplanet.Tx.TxId txid) [0x00013] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Store.LiteDBStore.<GetTransactions>b__40_0[T] (System.Byte[] bytes) [0x00007] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00048] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].ToArray () [0x00033] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at Libplanet.Blocks.Block`1[T]..ctor (System.Int64 index, System.Int64 difficulty, Libplanet.Nonce nonce, System.Nullable`1[T] miner, System.Nullable`1[T] previousHash, System.DateTimeOffset timestamp, System.Collections.Generic.IEnumerable`1[T] transactions) [0x00035] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Store.LiteDBStore.GetBlock[T] (Libplanet.HashDigest`1[T] blockHash) [0x000de] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Store.BlockSet`1[T].get_Item (Libplanet.HashDigest`1[T] key) [0x00007] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Blockchain.BlockChain`1+<GetEnumerator>d__32[T].MoveNext () [0x000ab] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at System.Linq.Enumerable.LongCount[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <3e4da02cf86b4fc686ed0ac61bffc210>:0 
  at Libplanet.Blockchain.BlockChain`1[T].Swap (Libplanet.Blockchain.BlockChain`1[T] other) [0x00016] in <c27953b2854441e5ad760c6eefe61d46>:0 
  at Libplanet.Net.Swarm+<AppendBlocksAsync>d__100`1[T].MoveNext () [0x001fe] in <c27953b2854441e5ad760c6eefe61d46>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at Libplanet.Net.Swarm+<ProcessBlockHashes>d__98`1[T].MoveNext () [0x002f2] in <c27953b2854441e5ad760c6eefe61d46>:0
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

moreal commented 4 years ago

LiteDBStore had been gone since 0.8.0, then is it okay to close this issue?

https://github.com/planetarium/libplanet/blob/master/CHANGES.md#version-080

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.