Debugging select loop. Here the process freezes.