Re: [tor-bugs] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-09-01 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201608, review-  |  implemented
  group-5, review-group-7|  Actual Points:  4
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by nickm):

 * keywords:  tor-dos, TorCoreTeam201606, review-group-5, review-group-7 =>
 tor-dos, TorCoreTeam201608, review-group-5, review-group-7


Comment:

 This was finished in August

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-26 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  implemented
  group-5, review-group-7|  Actual Points:  4
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by nickm):

 * status:  needs_review => closed
 * resolution:   => implemented


Comment:

 Merged.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-25 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  Actual Points:  4
  group-5, review-group-7|
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by andrea):

 * status:  reopened => needs_review


--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-25 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  Actual Points:  4
  group-5, review-group-7|
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by andrea):

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


Comment:

 Test suite failures fixed in {{{oos-test-failures}}}

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-25 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  implemented
  group-5, review-group-7|  Actual Points:  4
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by nickm):

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


Comment:

 merged; thank you!

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-25 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  Actual Points:  4
  group-5, review-group-7|
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by dgoulet):

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


Comment:

 This made current git upstream fail to build with two issues.

 Both fixed in `bug18640_029_01`.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-25 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  implemented
  group-5, review-group-7|  Actual Points:  4
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by nickm):

 * status:  merge_ready => closed
 * resolution:   => implemented


Comment:

 > Open a new ticket to make this code look at all edge/directory
 connections, and turn the check on by default.

 This is #19984, just opened.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-25 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  Actual Points:  4
  group-5, review-group-7|
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-

Comment (by nickm):

 Merged!

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-23 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  Actual Points:  4
  group-5, review-group-7|
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by nickm):

 * status:  needs_review => merge_ready


Comment:

 Looks good to me.  There heeds to be documentation for DisableOOSCheck,
 and a changes file.  I can add those when I merge.  (Planning to hold the
 merge till after 0.2.9.2-alpha, so that this can bake on git master for a
 little while before it ships.)

 To do:
   * Add a changes file
   * Document DisableOOSCheck
   * Merge
   * Open a new ticket to make this code look at all edge/directory
 connections, and turn the check on by default.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-19 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606, review-  |  Actual Points:  4
  group-5, review-group-7|
Parent ID:  #17293   | Points:  3
 Reviewer:  nickm|Sponsor:
 |  SponsorU-can
-+-
Changes (by andrea):

 * status:  needs_revision => needs_review


Comment:

 My ticket18640_v3 branch now has all the requested fixes except for a
 heuristic that considers more connection types, and a new DisableOOSCheck
 flag, currently enabled by default.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-08-02 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 Priority:  Medium   |  needs_revision
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-dos, TorCoreTeam201606, review-  |Version:
  group-5| Resolution:
Parent ID:  #17293   |  Actual Points:  4
 Reviewer:  nickm| Points:  3
 |Sponsor:
 |  SponsorU-can
-+-
Changes (by nickm):

 * status:  needs_review => needs_revision


--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-07-26 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 Priority:  Medium   |  needs_review
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-dos, TorCoreTeam201606, review-  |Version:
  group-5| Resolution:
Parent ID:  #17293   |  Actual Points:  4
 Reviewer:  nickm| Points:  3
 |Sponsor:
 |  SponsorU-can
-+-

