title: Core dump in zmq library in a multi-threaded application with optimiized binary
body: <p>This core dump on zmq library happened on field (not reproducible yet) with an optimized binary.</p>
  
  <pre><code>#0 0x00007f44a00801f7 in raise () from /lib64/libc.so.6
  #1 0x00007f44a00818e8 in abort () from /lib64/libc.so.6
  #2 0x00007f44a1f74759 in zmq::zmq_abort(char const*) () from /lib64/libzmq.so.5
  #3 0x00007f44a1fa410d in zmq::tcp_write(int, void const*, unsigned long) () from /lib64/libzmq.so.5
  #4 0x00007f44a1f9f417 in zmq::stream_engine_t::out_event() () from /lib64/libzmq.so.5
  #5 0x00007f44a1f7437a in zmq::epoll_t::loop() () from /lib64/libzmq.so.5
  #6 0x00007f44a1fa83a6 in thread_routine () from /lib64/libzmq.so.5
  #7 0x00007f44a1b2ce25 in start_thread () from /lib64/libpthread.so.0
  #8 0x00007f44a014334d in clone () from /lib64/libc.so.6enter code here
  </code></pre>
  
  <p>While I am analyzing my application code and hoping to find some misuse of zmq (probably using same zmq socket by 2 different threads or some other memory corruption), I would like to know what else can i get from this core-dump?   </p>
  
  <p>For a start, I can see total 102 threads running at the dump time. A many of them are in the epoll_wait.</p>
  
  <pre><code>#0  0x00007f44a0143923 in epoll_wait () from /lib64/libc.so.6
  #1  0x00007f44a1f74309 in zmq::epoll_t::loop() () from /lib64/libzmq.so.5
  #2  0x00007f44a1fa83a6 in thread_routine () from /lib64/libzmq.so.5
  #3  0x00007f44a1b2ce25 in start_thread () from /lib64/libpthread.so.0
  #4  0x00007f44a014334d in clone () from /lib64/libc.so.6
  </code></pre>
  
  <p>The other threads pointing to application code do not look suspicious yet.</p>
  
  <p>The errno printed is 14 = EFAULT (Bad address).</p>
  
  <p>Can i try to get anything from the disassembly? I have not debugged many disassembly in the past. But in this situation if i can get any clue, i can jump-in. </p>
  
  <p>Any (other) advice/pointer will also be highly appreciated.</p>
  
  <p>Thanks.</p>