CoiniumServ icon indicating copy to clipboard operation
CoiniumServ copied to clipboard

Unhandled exception / total crash

Open Minersworld opened this issue 6 years ago • 2 comments

Hi,

When i launch my pool and after sending some miners from miningrigrentals... i get this error:

Terminating because of unhandled exception! System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.Dictionary2+Enumerator[TKey,TValue].MoveNext () [0x00013] in <f56c876907e742b0aa586f051fcce845>:0 at System.Linq.Enumerable+SelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00029] in <9cf10939da67463f9bbe1799644fd07e>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00059] in <9cf10939da67463f9bbe1799644fd07e>:0 at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Boolean& found) [0x00045] in <9cf10939da67463f9bbe1799644fd07e>:0 at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <9cf10939da67463f9bbe1799644fd07e>:0 at CoiniumServ.Mining.MinerManager.Remove (CoiniumServ.Server.Mining.Stratum.Sockets.IConnection connection) [0x0006c] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.StratumServer.OnClientDisconnect (System.Object sender, CoiniumServ.Server.Mining.Stratum.Sockets.ConnectionEventArgs e) [0x00027] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.OnClientDisconnect (CoiniumServ.Server.Mining.Stratum.Sockets.ConnectionEventArgs e) [0x0000a] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.RemoveConnection (CoiniumServ.Server.Mining.Stratum.Sockets.IConnection connection) [0x0008c] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.ReceiveCallback (System.IAsyncResult result) [0x00054] in <3f710f781e8f41f6ab4852ed56095121>:0 at System.Net.Sockets.SocketAsyncResult+<>c.<Complete>b__27_0 (System.Object state) [0x0000b] in :0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in :0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in :0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in :0

For some reason the pool fully crashes.

After a retry:

System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.Dictionary2+Enumerator[TKey,TValue].MoveNext () [0x00013] in <f56c876907e742b0aa586f051fcce845>:0 at System.Linq.Enumerable+SelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00029] in <9cf10939da67463f9bbe1799644fd07e>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00059] in <9cf10939da67463f9bbe1799644fd07e>:0 at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Boolean& found) [0x00045] in <9cf10939da67463f9bbe1799644fd07e>:0 at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <9cf10939da67463f9bbe1799644fd07e>:0 at CoiniumServ.Mining.MinerManager.Remove (CoiniumServ.Server.Mining.Stratum.Sockets.IConnection connection) [0x0006c] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.StratumServer.OnClientDisconnect (System.Object sender, CoiniumServ.Server.Mining.Stratum.Sockets.ConnectionEventArgs e) [0x00027] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.OnClientDisconnect (CoiniumServ.Server.Mining.Stratum.Sockets.ConnectionEventArgs e) [0x0000a] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.RemoveConnection (CoiniumServ.Server.Mining.Stratum.Sockets.IConnection connection) [0x0008c] in <3f710f781e8f41f6ab4852ed56095121>:0 at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.ReceiveCallback (System.IAsyncResult result) [0x00054] in <3f710f781e8f41f6ab4852ed56095121>:0 at System.Net.Sockets.SocketAsyncResult+<>c.<Complete>b__27_0 (System.Object state) [0x0000b] in :0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in :0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in :0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in :0

This happends when i send on 26 miners to the pool. I tried to disable banning aswell. Flushed redis Created a new mysql db.

Thanks.

Minersworld avatar Mar 09 '18 23:03 Minersworld

I'm also getting this error intermittently. @bonesoul I'd be happy to create a PR to fix; any insights on the driving factors might be here?

I'm running in Ubuntu 16.04 using Mono. Could it be a linux/unix thing? @Minersworld -- What OS are you using?

adilwali avatar Jun 26 '18 14:06 adilwali

@adilwali How is this solved, still getting this

Mentors4EDU avatar Oct 24 '18 02:10 Mentors4EDU