[tor-bugs] #28866 [Core Tor/sbws]: ResultDump.queue.put() can hang if the queue is full

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Dec 17 03:42:24 UTC 2018


#28866: ResultDump.queue.put() can hang if the queue is full
-------------------------------+-------------------------------
     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:                 |
-------------------------------+-------------------------------
 sbws calls `ResultDump.queue.put()` in blocking mode:
 https://github.com/torproject/sbws/blob/ee64d76df54ceb3a3c9e1e2a797fd70d68bb0035/sbws/core/scanner.py#L303

 But multiprocessing callbacks need to return immediately:
 https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.apply_async

 So sbws should call put() without blocking, or with a (very small)
 timeout:
 https://docs.python.org/3/library/queue.html#queue.Queue.put

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28866>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list