[tor-bugs] #14048 [Stem]: from stem.util.connection import get_connections (v1.3) sometimes throws an exception

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 30 14:17:12 UTC 2014


#14048: from stem.util.connection import get_connections (v1.3) sometimes throws an
exception
--------------------+------------------------
 Reporter:  toralf  |          Owner:  atagar
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:
Component:  Stem    |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------
 eg for an exit relay of ~ 2000 inbound+outbound connections sometimes the
 following code snippet
 {{{
 ...
    try:
       connections = get_connections(resolver, process_pid = pid,
 process_name = 'tor')
       print " connections: %4i" % len(connections)
 ...
     except Exception as exc:
       print exc
 }}}
 gives :
 {{{
  platform supports connection resolution via: proc, netstat, lsof, ss
 (picked: proc)
  1 instance(s) of tor: 2223 (picked: 2223)
 unable to determine file descriptor destination: /proc/2223/fd/985
 }}}
 IMO if the "proc" resolver fails due to some race conditions for a
 particular connection it should deliver data for all the other
 connections.

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


More information about the tor-bugs mailing list