Control socket available prior to generating DH modulus
The control socket is made available prior to a lengthy crypto operation which causes any input on to that socket to be ignored for something on the order of minutes. This in turn causes any controllers to either hang or need to implement timeouts for control responses (thankfully those haven't been necessary previously).
If we could reorder the startup activity so the DH modulus generation happened before opening the control socket then that would be perfect.
Flagging this as major since it's gonna cause a lot of sadness for first time tor users.
irc context... 08:13 < atagar> I'm trying to reproduce the arm issue mentioned on tor-talk and getting something odd from 0.2.3.9-alpha... 08:13 < atagar> Dec 15 08:09:59.000 [notice] Generating fresh dynamic DH modulus. This might take a while... 08:13 < atagar> What does that log message mean? While that's going on controller requests hang (for instance, when I issue a PROTOCOLINFO I didn't get any response until I gave up and killed the process). Unfortunately this makes arm hang (and probably any other controller that tries to attach). 08:13 < atagar> It would be nice if tor rejected the socket if it can't handle controller commands - shall I file a bug about this? 08:14 < atagar> nickm: ^ 08:15 < nickm> atagar: It means that Tor is doing some cryptoish math to generate a modulus. 08:15 < nickm> it will take a while. 08:15 < nickm> it will happen on startup once, and will eat a bunch of cpu 08:16 < atagar> Gotcha, thanks. Can it happen before opening a control socket? 08:19 < nickm> I don't know. It's possible, I think