[tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-08 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
-+--
 Reporter:  MaKoTor  |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Component:  Core Tor/Tor
  Version:   |   Severity:  Normal
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+--
 so / ran full after a week or so. I found the culprits with:
 find /proc/*/fd -ls | grep  '(deleted)'

 Version: tor 0.4.2.7-1~d8.jessie+1

 Config:

 Standard torrc with one Hidden service, using an HTTPSProxy and
 notice+debug logging enabled:

 Log notice file /var/log/tor/notices.log
 Log debug file /var/log/tor/debug.log

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-10 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by MaKoTor):

 After rebooting the machine ~1.5 days ago, it starts happening again:
 {{{
 $ sudo find /proc/*/fd -ls | grep  '(deleted)'
  112710 l-wx--   1 debian-tor debian-tor   64 Apr  8 14:12
 /proc/509/fd/9 -> /var/log/tor/debug.log.1\ (deleted)
  112720 l-wx--   1 debian-tor debian-tor   64 Apr  8 14:12
 /proc/509/fd/10 -> /var/log/tor/notices.log.1\ (deleted)
 }}}

 I will enable similar log configurations on other hosts with other linux
 flavors and start tracking down if the problem is related to
 /etc/logrotate.d/tor , tor itself or if it is a one-off on the currently
 affected machine.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-10 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 Does your logrotate plan hup tor afterwards? If you hup tor, it should
 release its old handles on the log files.

 That said, Debian jessie is pretty much dead. I would suggest moving to a
 supported Debian and seeing if your issue gets resolved.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-14 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by MaKoTor):

 Confirmed the behavior on two Ubuntu 16.04 and 18.04 as well, so far
 affected afaik:

 0.4.2.7-1~xenial+1
 0.4.2.7-1~bionic+1
 0.4.2.7-1~d8.jessie+1

 The /etc/logrotate.d/tor in all these packages does not explicitly HUP,
 instead it:

 {{{
  postrotate
 if invoke-rc.d tor status > /dev/null; then
 invoke-rc.d tor reload > /dev/null
 fi
 }}}

 Running "sudo service tor reload" manually does reload the config and
 produces, among others, this log line:

 {{{
 Apr 14 08:49:19.000 [notice] Received reload signal (hup). Reloading
 config and resetting internal state.
 }}}

 And I find this line in all the compressed log files as well.

 Thanks, ama, for the hup pointer - what is the next low-hanging fruit to
 check?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by MaKoTor):

 Found versions which seem NOT AFFECTED:

 0.2.9.14-1ubuntu1~16.04.3
 0.4.1.5-1~xenial+1

 Since 0.4.2.7-1~xenial+1 IS affected (see above), a change somewhere
 between

 0.4.1.5
 and
 0.4.2.7

 is most likely the culprit. Will try to test tor-0.4.3.4-rc to see if the
 bug is gone, ./src/lib/log/log.c seems to be under heavy development right
 now.

 It's also not log-rotation specific, 0.4.2.7 just doesn't close the log
 files on HUP.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 Nice find!

 Next step is to do a 'git bisect' to figure out which commit introduced
 the bug.

 Do you know how to do one of those, and/or would you like to use this as a
 learning opportunity, and/or is that something somebody else should pick
 up?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 Check out #33087 ("bugfix on 0.4.1.6") for one possibility.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by MaKoTor):

 Yes, bisecting just confirmed, it's
 8a23393eda00c7b7448b4d84157c5d06ba40c01c which fixes it onwards.

 So the question is... developing a patch for 0.4.2.7 ?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 Good stuff. That commit is part of #33087 (which aimed to resolve bugs in
 #31594), and #33087 went into 0.4.3 and is awaiting backport to 0.4.1 and
 0.4.2.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by MaKoTor):

 Also interesting: 0.4.1 (0.4.1.5-1~xenial+1 at least) was not affected
 (yet), any risk backporting might have unintended consequences on that
 one?

 How could I test the outstanding backport(s) to confirm?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-16 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
--+
 Reporter:  MaKoTor   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:  #33087| Points:
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * parent:   => #33087


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #33850 [Core Tor/Tor]: log rotation for /var/log/tor/debug.log did not close handle to old file after compression

2020-04-17 Thread Tor Bug Tracker & Wiki
#33850: log rotation for /var/log/tor/debug.log did not close handle to old file
after compression
---+
 Reporter:  MaKoTor|  Owner:  (none)
 Type:  defect | Status:  new
 Priority:  Medium |  Milestone:  Tor: 0.4.4.x-final
Component:  Core Tor/Tor   |Version:
 Severity:  Normal | Resolution:
 Keywords:  backport logs  |  Actual Points:
Parent ID:  #33087 | Points:
 Reviewer: |Sponsor:
---+
Changes (by nickm):

 * keywords:   => backport logs
 * milestone:   => Tor: 0.4.4.x-final


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs