You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We suspect some background task running and eventually crashing the process. This is the stack trace that was available on Win Event viewer for the process crash:
Application: ILM.exe CoreCLR Version: 8.0.23.53103 .NET Version: 8.0.0
Description: The process was terminated due to an unhandled exception.
Exception Info:
LiteDB.LiteException: current thread must contains transaction parameter at
LiteDB.Engine.TransactionMonitor.ReleaseTransaction(TransactionService transaction)
at LiteDB.Engine.TransactionService.Dispose(Boolean dispose)
at LiteDB.Engine.TransactionService.Finalize()
The process log doesn't show any access to the DB at this time (but a connection to the DB is still open)
There were errors that occurred 15 minutes before:
09:14:35.645 - ENSURE error in Update:
LiteDB.LiteException: empty page must be defined as empty type
at void LiteDB.Constants.ENSURE(bool conditional, string message)
at T LiteDB.Engine.Snapshot.NewPage<T>()
at DataPage LiteDB.Engine.Snapshot.GetFreeDataPage(int bytesLength)
at void LiteDB.Engine.DataService.Update(CollectionPage col, PageAddress blockAddress, BsonDocument doc)+source()
at bool LiteDB.Engine.BufferWriter.MoveForward(int count)
at int LiteDB.Engine.BufferWriter.Write(byte[] buffer, int offset, int count)
at void LiteDB.Engine.BufferWriter.WriteElement(string key, BsonValue value)
at int LiteDB.Engine.BufferWriter.WriteDocument(BsonDocument value, bool recalc)
at void LiteDB.Engine.DataService.Update(CollectionPage col, PageAddress blockAddress, BsonDocument doc)
at bool LiteDB.Engine.LiteEngine.UpdateDocument(Snapshot snapshot, CollectionPage col, BsonDocument doc, IndexService indexer, DataService data)
at int LiteDB.Engine.LiteEngine.Update(string collection, IEnumerable<BsonDocument> docs)+(TransactionService transaction) => { }
at T LiteDB.Engine.LiteEngine.AutoTransaction<T>(Func<TransactionService, T> fn)
at bool LiteDB.LiteCollection<T>.Update(T entity)
09:14:35.881 - When the above is caught, our app attempts to rebuild, which so far worked fine-ish. This time rebuild the DB failed with the error "The process cannot access the file because it is being used by another process.". This alone is incredibly strange because our app opens the DB in Mode=Exclusive;.
The app then closes & opens the DB with Dispose() and recreation - this seemed to have gone without errors (again... with Mode=Exclusive;. ). Following calls to Update succeeded.
09:29:12.358 - 15 minutes after the errors - the process crashes with the above stack trace in event viewer. This doesn't seem to have happen during any application call to the DB, and every application call to the DB try-catches and would log this.
Code to Reproduce
We don't have code to reproduce. So far this happened once, unknown how.
Expected behavior
We'd like to not crash surprisingly
The text was updated successfully, but these errors were encountered:
Version
LiteDB 5.0.20, Windows 10, .NET8
Describe the bug
We suspect some background task running and eventually crashing the process. This is the stack trace that was available on Win Event viewer for the process crash:
The process log doesn't show any access to the DB at this time (but a connection to the DB is still open)
There were errors that occurred 15 minutes before:
09:14:35.645
- ENSURE error in Update:09:14:35.881
- When the above is caught, our app attempts to rebuild, which so far worked fine-ish. This time rebuild the DB failed with the error"The process cannot access the file because it is being used by another process."
. This alone is incredibly strange because our app opens the DB inMode=Exclusive;
.Dispose()
and recreation - this seemed to have gone without errors (again... withMode=Exclusive;
. ). Following calls to Update succeeded.09:29:12.358
- 15 minutes after the errors - the process crashes with the above stack trace in event viewer. This doesn't seem to have happen during any application call to the DB, and every application call to the DB try-catches and would log this.Code to Reproduce
We don't have code to reproduce. So far this happened once, unknown how.
Expected behavior
We'd like to not crash surprisingly
The text was updated successfully, but these errors were encountered: