title: thrift segmentation fault in TNonblockingIOThread::notify(TNonblockingServer::TConnection* conn)
body: <p>The bt log:</p>
  
  <pre><code>signal 11 (Segmentation fault), address is (nil) from 0x7f0280708196
  [bt]: (1) /lib/x86_64-linux-gnu/libc.so.6(abort+0x2d6) [0x7f0280708196]
  [bt]: (2) /lib/x86_64-linux-gnu/libc.so.6(abort+0x2d6) [0x7f0280708196]
  [bt]: (3) /lib/x86_64-linux-gnu/libc.so.6(+0x777ea) [0x7f02807487ea]
  [bt]: (4) /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c) 
  [0x7f02807ea15c]
  [bt]: (5) /lib/x86_64-linux-gnu/libc.so.6(+0x117160) [0x7f02807e8160]
  [bt]: (6) /lib/x86_64-linux-gnu/libc.so.6(+0x1190a7) [0x7f02807ea0a7]
  [bt]: (7) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift6server20TNonblockingIOThread6notifyEPNS1_18TNonblockingServer11TConnectionE+0x95) [0x18b4aa5]
  [bt]: (8) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift6server18TNonblockingServer11TConnection4Task3runEv+0x2a7) [0x18bc2a7]
  [bt]: (9) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift11concurrency13ThreadManager6Worker3runEv+0x512) [0x189cdc2]
  [bt]: (10) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift11concurrency13PthreadThread10threadMainEPv+0xd6) [0x18aff26]
  [bt]: (11) /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f0281d0d6ba]
  [bt]: (12) /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f02807d841d]
  </code></pre>
  
  <p>The code to start server:</p>
  
  <pre><code>std::shared_ptr&lt;ReplicaIndexingServiceHandler&gt; handler(new ReplicaIndexingServiceHandler(raft));
  std::shared_ptr&lt;TProcessor&gt; processor(new ReplicaIndexingServiceProcessor(handler));
  std::shared_ptr&lt;TProtocolFactory&gt; protocolFactory(new TBinaryProtocolFactory());
  std::shared_ptr&lt;TNonblockingServerTransport&gt; transport(new TNonblockingServerSocket(FLAGS_thrift_port));
  
  std::shared_ptr&lt;ThreadManager&gt; threadManager = ThreadManager::newSimpleThreadManager(FLAGS_thrift_worker_count);
  std::shared_ptr&lt;PosixThreadFactory&gt; threadFactory = std::shared_ptr&lt;PosixThreadFactory&gt;(new PosixThreadFactory());
  threadManager-&gt;threadFactory(threadFactory);
  threadManager-&gt;start();
  
  _server = std::make_shared&lt;TNonblockingServer&gt;(processor, protocolFactory, transport, threadManager);
  
  LOG(INFO) &lt;&lt; "thrift server going to start at port: " &lt;&lt; FLAGS_thrift_port;
  try {
      _server-&gt;serve();
  } catch (std::exception&amp; tx) {
      LOG(ERROR) &lt;&lt; "thrift server exception, err: " &lt;&lt; tx.what();
  }
  </code></pre>
  
  <p>I've tried from thrift 0.9.3 and 0.11.0, both of them failed at the same place.</p>
  
  <p>And I have several hundreds of thrift servers, like 1% of the servers will always crash at this place.</p>