A: 

The Selector has several documented levels of internal synchronization, and you are running into them all. Call wakeup() on the selector before you call register(). Make sure the select loop works correctly if there are zero selected keys, which is what will happen on wakeup().

EJP