[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #28864 [Core Tor/sbws]: sbws AsyncResults have no timeout



#28864: sbws AsyncResults have no timeout
-------------------------------+-------------------------------
     Reporter:  teor           |      Owner:  (none)
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:  sbws: 1.0.x-final
    Component:  Core Tor/sbws  |    Version:  sbws: 1.0.2
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:  #28663
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+-------------------------------
 After sbws queues an `AsyncResult`, it will wait forever for the result to
 be ready:
 https://github.com/torproject/sbws/blob/ee64d76df54ceb3a3c9e1e2a797fd70d68bb0035/sbws/core/scanner.py#L359-L364

 If at least one result hangs, then sbws will hang, because
 `AsyncResult.ready()` does not have a timeout.

 Instead, sbws should call `AsyncResult.wait([timeout])` on each result,
 after calling `pool.apply_async()` on a large number of results.

 See
 https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.AsyncResult.wait

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