#27053: Check controller's event error handling
---------------------------+--------------------------
 Reporter:  atagar         |          Owner:  atagar
     Type:  defect         |         Status:  reopened
 Priority:  Very High      |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Major          |     Resolution:
 Keywords:  controller     |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+--------------------------
Changes (by dmr):

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


Comment:

 Replying to [comment:9 dmr]:
 > That said, I'll let you know if I happen to still see them now that
 you've submitted
 
[[https://gitweb.torproject.org/stem.git/commit/?id=ed6460df4a6fa8446a1e2923bddde652f5d91ed7|ed6460df4a6fa8446a1e2923bddde652f5d91ed7]].
 (About to rebase my work onto that.)

 Ok, just finished a test run on `master`
 
([[https://gitweb.torproject.org/stem.git/commit/?id=ed6460df4a6fa8446a1e2923bddde652f5d91ed7|ed6460df4a6fa8446a1e2923bddde652f5d91ed7]]).

 Based on the output (still failing) and past experience prior to this
 change, I'm going to reopen this ticket - something in these commits seems
 to be causing this.

 atagar, if you think it's something specific to my configuration / setup,
 let's discuss over IRC to nail this down.

 Ran:
 `tox -- -a`
 (which is basically `run_tests.py -a` on py27 and p35

 Here's snippet output...

 py27:
 {{{
 py27 runtests: commands[1] | python run_tests.py -a
 ======================================================================
                              INITIALISING
 ======================================================================

   checking stem version...                             1.6.0-dev
   checking tor version...                              0.3.2.10
   checking python version...                           2.7.13
   checking cryptography version...                     2.2.2
   checking pynacl version...                           1.2.1
   checking mock version...                             2.0.0
   checking pyflakes version...                         2.0.0
   checking pycodestyle version...                      2.4.0
   checking for orphaned .pyc files...                  done (0.0s)
   checking for unused tests...                         done (0.1s)
   importing test modules...                            done (0.1s)
   running pyflakes...                                  running
   running pycodestyle...                               running

 ...
 Shutting down tor... done

 Threads lingering after test run:
   <_MainThread(MainThread, started 140094097536768)>
   <Thread(Event Notifier, started daemon 140093752395520)>
   <Thread(Event Notifier, started daemon 140093760788224)>
   <Thread(Event Notifier, started daemon 140093780129536)>
 69 TESTS WERE SKIPPED
 TESTING PASSED (23 seconds)
 }}}


 py35:
 {{{
 py35 runtests: commands[1] | python run_tests.py -a
 ======================================================================
                              INITIALISING
 ======================================================================

   checking stem version...                             1.6.0-dev
   checking tor version...                              0.3.2.10
   checking python version...                           3.5.3
   checking cryptography version...                     2.2.2
   checking pynacl version...                           1.2.1
   checking mock version...                             1.0
   checking pyflakes version...                         2.0.0
   checking pycodestyle version...                      2.4.0
   checking for orphaned .pyc files...                  done (0.0s)
   checking for unused tests...                         done (0.0s)
   importing test modules...                            done (0.3s)
   running pyflakes...                                  running
   running pycodestyle...                               running

 ======================================================================
                               UNIT TESTS
 ======================================================================

 ...
   control.controller...                                failed (0.58s)
 test_add_event_listener                                4 ms  [SUCCESS]
 test_attach_stream                                     0 ms  [SUCCESS]
 test_drop_guards                                       1 ms  [SUCCESS]
 test_event_description                                 7 ms  [SUCCESS]
 test_event_description_includes_all_events             0 ms  [SUCCESS]
 test_event_listing_with_error                        170 ms  [SUCCESS]
 test_event_listing_with_malformed_event                      [FAILURE]
 test_events_get_received                             103 ms  [SUCCESS]
 test_get_accounting_stats                              1 ms  [SUCCESS]
 test_get_effective_rate                                1 ms  [SUCCESS]
 test_get_exit_policy                                   4 ms  [SUCCESS]
 test_get_exit_policy_if_not_relaying                   0 ms  [SUCCESS]
 test_get_info                                          1 ms  [SUCCESS]
 test_get_info_address_caching                          2 ms  [SUCCESS]
 test_get_info_without_fingerprint                      3 ms  [SUCCESS]
 test_get_network_status                                1 ms  [SUCCESS]
 test_get_network_status_for_ourselves                  1 ms  [SUCCESS]
 test_get_network_status_when_unavailable               1 ms  [SUCCESS]
 test_get_pid_by_getinfo                                0 ms  [SUCCESS]
 test_get_pid_by_name                                   9 ms  [SUCCESS]
 test_get_pid_by_pid_file                               1 ms  [SUCCESS]
 test_get_pid_remote                                    1 ms  [SUCCESS]
 test_get_ports                                         4 ms  [SUCCESS]
 test_get_protocolinfo                                  1 ms  [SUCCESS]
 test_get_socks_listeners_new                           1 ms  [SUCCESS]
 test_get_socks_listeners_old                           2 ms  [SUCCESS]
 test_get_streams                                       0 ms  [SUCCESS]
 test_get_user_by_getinfo                               0 ms  [SUCCESS]
 test_get_user_by_system                                1 ms  [SUCCESS]
 test_get_user_remote                                   1 ms  [SUCCESS]
 test_get_version                                       1 ms  [SUCCESS]
 test_parse_circ_path                                   0 ms  [SUCCESS]
 test_timeout                                         101 ms  [SUCCESS]

 ======================================================================
 ERROR: test_event_listing_with_malformed_event
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib/python3.5/unittest/mock.py", line 1159, in patched
     return func(*args, **keywargs)
   File "/path/to/test/unit/control/controller.py", line 676, in
 test_event_listing_with_malformed_event
     self.malformed_listener.assert_called_once()
   File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
     raise AttributeError(name)
 AttributeError: assert_called_once

 ----------------------------------------------------------------------
 Ran 33 tests in 0.576s

 FAILED (errors=1)

 ...

 ======================================================================
                           INTEGRATION TESTS
 ======================================================================

 ...

 Shutting down tor... done

 Threads lingering after test run:
   <_MainThread(MainThread, started 139884796438272)>
   <Thread(Event Notifier, started daemon 139884448605952)>
   <Thread(Event Notifier, started daemon 139884459190016)>
   <Thread(Event Notifier, started daemon 139884417718016)>
 TESTING FAILED (30 seconds)
   [UNIT TEST] test_event_listing_with_malformed_event
 (test.unit.control.controller.TestControl) ... ERROR
 }}}

 So, seemingly: seeing multiple threads lingering, independent of test
 failure.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27053#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to