[tor-bugs] #31036 [Core Tor/Tor]: Logfile grow upto 2GB tor fails and refuse to start

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jul 5 02:58:37 UTC 2019


#31036: Logfile grow upto 2GB tor fails and refuse to start
-------------------------------------------------+-------------------------
 Reporter:  cypherpunks                          |          Owner:  (none)
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.2.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  035-backport 040-backport            |  Actual Points:
  041-backport                                   |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by cypherpunks):

 i can reproduce the tor startup fail, with any logfile >2147483646 bytes
 {{{
 Jul 05 04:36:11.043 [notice] Tor can't help you if you use it wrong! Learn
 how to be safe at https://www.torproject.org/download/download#warning
 Jul 05 04:36:11.077 [notice] Your ContactInfo config option is not set.
 Please consider setting it, so we can contact you if your server is misco
 nfigured or something else goes wrong.
 Jul 05 04:36:11.044 [notice] Read configuration file
 "C:\tools\msys64\home\tor\usr\share\tor\platform\torrc-windows".
 Jul 05 04:36:11.044 [notice] Read configuration file
 "C:\tools\msys64\home\tor\etc\tor\instances\node02\torrc".
 Jul 05 04:36:11.049 [notice] Included configuration file or directory at
 recursion level 1: "C:\tools\msys64\home\tor\usr\share\tor\tor-service-
 defaults-torrc".
 Jul 05 04:36:11.093 [notice] Opening Socks listener on [::1]:9050
 Jul 05 04:36:11.095 [notice] Opened Socks listener on [::1]:9050
 Jul 05 04:36:11.000 [debug] tor_open_cloexec(): Opening
 C:\tools\msys64\home\tor\var\log\tor\debug.log with flags 109
 Jul 05 04:36:11.000 [warn] Couldn't open file for 'Log debug file
 C:\tools\msys64\home\tor\var\log\tor\debug.log': No error
 Jul 05 04:36:11.000 [warn] Couldn't open file for 'Log debug file
 C:\tools\msys64\home\tor\var\log\tor\debug.log': No error
 Jul 05 04:36:11.000 [notice] Closing partially-constructed Socks listener
 on ::1:9050
 Jul 05 04:36:11.000 [warn] Failed to parse/validate config: Failed to init
 Log options. See logs for details.
 Jul 05 04:36:11.000 [err] Reading config failed--see warnings above.

 }}}

 The Start fix is to set switch non default value

 {{{
 TruncateLogFile 1
 }}}

 and tor starts happily with this big files
 {{{
 Jul 05 04:49:36.000 [debug] tor_open_cloexec(): Opening
 C:\tools\msys64\home\tor\var\log\tor\debug.log with flags 301
 Jul 05 04:49:36.000 [warn] {GENERAL} Your log may contain sensitive
 information - you disabled SafeLogging, and you're logging more than
 "notice". Don't log unless it serves an important reason. Overwrite the
 log afterwards.
 }}}
 This works for me.


 For reproduce error steps, may something like this helps creating big
 file.



 {{{
 dd if=/dev/zero of=debug.log bs=1 count=0 seek=2G
 }}}

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


More information about the tor-bugs mailing list