Comment (by nickm):

 ''Actual-review-points-so-far'' : 0.2

 Looking good!  There are a few small issues to fix, and I'd like to talk a
 little more about the actual heuristics for what to kill: see comments on
 branch.

 (I don't think we need to get those heuristics right before merging.  We
 could instead disable the connection-killer until we believe in it, or
 make it off-by-default till we believe in 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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-07-26 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
-+-
 Reporter:  nickm|  Owner:  andrea
 Type:  enhancement  | Status:
 Priority:  Medium   |  needs_review
Component:  Core Tor/Tor |  Milestone:  Tor:
 Severity:  Normal   |  0.2.9.x-final
 Keywords:  tor-dos, TorCoreTeam201606, review-  |Version:
  group-5| Resolution:
Parent ID:  #17293   |  Actual Points:  4
 Reviewer:  nickm| Points:  3
 |Sponsor:
 |  SponsorU-can
-+-

Comment (by nickm):

 https://gitlab.com/nickm_tor/tor/merge_requests/4/commits is a gitlab page
 for review here.  I'll make another note when I've done the review.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-07-02 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:  4
 Reviewer:  nickm   | Points:  3
|Sponsor:  SponsorU-can
+--
Changes (by nickm):

 * reviewer:   => nickm


--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-07-02 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:  4
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--
Changes (by andrea):

 * actualpoints:   => 4


--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-07-02 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--

Comment (by andrea):

 Version with unit tests in my ticket18640_v2_squashed_tests branch.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-07-01 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--

Comment (by andrea):

 Implementation of kill-orconns-with-fewest circuits now in my
 ticket18640_v2_squashed branch.  This is mostly plumbing and a simple sort
 heuristic; it'd be easy to modify it with more sophisticated selection.  I
 will now proceed with unit tests for it.  Currently, the easiest way to
 repro an OOS is to set a low ulimit and send many EXTENDCIRCUIT commands
 to the control port; ignore the instance of #19535 you'll see along the
 way; it's a pre-existing bug which doesn't impede demonstrating the OOS
 code.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-30 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--

Comment (by andrea):

 Testing note: empirically, the smallest ulimit -n I can get Tor to
 bootstrap with is 36, and it can be forced to create new connections with
 EXTENDCIRCUIT 0  at the control port.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-30 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--

Comment (by andrea):

 Right, thanks.  I already saw n_socket_open and queried it in a bunch of
 places where I call the OOS handler in connection.c.  Fresh version of
 plumbing without the redundant config variable in my
 ticket18640_v2_plumbing branch.

 For a handling heuristic, I'm thinking something like sort open orconns by
 number of circuits and kill the ones carrying the fewest until we're down
 to the target.

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-29 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--

Comment (by nickm):

 Did you see ConnLimit? It's very similar to MaxSockets, and it already
 ties into the rlimit infrastructure where available, I think.  See also
 the "n_sockets_open" counter in compat.c; that might help too?

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-27 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:  Tor:
Component:  Core Tor/Tor|  0.2.9.x-final
 Severity:  Normal  |Version:
 Keywords:  tor-dos, TorCoreTeam201606  | Resolution:
Parent ID:  #17293  |  Actual Points:
 Reviewer:  | Points:  3
|Sponsor:  SponsorU-can
+--
Changes (by nickm):

 * milestone:   => Tor: 0.2.9.x-final


--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-26 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  needs_review
 Priority:  Medium  |  Milestone:
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606  |  Actual Points:
Parent ID:  #17293  | Points:  3
 Reviewer:  |Sponsor:  SponsorU-can
+--
Changes (by andrea):

 * status:  assigned => needs_review


Comment:

 My ticket18640 branch now has basic plumbing to implement a MaxSockets
 config option and a stub connection_handle_oos() function called in the
 appropriate places.  Seeking design review on this approach while I work
 on the details of connection_handle_oos().

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-26 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
+--
 Reporter:  nickm   |  Owner:  andrea
 Type:  enhancement | Status:  assigned
 Priority:  Medium  |  Milestone:
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  tor-dos, TorCoreTeam201606  |  Actual Points:
Parent ID:  #17293  | Points:  3
 Reviewer:  |Sponsor:  SponsorU-can
+--

Comment (by andrea):

 Notes on handling OOS:

 Sockets probably account for most of the descriptor use in a running Tor
 process, but we should make the maximum socket count a little lower than
 the maximum number of descriptors so they can't block us from opening
 files.
 We'll need a heuristic to decide which connections are least harmful to
 kill analogous to OOM handling, but the first step is building plumbing
 to get a chance to run an OOS handler.

 Per compat.c, sockets are created (and the socket counter adjusted) in
 tor_socketpair() (AF_UNIX only), tor_open_socket() and
 tor_accept_socket(), and
 the _nonblocking/_with_extensions versions of those functions.

 Call sites:

  - tor_open_socket_nonblocking() called in three places, all in
 connection.c

- connection_listener_new() (2 call sites)
- connection_connect_sockaddr()

  - tor_accept_socket_nonblocking() called in one place, in
 connection_handle_listener_read()

  - open_socket() calls in src/ext/eventdns.c ?

  - get_n_open_sockets() returns counter

  - socket exhaustion can be detected by open/accept failing with
errno EMFILE, ENFILE, ENOBUFS, ENOMEM.

  - For testing purposes, we can artificially restrict number of
 descriptors
to trigger socket exhaustion using ulimit -n.

 We can build an OOS handler analogous to circuits_handle_oom called with
 current number of open sockets and an indicator of whether one just failed
 with one of the socket exhaustion related errnos from open_socket()/accept
 call sites.  It can then compare socket count against a new config setting
 parallel to the MaxMemInQueues setting the OOM handler relies on to decide
 if it needs to act.

  - How should we set the default of the number of sockets?  On Linux
getrlimit(RLIMIT_NOFILE) works, but what about elsewhere?

--
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] #18640 [Core Tor/Tor]: Use smarter algorithms to handle socket exhaustion

2016-06-06 Thread Tor Bug Tracker & Wiki
#18640: Use smarter algorithms to handle socket exhaustion
--+--
 Reporter:  nickm |  Owner:  andrea
 Type:  enhancement   | Status:  assigned
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  tor-dos   |  Actual Points:
Parent ID:  #17293| Points:  3
 Reviewer:|Sponsor:  SponsorU-can
--+--
Changes (by andrea):

 * status:  new => assigned
 * owner:   => andrea


Comment:

 Taking ownership for 0.2.9 triage

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