I've just looked at your P2PSocket example. I haven't yet checked if it really does crash under Linux, but I am not sure how the example is supposed to work. As 'sock' is a ServerSocket, what use is writing anything to it? I have always thought the only use of server sockets is to receive client conversations (via Accept); after Accepting a client socket you can read / write it as necessary, but I believe directly writing / reading a listening socket is a misuse of the socket protocol as such (and quite likely to crash a system which doesn't check the socket state in advance). We could put a flag there to mark the socket state and perhaps ASSERT that the socket being read / written is a ClientSocket or an Accepted socket. Or have I missed something important?