Mystery segfault when client connects to name server