[tor-bugs] #25511 [Core Tor/Tor]: Expose TZ info on control port for better debugging of time errors

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Apr 9 21:04:57 UTC 2018


#25511: Expose TZ info on control port for better debugging of time errors
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  neel
     Type:  enhancement                          |         Status:
                                                 |  merge_ready
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.4.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  roadmap, controller, 034-roadmap-    |  Actual Points:
  master, 034-triage-20180328,                   |
  034-included-20180328, s8-errors               |
Parent ID:                                       |         Points:
 Reviewer:  catalyst                             |        Sponsor:
                                                 |  Sponsor8
-------------------------------------------------+-------------------------

Comment (by catalyst):

 Replying to [comment:31 mcs]:
 > But I am a little surprised that `tor` is not started with `TZ=UTC` (we
 patch the Firefox code to set TZ to UTC early during browser startup).
 Thanks for the confirmation of the control port usage.  These next
 observations are for Tor Browser "8.0a5 (based on Mozilla Firefox 52.7.3)
 (64-bit)" on Linux.  It seems that when Tor Launcher starts a tor
 subprocess for the first time, the `TZ` environment variable is unset. For
 me, this results in tor logging to a file in local time (probably because
 of my `/etc/localtime` symlink).  If that tor subprocess dies for some
 reason, Tor Browser seems to restart tor with `TZ=UTC` set explicitly, so
 it logs to a file in UTC.  I determined these by inspecting the `TZ`
 environment variable by calling `getenv()` within the process while
 attached with gdb.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25511#comment:32>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list