I know how to generate minidumps in Windows and create a small (~20Kb) file that would have a snapshot of the stack and lots of other goodies. To access it, one opens the generated .DMP file with "WinDBG.exe -k minidump.dmp", enter the command ".ecxr" then "kvn" to see stack at the failure point in time. If PDB symbol files for the correct version of the DLLs being used are available at their build locations, the "kvn" command will even tell you the source file and line number where the exception happened and you will be able to see local variable values for the functions on the stack by typing "dv" in WinDBG for each stack frame.
Obviously this is Windows only functionality. Earlier in the year I made a contribution to documentation of ZeroMQ using a .DOC file and I felt shunned by the community when my PR was denied because it used a Windows document format. I even offered to format the same file as PDF, because the important thing was the information it contained, not the format, to no avail. At the time, (and even now) it felt to me like a betrayal of the C4 tenets, but lets not get into religious wars here. I can tell you that in my professional work, I have brought down my company's main product from 10 crashes/DAY/user to 0.5 crashes/MONTH/user by iterating on generating these minidumps, asking the users to send them in, analyzing them and fixing the problems they brought to our attention, so this is proven technology. If the community feels that this is a good idea (add a Windows specific code to generate minidumps when exceptions happen), I would love to invest the time to this effort. On Mon, Nov 14, 2016 at 1:30 PM Aaron Friesen <[email protected]> wrote: > All, > > > > Getting an SEHException 0x80004005 from ZeroMQ (4.1.0.21) / libzmq > (4.1.5.0) > > > > Multiple processes went down with the same exception at the same time. > > > > Was not able to get a dump but the application logs showed the following > stack trace: > > > > System.Exception System.Runtime.InteropServices.SEHException (0x80004005): > External component has thrown an exception. > > at ZeroMQ.lib.zmq.zmq_msg_send(IntPtr msg, IntPtr socket, Int32 flags) > > at ZeroMQ.ZSocket.SendFrame(ZFrame frame, ZSocketFlags flags, ZError& > error) > > at ZeroMQ.ZSocket.SendFrames(IEnumerable`1 frames, Int32& sent, > ZSocketFlags flags, ZError& error) > > at ZeroMQ.ZSocket.SendFrames(IEnumerable`1 frames, ZSocketFlags flags, > ZError& error) > > at ZeroMQ.ZSocket.SendMessage(ZMessage msg, ZSocketFlags flags, ZError& > error) > > at ZeroMQ.ZSocket.SendMessage(ZMessage msg, ZSocketFlags flags) > > at ZeroMQ.ZSocket.SendMessage(ZMessage msg) > > at xxxxxx.SocketsThread(Object eventWaitHandle) > > > > No line numbers available, but based on the logged message, it would have > occurred in the following code. Because the stack trace does not include > any of the calls within the try block (PollIn, ProcessRequest, > ProcessSubscription), I am at a loss as to what exactly was executing at > the time of the exception that was calling SendMessage. > > > > Does anyone have any ideas as to what I might be doing wrong, or what the > problem might be and how to avoid it? > > > > > > > > ZSocket[] sockets = new ZSocket[] { _requestSocket, > _subscriberSocket }; > > ZPollItem[] pollItems = new ZPollItem[] { > ZPollItem.CreateReceiver(), > ZPollItem.CreateReceiver() }; > > ZMessage[] messages = null; > > > > try > > { > > TimeSpan timeout = TimeSpan.FromMilliseconds(100); > > > > while (_run) > > { > > if (ZPollItems.PollIn(sockets, pollItems, out > messages, out error, timeout)) > > { > > if (error == ZError.EAGAIN) > > continue; > > > > if (error == ZError.ETERM) > > break; > > > > if (messages == null) > > continue; > > > > if (messages[0] != null) // Request > > ProcessRequest(messages[0]); > > > > if (messages[1] != null) // Subscription > > ProcessSubscription(messages[1]); > > } > > else > > { > > if (error == ZError.EAGAIN) > > continue; > > > > if (error != ZError.None) > > break; > > } > > } > > } > > catch (Exception ex) > > { > > if (!(ex is ThreadAbortException)) > > { > > _logger.FatalException(string.Format("Exception > encountered while polling for messages on sockets. Thread '{0}' shutting > down.", threadName), ex); > > > > Environment.Exit(-1); > > } > > } > > > > Thank you in advance, > > > > Aaron Friesen > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
