I never figured this out. My printf attempt at debugging has seemed to solve the problem. Also, I have found that starting X right at boot time helps. My system has been up 43 days, and X has been running that long too. I found that restarting X later more often led to failures. (I use xdm rather than xinit.)