Opened 4 years ago

Closed 3 years ago

#10425 closed defect (fixed)

tor's geoip6 file is missing in TBB-3.5 and hardcoded to a gitian-builder path

Reported by: isis Owned by: mikeperry
Priority: High Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: tbb-3.0, tbb-helpdesk-frequent
Cc: gk, isis, dcf, mcs, brade, erinn Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When adding

GeoIPExcludeUnknown 1
ExitNodes {US}

to the torrc of a freshly unzipped TBB-3.5-rc1 in order to force exiting from the US, tor printed the following messages which reference a gitian-builder path to tor's geoip6 file (not sure if the geoip file is affected).

∃!isisⒶwintermute:(master *$)~/down/tbb-3.5-rc1/tor-browser_en-US ∴ for p in `pgrep tor`; do ps -v $p ; done
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
 4828 pts/12   S      0:00      0   100  4223   708  0.0 /bin/sh ./start-tor-browser
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
 4869 pts/12   S      0:05      5     0 40012 17500  0.2 /home/isis/down/tbb-3.5-rc1/tor-browser_en-US/Tor/tor --defaults-torrc /home/isis/down/tbb-3.5-rc1/tor
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
 7369 ?        S      9:43    121     0 94484 69988  0.8 tor-0.2.4.18-rc -f /home/isis/.tor/torrc
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
11511 ?        S      0:59      1     0 46800 23452  0.2 /usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc
∃!isisⒶwintermute:(master *$)~/down/tbb-3.5-rc1/tor-browser_en-US ∴ kill -s SIGHUP 4869
Dec 18 03:44:14.000 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Dec 18 03:44:14.000 [notice] Read configuration file "/home/isis/down/tbb-3.5-rc1/tor-browser_en-US/Data/Tor/torrc-defaults".
Dec 18 03:44:14.000 [notice] Read configuration file "/home/isis/down/tbb-3.5-rc1/tor-browser_en-US/Data/Tor/torrc".
Dec 18 03:44:14.000 [warn] Failed to open GEOIP file /home/ubuntu/install/share/tor/geoip6.  We've been configured to use (or avoid) nodes in certain countries, and we need GEOIP information to figure out which ones they are.

Child Tickets

Change History (14)

comment:1 Changed 4 years ago by gk

Cc: helix mcs brade added
Priority: normalmajor
Summary: tor's geoip6 file in TBB-3.5-rc1 is hardcoded to a gitian-builder pathtor's geoip6 file is missing in TBB-3.5-rc1 and hardcoded to a gitian-builder path

One problem, as I see it, is that we don't ship the geoip6 file at all in the TBB 3.x bundles. But even if we shipped it the error would be the same as we either need to add a proper entry in torrc (or let the user adding that entry herself) or tell tor-launcher to pass the path to the v6 file as well. I am not sure yet why that Gitian VM path is showing up in the absence of a correct path to geoip6, though.

comment:2 Changed 4 years ago by isis

One way to fix this is to add the geoip6 file as Data/Tor/geoip6, which should probably be done somewhere in the gitian descriptors, and then adding in to the torrc in TorLauncher. For the latter TorLauncher part, I've written a patch.

gk noted on IRC, however, that this adds extra startup time while tor parses the geoip6 file, which not all users need. Not sure what to do here.

comment:3 in reply to:  2 Changed 4 years ago by mcs

Replying to isis:

One way to fix this is to add the geoip6 file as Data/Tor/geoip6, which should probably be done somewhere in the gitian descriptors, and then adding in to the torrc in TorLauncher. For the latter TorLauncher part, I've written a patch.

I think the patch will need to be modified to .append("geoip6") to a clone of dataDir, because .append("6") will create an nsIFile that points to .../Data/Tor/geoip/6.

It would be nice if there was a tor config option that Tor Launcher could use to tell tor to simply look for all its configuration files under .../Data/Tor. But I do not know enough about tor and the history behind the geoip files to know if that would be an appropriate way to do things.


gk noted on IRC, however, that this adds extra startup time while tor parses the geoip6 file, which not all users need. Not sure what to do here.

How significant is the slowdown? Should tor be modified to only load the geoip files when it needs them?

comment:4 Changed 4 years ago by arma

Summary: tor's geoip6 file is missing in TBB-3.5-rc1 and hardcoded to a gitian-builder pathtor's geoip6 file is missing in TBB-3.5 and hardcoded to a gitian-builder path

comment:5 Changed 4 years ago by arma

Keywords: tbb-3.0 added

comment:6 Changed 3 years ago by nickm

Cc: erinn added

Adding 'erinn' to cc list of every ticket with 'helix' in its cc list -- erinn is helix's trac username.

comment:7 Changed 3 years ago by nickm

Cc: helix removed

Removing helix from cc lists -- helix is not erinn's trac username.

comment:10 Changed 3 years ago by mttp

Keywords: tbb-helpdesk-frequent added

comment:11 Changed 3 years ago by mcs

The following data is far from scientific, but using tor 0.2.4.21 (TBB 3.6.1) on my MacBook Pro, the wall clock time to parse the geoip6 file is not noticeable. Memory usage for the tor process with DisableNetwork=1 (to avoid random effects caused by network access) is as follows:

geoip only: 8.2MB
geoip and geoip6: 8.9MB
neither: 6.4MB

So why don't we just bundle the geoip6 file and have tor use it?

comment:12 Changed 3 years ago by gk

Then let's do it. If you take care of the Tor Launcher patch I can take care of the necessary changes to tor-browser-bundle.

comment:13 Changed 3 years ago by mcs

The presence of a GeoIPv6File option that points to a non-existent file does not stop tor from starting up, so brade and I went ahead and landed the Tor Launcher portion:
https://gitweb.torproject.org/tor-launcher.git/commit/22ab705efb3fa112ad0e94d3792e23a508c71ace

Thanks to Isis for the patch that we used as a starting point!

comment:14 Changed 3 years ago by gk

Resolution: fixed
Status: newclosed

The tor-browser-bundle bits are in commit 1ace63b0a4f9d74206e72f25e389f0f8a82f5416. Closing.

Note: See TracTickets for help on using tickets.