docs: private boolean lookJVMBug(long before, int selected, long wait) throws IOException {
      boolean seeing = false;
      long now = System.currentTimeMillis();
  
      if (JVMBUG_THRESHHOLD > 0 && selected == 0 && wait > JVMBUG_THRESHHOLD
          && now - before < wait / 4 && !wakenUp.get() /* waken up */
          && !Thread.currentThread().isInterrupted()/* Interrupted */) {
        jvmBug.incrementAndGet();
        if (jvmBug.get() >= JVMBUG_THRESHHOLD2) {
          gate.lock();
          try {
            lastJVMBug = now;
            log.warn("JVM bug occured at " + new Date(lastJVMBug)
                + ",http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933,reactIndex="
                + reactorIndex);
            if (jvmBug1) {
              log.debug("seeing JVM BUG(s) - recreating selector,reactIndex=" + reactorIndex);
            } else {
              jvmBug1 = true;
              log.info("seeing JVM BUG(s) - recreating selector,reactIndex=" + reactorIndex);
            }
            seeing = true;
            final Selector new_selector = SystemUtils.openSelector();
  
            for (SelectionKey k : selector.keys()) {
              if (!k.isValid() || k.interestOps() == 0) {
                continue;
              }
  
              final SelectableChannel channel = k.channel();
              final Object attachment = k.attachment();
  
              channel.register(new_selector, k.interestOps(), attachment);
            }
  
            selector.close();
            selector = new_selector;
  
          } finally {
            gate.unlock();
          }
          jvmBug.set(0);
  
        } else if (jvmBug.get() == JVMBUG_THRESHHOLD || jvmBug.get() == JVMBUG_THRESHHOLD1) {
          if (jvmBug0) {
            log.debug("seeing JVM BUG(s) - cancelling interestOps==0,reactIndex=" + reactorIndex);
          } else {
            jvmBug0 = true;
            log.info("seeing JVM BUG(s) - cancelling interestOps==0,reactIndex=" + reactorIndex);
          }
          gate.lock();
          seeing = true;
          try {
            for (SelectionKey k : selector.keys()) {
              if (k.isValid() && k.interestOps() == 0) {
                k.cancel();
              }
            }
          } finally {
            gate.unlock();
          }
        }
      } else {
        jvmBug.set(0);
      }
      return seeing;
    }