[zeromq-dev] Intermittent SEHException in ZeroMQ.Interop.Retry.IfInterrupted?

Gregory Anderson ganderson at nyasoft.com
Wed Aug 6 23:32:57 CEST 2014


Hello,

Has anyone experienced the exception below? My .NET 4.5 application is using
the PUB/SUB pattern, and the exception below is thrown from time to time in
the receive loop of my subscriber class. I'm unable to reproduce it at will,
so I'm at a loss. I've also included the receive method from by subscriber
class below.
----- Exception ----
System.Runtime.InteropServices.SEHException was unhandled
HResult=-2147467259
Message=External component has thrown an exception.
Source=clrzmq
ErrorCode=-2147467259
StackTrace:
at ZeroMQ.Interop.Retry.IfInterruptedT1,T2,T3
<https://github.com/zeromq/clrzmq/issues/Func%604%20operation,%20T1%20arg1,%
20T2%20arg2,%20T3%20arg3>
at ZeroMQ.Interop.SocketProxy.Receive(Byte[] buffer, Int32 flags, Int32&
size)
at ZeroMQ.ZmqSocket.Receive(Byte[] buffer, SocketFlags flags, Int32& size)
at ZeroMQ.ExecuteExtensions.WithTimeoutT1,T2,T3,TResult
<https://github.com/zeromq/clrzmq/issues/ZmqSocket%20socket,%20ThirdParamOut
%604%20method,%20T1%20arg1,%20T2%20arg2,%20T3&%20arg3,%20TimeSpan%20timeout>
at ZeroMQ.ZmqSocket.Receive(Byte[] buffer, TimeSpan timeout, Int32& size)
at ZeroMQ.SendReceiveExtensions.Receive(ZmqSocket socket, Encoding encoding,
TimeSpan timeout)
at EPanicButtonReceiver.Classes.ZeroMqSubscriber.ReceiveData()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
------------------- Receive Method ‹‹‹‹‹‹‹‹‹‹‹



        private void ReceiveData()

        {

            try

            {

                while (!this.stopEvent.WaitOne(0))

                {

                    var channel = subscriberSocket.Receive(Encoding.UTF8,

                        new TimeSpan(0, 0, 0, 1));



                    if (string.IsNullOrEmpty(channel))

                    {

                        continue;

                    }



                    lock (this.locker)

                    {

                        this.RaiseAlertMessage();

                    }

                }

            }

            catch (ZeroMQ.ZmqException ex)

            {

                ELogger.Log(ex.Message);

            }

            finally

            {

                if (subscriberSocket != null)

                {

                    subscriberSocket.UnsubscribeAll();

                }



            }

        }

 
Thanks!

Greg 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140806/0e761475/attachment.html>


More information about the zeromq-dev mailing list