Opened 5 years ago

Closed 5 years ago

#13993 closed defect (fixed)

Tor's log messages seem to get emitted twice on start-up in Tor Browser 4.5-alpha-x

Reported by: gk Owned by: Sebastian
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version: Tor: 0.2.6.1-alpha
Severity: Keywords: tor-client regression
Cc: arthuredelstein, mcs, brade Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Starting with 4.5-alpha-1 it seems tor is started twice and reading at least its configuration files twice, too:

Dec 19 10:56:17.739 [notice] Tor v0.2.6.1-alpha (git-d0cec68f342992b4) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1i and Zlib 1.2.8.
Dec 19 10:56:17.739 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Dec 19 10:56:17.739 [notice] This version is not a stable Tor release. Expect more bugs than usual.
Dec 19 10:56:17.739 [notice] Read configuration file "/home/thomas/Arbeit/Tor/TBB/Dev_Test/TBB/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults".
Dec 19 10:56:17.739 [notice] Read configuration file "/home/thomas/Arbeit/Tor/TBB/Dev_Test/TBB/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc".
Dec 19 10:56:17.752 [notice] Opening Socks listener on 127.0.0.1:9150
Dec 19 10:56:17.753 [notice] Opening Control listener on 127.0.0.1:9151
Dec 19 10:56:17.739 [notice] Tor v0.2.6.1-alpha (git-d0cec68f342992b4) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1i and Zlib 1.2.8.
Dec 19 10:56:17.739 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Dec 19 10:56:17.739 [notice] This version is not a stable Tor release. Expect more bugs than usual.
Dec 19 10:56:17.739 [notice] Read configuration file "/home/thomas/Arbeit/Tor/TBB/Dev_Test/TBB/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults".
Dec 19 10:56:17.739 [notice] Read configuration file "/home/thomas/Arbeit/Tor/TBB/Dev_Test/TBB/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc".
Dec 19 10:56:17.752 [notice] Opening Socks listener on 127.0.0.1:9150
Dec 19 10:56:17.753 [notice] Opening Control listener on 127.0.0.1:9151
Dec 19 10:56:17.000 [notice] Parsing GEOIP IPv4 file /home/thomas/Arbeit/Tor/TBB/Dev_Test/TBB/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip.
Dec 19 10:56:18.000 [notice] Parsing GEOIP IPv6 file /home/thomas/Arbeit/Tor/TBB/Dev_Test/TBB/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip6.
Dec 19 10:56:18.000 [notice] Bootstrapped 0%: Starting

Doing that once should be enough. Putting that tentatively in the tbb-torbutton section as I guess Arthur's circuit UI related code might be involved here.

Child Tickets

Change History (9)

comment:1 Changed 5 years ago by mcs

I do not think tor is being started twice, at least not in some quick testing I did on Mac OS 10.9.x with TB 4.5-alpha-2. It does *look* like it is being started twice though. But I see the repeated logging even when I run tor outside of Tor Browser. Does the tor we ship with the 4.5 series include some logging changes? Or something else that would explain the restart-like behavior?

comment:2 Changed 5 years ago by gk

Keywords: tbb-torbutton removed

comment:3 Changed 5 years ago by gk

Component: Tor BrowserTor
Owner: tbb-team deleted
Status: newassigned
Summary: Tor seems to get started twice in Tor Browser 4.5-alpha-xTor's log messages get seems to get started twice in Tor Browser 4.5-alpha-x
Version: Tor: 0.2.6.1-alpha

I bisected that down to 93dfb1203715bd275d0eed6c8cccf6b6db76fd95. Nick: Is that a feature? I find it rather confusing seeing the same log messages twice on my terminal. The first time I saw that I was thinking: "Hmm... why is tor getting started twice? What is going on here?".

comment:4 Changed 5 years ago by gk

Summary: Tor's log messages get seems to get started twice in Tor Browser 4.5-alpha-xTor's log messages seem to get emitted twice on start-up in Tor Browser 4.5-alpha-x

comment:5 Changed 5 years ago by nickm

Keywords: tor-client regression added
Milestone: Tor: 0.2.6.x-final

It's a feature, but it may be acting stupidly. It's supposed to replay the messages only on a log that wasn't previously configured (so that e.g. a log file gets a record of what happened at startup) but maybe I messed up and had it replay unconditionally.

comment:6 Changed 5 years ago by nickm

Owner: set to nickm

comment:7 Changed 5 years ago by Sebastian

Owner: changed from nickm to Sebastian

comment:8 Changed 5 years ago by Sebastian

Status: assignedneeds_review

The code does what you think it should, except we configure a temporary logfile for the startup messages. So we need to special-case logs to stdout here to avoid the duplication.

Patch in bug13993 in my repo

comment:9 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

I like it. Merged!

Note: See TracTickets for help on using tickets.