Program: 40885
Project: 40885
Buggy source:
@FiberOnly private void handleOutgoingMessage(final Request<RpcRequest,RpcWireReply> message){
  final RpcRequest request=message.getRequest();
  final long to=request.to;
  if (to == server.getNodeId()) {
    handleLoopBackMessage(message);
    return;
  }
  DiscoveryModule.NodeInfoRequest nodeInfoRequest=new DiscoveryModule.NodeInfoRequest(to,ModuleType.Replication);
  AsyncRequest.withOneReply(fiber,discoveryModule.getNodeInfo(),nodeInfoRequest,new Callback<DiscoveryModule.NodeInfoReply>(){
    @FiberOnly @Override public void onMessage(    DiscoveryModule.NodeInfoReply nodeInfoReply){
      if (!nodeInfoReply.found) {
        LOG.debug("String_Node_Str",to);
        return;
      }
      ChannelFuture channelFuture=connections.get(to);
      if (channelFuture == null) {
        LOG.trace("String_Node_Str",to,nodeInfoReply.addresses.get(0),nodeInfoReply.port);
        channelFuture=outgoingBootstrap.connect(nodeInfoReply.addresses.get(0),nodeInfoReply.port);
        connections.put(to,channelFuture);
      }
      channelFuture.addListener(new ChannelFutureListener(){
        @Override public void operationComplete(        ChannelFuture future) throws Exception {
          if (future.isSuccess()) {
            sendMessage0(message,future.channel());
          }
 else {
            fiber.execute(new Runnable(){
              @Override public void run(){
                ChannelFuture cf=connections.get(to);
                if (cf != null) {
                  if (cf.isDone()) {
                    LOG.trace("String_Node_Str",to);
                    connections.remove(to);
                  }
                }
              }
            }
);
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
@FiberOnly private void handleOutgoingMessage(final Request<RpcRequest,RpcWireReply> message){
  final RpcRequest request=message.getRequest();
  final long to=request.to;
  if (to == server.getNodeId()) {
    handleLoopBackMessage(message);
    return;
  }
  Channel channel=connections.get(to);
  if (channel != null && channel.isOpen()) {
    sendMessage0(message,channel);
    return;
  }
 else   if (channel != null) {
    LOG.debug("String_Node_Str",to);
    connections.remove(to);
  }
  DiscoveryModule.NodeInfoRequest nodeInfoRequest=new DiscoveryModule.NodeInfoRequest(to,ModuleType.Replication);
  AsyncRequest.withOneReply(fiber,discoveryModule.getNodeInfo(),nodeInfoRequest,new Callback<DiscoveryModule.NodeInfoReply>(){
    @FiberOnly @Override public void onMessage(    DiscoveryModule.NodeInfoReply nodeInfoReply){
      if (!nodeInfoReply.found) {
        LOG.debug("String_Node_Str",to);
        return;
      }
      Channel channel=connections.get(to);
      if (channel != null && channel.isOpen()) {
        sendMessage0(message,channel);
        return;
      }
 else       if (channel != null) {
        LOG.debug("String_Node_Str",to);
        connections.remove(to);
      }
      ChannelFuture channelFuture=outgoingBootstrap.connect(nodeInfoReply.addresses.get(0),nodeInfoReply.port);
      LOG.trace("String_Node_Str",to,nodeInfoReply.addresses.get(0),nodeInfoReply.port);
      connections.put(to,channelFuture.channel());
      channelFuture.channel().closeFuture().addListener(new ChannelFutureListener(){
        @Override public void operationComplete(        ChannelFuture future) throws Exception {
          fiber.execute(() -> {
            connections.remove(to,future.channel());
          }
);
        }
      }
);
      channelFuture.addListener(new ChannelFutureListener(){
        @Override public void operationComplete(        ChannelFuture future) throws Exception {
          if (future.isSuccess()) {
            sendMessage0(message,future.channel());
          }
        }
      }
);
    }
  }
);
}