dotnet / dotNext

Next generation API for .NET
https://dotnet.github.io/dotNext/
MIT License
1.64k stars 123 forks source link

Unhandled exception inside of replication task #155

Closed sakno closed 1 year ago

sakno commented 1 year ago

Log from Azure DevOps (Linux machine):

Unhandled exception. System.ObjectDisposedException: Cannot access a closed file.
   at System.IO.FileStream.get_Length()
   at DotNext.Net.Cluster.Consensus.Raft.Membership.PersistentClusterConfigurationStorage`1.ClusterConfiguration.get_Length() in /home/vsts/work/1/s/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/Membership/PersistentClusterConfigurationStorage.cs:line 45
   at DotNext.Net.Cluster.Consensus.Raft.Http.AppendEntriesMessage`2..ctor(ClusterMemberId sender, Int64 term, Int64 prevLogIndex, Int64 prevLogTerm, Int64 commitIndex, TList entries, IClusterConfiguration configuration, Boolean applyConfig) in /home/vsts/work/1/s/src/cluster/DotNext.AspNetCore.Cluster/Net/Cluster/Consensus/Raft/Http/AppendEntriesMessage.cs:line 506
   at DotNext.Net.Cluster.Consensus.Raft.Http.RaftClusterMember.DotNext.Net.Cluster.Consensus.Raft.IRaftClusterMember.AppendEntriesAsync[TEntry,TList](Int64 term, TList entries, Int64 prevLogIndex, Int64 prevLogTerm, Int64 commitIndex, IClusterConfiguration configuration, Boolean applyConfig, CancellationToken token) in /home/vsts/work/1/s/src/cluster/DotNext.AspNetCore.Cluster/Net/Cluster/Consensus/Raft/Http/RaftClusterMember.cs:line 199
   at DotNext.Net.Cluster.Consensus.Raft.LeaderState`1.Replicator.ReplicateEntries[TEntry,TList](TList entries, CancellationToken token) in /home/vsts/work/1/s/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/LeaderState.Replication.cs:line 148
   at DotNext.Net.Cluster.Consensus.Raft.LeaderState`1.Replicator.ReadAsync[TEntry,TList](TList entries, Nullable`1 snapshotIndex, CancellationToken token) in /home/vsts/work/1/s/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/LeaderState.Replication.cs:line 121
   at DotNext.Net.Cluster.Consensus.Raft.LeaderState`1.Replicator.ReplicateAsync(IAuditTrail`1 auditTrail, Int64 currentIndex, CancellationToken token) in /home/vsts/work/1/s/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/LeaderState.Replication.cs:line 66
   at DotNext.Net.Cluster.Consensus.Raft.LeaderState`1.ReplicationWorkItem.System.Threading.IThreadPoolWorkItem.Execute() in /home/vsts/work/1/s/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/LeaderState.Replication.cs:line 219
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()