Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11810 closed defect (worksforme)

Connection through torsocks(1) impossible

Reported by: michael Owned by: dgoulet
Priority: Medium Milestone:
Component: Core Tor/Torsocks Version: Tor: 0.2.4.20
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

After installing the recent Ubuntu 14.04 AMD64 desktop release (LTS) I went about testing tor(1) and torsocks(1) and saw this:

WITHOUT TOR

$svn co http://svn.apache.org/repos/asf/subversion/trunk subversion
A subversion/notes
A subversion/notes/commit-access-templates
A subversion/notes/api-errata
A subversion/notes/api-errata/1.7
A subversion/notes/api-errata/1.8
[...]

WITH TOR

$torsocks svn co http://svn.apache.org/repos/asf/subversion/trunk subversion
svn: E120108: Unable to connect to a repository at URL 'http://svn.apache.org/repos/asf/subversion/trunk'
svn: E120108: Error running context: The server unexpectedly closed the connection.

Since the OS installation is brand new and plain vanilla (no network bridges, VPNs, custom routing, or even a single service configured except for Tor) it seems a problem lies in the Tor software (either the service itself or the Socks wrapper.)

IMPORTANT CLUE

The svn(1) symptom above does not appear when replacing with git(1).

DIAGNOSIS

Running commands through torsocks(1) showing the symptom while inspecting with strace(1) reveals typical socket(2), fcntl(2), fstat(2), setsockopt(2), getpeername(2), and connect(2) to a tor(1) service running on localhost:9050 as usual. What might be atypical is that ENOTCONN and EINPROGRESS are returned in the way indicated by bug #8066 [1]. A late comment in #8066 refers in turn to #3711 [2], which are both leads.

[1] https://trac.torproject.org/projects/tor/ticket/8066/
[2] https://trac.torproject.org/projects/tor/ticket/3711/

LINUX DISTROS

Due to time constraints, I wasn't able to build tor(1) and torsocks(1) from source (at git.torproject.org) so there's a small chance that the bug has been fixed although no bug report exists to support this theory. It doesn't solve the problem of integrating whichever solution exists into leading Linux distributions however, which are still bundling the flawed version.

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by intrigeri

Status: newneeds_information

I cannot reproduce this bug on current Debian sid (torsocks 2.0.0-1). Assuming you're using Ubuntu's torsocks 1.3-3: may you please retry with torsocks 2.0, that's currently available in Ubuntu utopic?

comment:2 Changed 5 years ago by dgoulet

Resolution: worksforme
Status: needs_informationclosed

Can't reproduce it either.

No news for 4 months, assuming this one is fixed with 2.0.

comment:3 Changed 5 years ago by michael

After building tor-browser-bundle tbb-4.5a3-build2 with either 1.3-3 and 2.0.0-1 I can't reproduce the problem either. The only thing that changed (except for TBB sources) on the original bug machine I tested with are:

< subversion 1.8.8-1ubuntu3
< libsvn1:amd64 1.8.8-1ubuntu3
> subversion 1.8.8-1ubuntu3.1
> libsvn1:amd64 1.8.8-1ubuntu3.1

...so either a subversion change solved the problem or some unrelated library update libc(7)? I'm leaving in work around documentation in relevant wiki pages in any case, since this doesn't seem well defined.

Note: See TracTickets for help on using tickets.