tor hangs if network interrupted while "Bootstrapped 85%: Finishing handshake with first hop."
Version: 0.2.4.17-rc-1~d70.wheezy+1
Tor gets stuck in a state where it is logging nothing and the init script cannot kill it. Had to kill -9.
arm also hangs when trying to connect it in this state.
The cause is the network (wifi in my case) becoming disconnected while "finishing handshake with first hop".
My first attempt at reproducing this failed, but the second one succeeded.
Sep 07 18:55:49.000 [notice] Tor 0.2.4.17-rc (git-36eb3e0da4c3a821) opening log file.
Sep 07 18:55:49.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Sep 07 18:55:52.000 [notice] We now have enough directory information to build circuits.
Sep 07 18:55:52.000 [notice] Bootstrapped 80%: Connecting to the Tor network.
Sep 07 18:55:53.000 [notice] Bootstrapped 85%: Finishing handshake with first hop.
Sep 07 18:55:53.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:53.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:53.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:53.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:54.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:54.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:55.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:55.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:56.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:56.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:57.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:57.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:58.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:58.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:58.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:58.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:58.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:58.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:59.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:55:59.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:55:59.000 [warn] Problem bootstrapping. Stuck at 85%: Finishing handshake with first hop. (DONE; DONE; count 10; recommendation warn)
Sep 07 18:55:59.000 [warn] 10 connections have failed:
Sep 07 18:55:59.000 [warn] 10 connections died in state handshaking (TLS) with SSL state unknown state in HANDSHAKE
Sep 07 18:56:00.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:56:00.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:56:00.000 [warn] Problem bootstrapping. Stuck at 85%: Finishing handshake with first hop. (DONE; DONE; count 11; recommendation warn)
Sep 07 18:56:00.000 [warn] 11 connections have failed:
Sep 07 18:56:00.000 [warn] 11 connections died in state handshaking (TLS) with SSL state unknown state in HANDSHAKE
Sep 07 18:56:00.000 [warn] Socks version 22 not recognized. (Tor is not an http proxy.)
Sep 07 18:56:00.000 [warn] Fetching socks handshake failed. Closing.
Sep 07 18:56:00.000 [warn] Problem bootstrapping. Stuck at 85%: Finishing handshake with first hop. (DONE; DONE; count 12; recommendation warn)
Sep 07 18:56:00.000 [warn] 12 connections have failed:
(I have no idea what is causing the "SOCKS Version 22" lines, I don't usually get those.)