HS connections randomly fail
For the sake of checking whether my bridges are running properly, a regular nagios job tries to establish a tcp connection to a HS running on each bridge, every 5 minutes. This is done through 'torsocks check_ssh -H abcdef.onion -p 22' but the issue in this ticket is reproducible with 'torsocks nc abcdef.onion 22' as well.
Connections randomly fail, causing a lot of monitoring noise, though I bet that for other users this manifests as hosts being unavailable completely.
As a test, I restarted tor and waited for a nagios check to fail. I then stopped nagios completely, causing tor to be idle, and manually ran a single check. The tor debug log, trimmed to the rough timeframe in which I ran the check, can be found at https://tvdw.eu/tor-debug-20160524220000.log
torsocks says: [May 24 22:00:33] ERROR torsocks[28974]: General SOCKS server failure (in socks5_recv_connect_reply() at socks5.c:516) (note the timestamp, this failure is visible in tor's logs)
In my test the client ran Tor 0.2.7.6, and the HS ran 0.2.8.2, though I have been able to reproduce this with various tor versions on the HS side.