Error executing job: LiteDB ENSURE: pages in memory store must be non-shared

Product: PowerShell Universal
Version: 4.2.15

Late last week, we started to see the following error on certain jobs:

image

2024-06-07 17:09:34.825 -05:00 [INF] Error executing job 64664: LiteDB ENSURE: pages in memory store must be non-shared    at LiteDB.Constants.ENSURE(Boolean conditional, String message)
   at LiteDB.Engine.MemoryCache.GetFreePage()
   at LiteDB.Engine.MemoryCache.<>c__DisplayClass5_0.<GetReadablePage>b__0(Int64 k)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at LiteDB.Engine.MemoryCache.GetReadablePage(Int64 position, FileOrigin origin, Action`2 factory)
   at LiteDB.Engine.Snapshot.ReadPage[T](UInt32 pageID, FileOrigin& origin, Int64& position, Int32& walVersion)
   at LiteDB.Engine.Snapshot.GetPage[T](UInt32 pageID, FileOrigin& origin, Int64& position, Int32& walVersion)
   at LiteDB.Engine.DataService.Read(PageAddress address)+MoveNext()
   at LiteDB.Engine.BufferReader..ctor(IEnumerable`1 source, Boolean utcDate)
   at LiteDB.Engine.DatafileLookup.Load(PageAddress rawId)
   at LiteDB.Engine.BasePipe.LoadDocument(IEnumerable`1 nodes)+MoveNext()
   at LiteDB.Engine.BasePipe.Filter(IEnumerable`1 source, BsonExpression expr)+MoveNext()
   at LiteDB.Engine.BasePipe.Filter(IEnumerable`1 source, BsonExpression expr)+MoveNext()
   at LiteDB.Engine.QueryPipe.Select(IEnumerable`1 source, BsonExpression select)+MoveNext()
   at LiteDB.Engine.QueryExecutor.<>c__DisplayClass10_0.<<ExecuteQuery>g__RunQuery|0>d.MoveNext()
   at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
   at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
   at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at UniversalAutomation.ExecutionService.TryExecute(Job job, Schedule schedule) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 502
   at UniversalAutomation.ExecutionService.TryExecute(Job job, Schedule schedule) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 502
   at UniversalAutomation.ExecutionService.Execute(Job job, Schedule schedule) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 255 System.Exception

I’ve had this happen on “random” jobs as well, but the jobs actually run successfully based on results of the actual logging I do within the PowerShell script. I’ve just ignored it since (so far) the jobs are running successfully as expected. But following this thread in case there is a known cause/resolution.