Re: [tor-bugs] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-28 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  closed
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:  fixed
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by nickm):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 I've opened https://github.com/torproject/stem/issues/55 for that issue,
 and am closing this.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-28 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  reopened
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by nickm):

 * parent:  #33039 =>


--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-27 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  reopened
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:  #33039| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 I think that's it, except for:
 > We should find some way to make it so that when stem is running its
 tests, it does not close Tor's stderr, but rather reports stderr output as
 a test failure. This will make it likelier that we will notice
 LeakSanitizer failures in the future.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-26 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  reopened
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:  #33039| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by nickm):

 Can we close this now?  We've merged Taylor's fix for #33039, and Stem has
 merged my PR to fix the test failure message.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-23 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  reopened
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:  #33039| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by nickm):

 Taylor and I have been investigating this and here is what we found:

 The integ/process.py code is doing this test to see whether Tor is
 running:
 {{{
 if tor_process.poll() == 0:
return  # tor exited
 }}}

 This is calling the `poll` method of a subprocess.Popen() object, which
 only returns 0 when the process exits with an exitcode of 0.  If Tor exits
 with any other exit code, it will return something else.

 In this case, I found that Tor was actually exiting with a SIGPIPE,
 because of this chain of events:
* stderr had been closed by stem.
* There was a memory leak (#33039), and so LeakSanitizer was trying to
 write to stderr.
* LeakSanitizer couldn't write to stderr (because it was closed), and
 so it got a SIGPIPE.

 We didn't notice this at the time because there was nothing to tell us
 that the bug had actually occurred.

 I think we have a few things to work on here.
   * I've opened #33039 for the leak.  We should fix that in 0.4.3.
   * I've opened a pull request against stem so that it gives a more
 accurate message if Tor fails during theses tests:
 https://github.com/torproject/stem/pull/54 .  I hope it's in the right
 place.  (I did not find any other cases where stem was using the
 `poll()==0` pattern.)
   * We should find some way to make it so that when stem is running its
 tests, it does not close Tor's stderr, but rather reports stderr output as
 a test failure.  This will make it likelier that we will notice
 LeakSanitizer failures in the future.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-23 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  reopened
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:  #33039| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * parent:   => #33039


Comment:

 Let's check this test again, once #33039 is fixed.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-23 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  reopened
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by nickm):

 * status:  closed => reopened
 * resolution:  worksforme =>


--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-23 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  closed
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:  worksforme
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by catalyst):

 Replying to [comment:5 teor]:
 > It looks like this timing issue was introduced in the #30984 refactor,
 perhaps in commit c744d23c8d. (At least on my machine.)
 >
 > Tor doesn't guarantee control reply timing. And we're unlikely to be
 able to restore the old timing behaviour. So stem's tests should be
 adapted to work with the timing in both Tor 0.4.2 and Tor master.
 I'm not sure what that commit has to do with `TAKEOWNERSHIP`. It seems to
 be about `GETCONF` instead. Are you suggesting that a change to the timing
 or formatting of `GETCONF` is causing a specific stem test to consistently
 fail?

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  closed
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:  worksforme
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 Here's the script I used for bisecting:
 {{{
 if ! test -f configure; then
 # abort bisect if setup fails
 ./autogen.sh  || exit 255
 # fragile hardening is required to trigger the bug
 # disabling asciidoc makes configure require fewer dependencies
 ./configure --disable-asciidoc --enable-fragile-hardening || exit 255
 fi

 # skip bisect of this commit if it doesn't build
 make src/app/tor || exit 125
 python3 "$STEM_SOURCE_DIR"/run_tests.py --tor src/app/tor --integ --test
 process.test_take_ownership_via_controller --log TRACE --log-file stem.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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  closed
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:  worksforme
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * status:  assigned => closed
 * cc: catalyst (added)
 * resolution:   => worksforme


Comment:

 It looks like this timing issue was introduced in the #30984 refactor,
 perhaps in commit c744d23c8d. (At least on my machine.)

 Tor doesn't guarantee control reply timing. And we're unlikely to be able
 to restore the old timing behaviour. So stem's tests should be adapted to
 work with the timing in both Tor 0.4.2 and Tor master.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  assigned
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * keywords:  043-must => 043-should
 * actualpoints:  0.2 =>


Comment:

 This bug only occurs with `./configure --enable-fragile-hardening` on my
 system. So it may be a tor/stem race condition bug. (#29437 is a similar
 bug, we may need #30901 to debug this kind of race condition.)

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  assigned
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-must  |  Actual Points:  0.2
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * keywords:  043-should => 043-must
 * actualpoints:   => 0.2


Comment:

 We broke this in 0.4.3, so we have to fix it.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  assigned
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 This stem test passes on 0.4.2:
 * https://travis-ci.org/torproject/tor/jobs/637709536

 But fails on master:
 Stem logs:
 * https://travis-ci.org/teor2345/tor/builds/639735548#L5757
 Tor logs:
 * https://travis-ci.org/teor2345/tor/builds/639735548#L4708
 (I think the Tor logs are too verbose to show anything interesting.)

 So it's probably a Tor bug.

 I can also reproduce these results locally with the latest tor and stem
 master, so I should be able to bisect.

--
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] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  assigned
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  043-should|  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 I created a diagnostics branch that just runs test-stem, and just the
 affected test:
 * do not merge: https://github.com/torproject/tor/pull/1678

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

[tor-bugs] #33006 [Core Tor/Tor]: Fix test-stem `test_take_ownership_via_controller` failure

2020-01-20 Thread Tor Bug Tracker & Wiki
#33006: Fix test-stem `test_take_ownership_via_controller` failure
--+
 Reporter:  teor  |  Owner:  teor
 Type:  defect| Status:  assigned
 Priority:  Medium|  Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal|   Keywords:  043-should
Actual Points:|  Parent ID:
   Points:  1 |   Reviewer:
  Sponsor:|
--+
 Stem's `test_take_ownership_via_controller` test fails when run in Travis
 CI. This is a recent failure, some time in the last month or two.

 See, for example:
 https://travis-ci.org/torproject/tor/jobs/639546796

 We're trying to work out if it's a Tor or Stem issue right now, here's the
 corresponding Stem ticket:
 https://github.com/torproject/stem/issues/52

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