self-test the socks port before bootstrapping is complete?
Some users (e.g. those in #3941 (closed)) have local firewalls that will let them open a high numbered port, but not let any applications connect to it. When we set 'socksport auto' for them, they can end up in this situation.
One option would be for Tor to make a socks connection to itself on the socksport it just opened, and make a connection to .noconnect or the equivalent (which I believe we disabled for no good reason, but that's a separate issue). If that test fails, log a more useful error and prevent bootstrapping from reaching 100%.
(The socksport test can happen in parallel to the rest of bootstrapping, so in all reasonable cases it shouldn't be holding anything up.)
It's unclear to me how often this feature will be useful in practice -- for example, perhaps the firewalls that prevent apps from reaching these ports would still allow the app that bound the port to reach it.
But it seems like the sort of feature that will come in handy down the road when debugging weird firewall situations. And the weird firewalls sure aren't going to go away anytime soon.