Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubscriberSocket System.InvalidOperationException: Operation already in progress #1085

Open
subpassion opened this issue Apr 24, 2024 · 0 comments

Comments

@subpassion
Copy link

Environment

NetMQ Version: 4.0.0.1
Operating System: Linux 5.4.129-5.4.0-devel+git.cb88cc157bfb
.NET Version: Mono JIT compiler version 6.10.0.104, net461

Expected behaviour

Open a SubscriberSocket and receive message

Actual behaviour

Unhandled Exception:
System.InvalidOperationException: Operation already in progress
at System.Net.Sockets.SocketAsyncEventArgs.SetLastOperation (System.Net.Sockets.SocketAsyncOperation op) [0x00021] in :0
at System.Net.Sockets.Socket.InitSocketAsyncEventArgs (System.Net.Sockets.SocketAsyncEventArgs e, System.AsyncCallback callback, System.Object state, System.Net.Sockets.SocketOperation operation) [0x00039] in :0
at System.Net.Sockets.Socket.SendAsync (System.Net.Sockets.SocketAsyncEventArgs e) [0x00087] in :0
at AsyncIO.DotNet.NativeSocket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 count, System.Net.Sockets.SocketFlags flags) [0x00047] in <76dbd955e71949f7b13045772e552e7a>:0
at NetMQ.Core.Transports.StreamEngine.BeginWrite (NetMQ.Core.Transports.ByteArraySegment data, System.Int32 size) [0x00012] in :0
at NetMQ.Core.Transports.StreamEngine.HandleHandshake (NetMQ.Core.Transports.StreamEngine+Action action, System.Net.Sockets.SocketError socketError, System.Int32 bytesTransferred) [0x000b3] in :0
at NetMQ.Core.Transports.StreamEngine.Handle (NetMQ.Core.Transports.StreamEngine+Action action, System.Net.Sockets.SocketError socketError, System.Int32 bytesTransferred) [0x00093] in :0
at NetMQ.Core.Transports.StreamEngine.FeedAction (NetMQ.Core.Transports.StreamEngine+Action action, System.Net.Sockets.SocketError socketError, System.Int32 bytesTransferred) [0x00000] in :0
at NetMQ.Core.Transports.StreamEngine.Plug (NetMQ.Core.IOThread ioThread, NetMQ.Core.SessionBase session) [0x0005b] in :0
at NetMQ.Core.SessionBase.ProcessAttach (NetMQ.Core.Transports.IEngine engine) [0x000ca] in :0
at NetMQ.Core.ZObject.ProcessCommand (NetMQ.Core.Command cmd) [0x000a8] in :0
at NetMQ.Core.IOThread.Ready () [0x00009] in :0
at NetMQ.Core.IOThreadMailbox.RaiseEvent () [0x00008] in :0
at NetMQ.Core.Utils.Proactor.Loop () [0x00051] in :0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Operation already in progress
at System.Net.Sockets.SocketAsyncEventArgs.SetLastOperation (System.Net.Sockets.SocketAsyncOperation op) [0x00021] in :0
at System.Net.Sockets.Socket.InitSocketAsyncEventArgs (System.Net.Sockets.SocketAsyncEventArgs e, System.AsyncCallback callback, System.Object state, System.Net.Sockets.SocketOperation operation) [0x00039] in :0
at System.Net.Sockets.Socket.SendAsync (System.Net.Sockets.SocketAsyncEventArgs e) [0x00087] in :0
at AsyncIO.DotNet.NativeSocket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 count, System.Net.Sockets.SocketFlags flags) [0x00047] in <76dbd955e71949f7b13045772e552e7a>:0
at NetMQ.Core.Transports.StreamEngine.BeginWrite (NetMQ.Core.Transports.ByteArraySegment data, System.Int32 size) [0x00012] in :0
at NetMQ.Core.Transports.StreamEngine.HandleHandshake (NetMQ.Core.Transports.StreamEngine+Action action, System.Net.Sockets.SocketError socketError, System.Int32 bytesTransferred) [0x000b3] in :0
at NetMQ.Core.Transports.StreamEngine.Handle (NetMQ.Core.Transports.StreamEngine+Action action, System.Net.Sockets.SocketError socketError, System.Int32 bytesTransferred) [0x00093] in :0
at NetMQ.Core.Transports.StreamEngine.FeedAction (NetMQ.Core.Transports.StreamEngine+Action action, System.Net.Sockets.SocketError socketError, System.Int32 bytesTransferred) [0x00000] in :0
at NetMQ.Core.Transports.StreamEngine.Plug (NetMQ.Core.IOThread ioThread, NetMQ.Core.SessionBase session) [0x0005b] in :0
at NetMQ.Core.SessionBase.ProcessAttach (NetMQ.Core.Transports.IEngine engine) [0x000ca] in :0
at NetMQ.Core.ZObject.ProcessCommand (NetMQ.Core.Command cmd) [0x000a8] in :0
at NetMQ.Core.IOThread.Ready () [0x00009] in :0
at NetMQ.Core.IOThreadMailbox.RaiseEvent () [0x00008] in :0
at NetMQ.Core.Utils.Proactor.Loop () [0x00051] in :0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0
at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <7fd198c87a6b4d9fb18f44a78a5802dc>:0

Steps to reproduce the behaviour

Still don't know how to reproduce, exception occurs once in blue moon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant