Re: [tor-bugs] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-04 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:
 |  mikeperry
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.4.0.1-alpha
 Severity:  Normal   | Resolution:  fixed
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding|
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-
Changes (by teor):

 * keywords:
 wtf-pad, tor-relay, tor-cell, padding, 041-must, 040-must,
 040-backport
 => wtf-pad, tor-relay, tor-cell, padding
 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 Mike posted a unit test fix to #29500.

 I summarised the remaining issues in #30031.

--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-04 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:
 |  mikeperry
 Type:  defect   | Status:
 |  assigned
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.4.0.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must, 040-must, 040-backport  |
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-
Changes (by teor):

 * status:  new => assigned
 * keywords:  wtf-pad, tor-relay, tor-cell, padding, 041-must, 040-backport
 =>
 wtf-pad, tor-relay, tor-cell, padding, 041-must, 040-must,
 040-backport
 * owner:  (none) => mikeperry


--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-04 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.4.0.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must, 040-backport|
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-
Changes (by teor):

 * keywords:  wtf-pad, tor-relay, tor-cell, padding, 041-must => wtf-pad,
 tor-relay, tor-cell, padding, 041-must, 040-backport
 * version:  Tor: unspecified => Tor: 0.4.0.1-alpha


Comment:

 Please base your code on maint-0.4.0, or make a pull request to delete the
 buggy tests from maint-0.4.0.

--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-04 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must  |
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-

Comment (by teor):

 Replying to [comment:6 mikeperry]:
 > Aha, I think I found it! Our mocking forces us to call monotime_init()
 *before* we set the mocked time value. monotime_init() thus stores the
 first ratchet value at whatever the platform is at, and then we set fake
 mocked time to some later value.
 >
 > If monotime_init() gets a value from the host that is **greater** than
 what we choose to mock time at for our unittests, all subsequent
 monotime_abosolute() calls return zero.
 >
 > So, the right way to fix all of this mess is to either fix our mocking
 to allow us to call monotime_init() with a mocked time, or just always set
 our mocked time to some time after whatever monotime_init() stored.

 Oh wow. That's a tricky bug.

 > I am going to attempt the later, to see if it fixes whatever hackintosh
 VM is involved here (I don't have one of those).

 It's just a standard mac, running macOS as host, and macOS inside some
 virtual machine software. You can probably achieve the same thing using:
 * a script that rapidly changes your hardware or software clock, or
 * VMWare, VirtualBox, or qemu with clock skew between guest and host, and
 a VM setting that applies the host time to the guest (and an apparent VM
 bug which causes the time to switch rapidly between host and guest time).

--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-04 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must  |
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-

Comment (by mikeperry):

 Aha, I think I found it! Our mocking forces us to call monotime_init()
 *before* we set the mocked time value. monotime_init() thus stores the
 first ratchet value at whatever the platform is at, and then we set fake
 mocked time to some later value.

 If monotime_init() gets a value from the host that is **greater** than
 what we choose to mock time at for our unittests, all subsequent
 monotime_abosolute() calls return zero.

 So, the right way to fix all of this mess is to either fix our mocking to
 allow us to call monotime_init() with a mocked time, or just always set
 our mocked time to some time after whatever monotime_init() stored.

 I am going to attempt the later, to see if it fixes whatever hackintosh VM
 is involved here (I don't have one of those).

--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-04 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must  |
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-

Comment (by mikeperry):

 I do not understand how the host or VM time could have any effect on our
 unittests, which strictly use mocked monotime values. Is something wrong
 with our mocking on some platforms? Or are we just not incrementing our
 mocked values sufficiently in the unittests for the resolution of some
 platforms?

 I do not have these platforms to verify (I assume by mac os VM you mean
 hackintosh?

--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code

2019-04-03 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must  |
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-
Description changed by teor:

Old description:

> I can reliably get the following failure on my macOS VM when its wall
> clock time is out of sync with the host time.
>
> Failures like this also intermittently happen when the underlying API is
> low-resolution, or not actually monotonic (for example, Windows).
>
> {{{
> circuitpadding/circuitpadding_circuitsetup_machine: [forking]
>   FAIL ../src/test/test_circuitpadding.c:1900:
> assert(client_side->padding_info[0]->padding_scheduled_at_usec OP_NE 0):
> 0 vs 0
>   [circuitpadding_circuitsetup_machine FAILED]
> }}}
>
> I've worked around the issue in #29500 by disabling these tests, but we
> should fix them long-term.

New description:

 I can reliably get the following failure on my macOS VM when its wall
 clock time is out of sync with the host time.

 Failures like this also intermittently happen when the underlying API is
 low-resolution, or not actually monotonic (for example, Windows).

 {{{
 circuitpadding/circuitpadding_circuitsetup_machine: [forking]
   FAIL ../src/test/test_circuitpadding.c:1900:
 assert(client_side->padding_info[0]->padding_scheduled_at_usec OP_NE 0): 0
 vs 0
   [circuitpadding_circuitsetup_machine FAILED]
 }}}

 I've worked around the issue in #29500 by weakening the test conditions.

 But we need to fix the circuitpadding code so it handles zero monotonic
 time differences correctly.

--

--
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] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code (was: test_circuitpadding_circuitsetup_machine() fails when monotonic time difference is zero)

2019-04-03 Thread Tor Bug Tracker & Wiki
#29990: Handle zero monotonic time differences in the circuit padding code
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  wtf-pad, tor-relay, tor-cell,|  Actual Points:
  padding, 041-must  |
Parent ID:  #29500   | Points:  2
 Reviewer:   |Sponsor:
 |  Sponsor2
-+-

--
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