Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Issue 137923004: Revert "Revert 235213 "android: forwader2: Simplify Forwarder implementa..."" (Closed)

Created:
6 years, 11 months ago by Philippe
Modified:
6 years, 11 months ago
Reviewers:
bulach, digit1
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

Revert "Revert 235213 "android: forwader2: Simplify Forwarder implementa..."" This relands digit@'s CL that completely reworks the traffic forwarding logic and that should guarantee in particular that select() never blocks without a good reason (i.e. that we are not leaking Forwarder instances due to the fact that their internal thread would be blocked on select()). The initial problem with r235213 was only the use of PipeNotifier which added two file descriptors for each Forwarder instance (in addition to the two sockets the Forwarder instance operates on). We were exceeding the file descriptor limit (1024) on the intl_ko_th_vi Telemetry page set which is not surprising since Chrome easily keeps 256 sockets around in its socket pool. Therefore this change simply removes the PipeNotifier since we were not (yet) using it anyway. The initial problem was reproduced and the fix was tested as well with: tools/perf/run_measurement -v --browser=android-chromium-testshell \ --show-stdout page_cycler tools/perf/page_sets/intl_ko_th_vi.json Note that a next step would be to have all the Forwarder instances operate on a common thread owned by DeviceListener so that we don't end up with 256 threads. BUG=332403 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245144

Patch Set 1 : Original CL #

Patch Set 2 : Fix original CL by removing usage of PipeNotifier #

Total comments: 3

Patch Set 3 : Add DCHECK() in SetPeer() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -82 lines) Patch
M tools/android/forwarder2/forwarder.h View 1 chunk +0 lines, -1 line 0 comments Download
M tools/android/forwarder2/forwarder.cc View 1 2 4 chunks +189 lines, -58 lines 0 comments Download
M tools/android/forwarder2/socket.h View 2 chunks +2 lines, -5 lines 0 comments Download
M tools/android/forwarder2/socket.cc View 2 chunks +0 lines, -18 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Philippe
6 years, 11 months ago (2014-01-14 09:45:31 UTC) #1
digit1
lgtm No wonder we couldn't find the 'bug' easily. It's a bit sad to let ...
6 years, 11 months ago (2014-01-14 10:44:59 UTC) #2
Philippe
Thanks David! I will add the notifier back (but a shared one this time) once ...
6 years, 11 months ago (2014-01-14 10:51:44 UTC) #3
Philippe
JFYI Marcus, I'm waiting for you now :) On Tue, Jan 14, 2014 at 11:51 ...
6 years, 11 months ago (2014-01-14 10:52:24 UTC) #4
bulach
lgtm, thanks! small suggestions, feel free to ignore. https://codereview.chromium.org/137923004/diff/110001/tools/android/forwarder2/forwarder.cc File tools/android/forwarder2/forwarder.cc (right): https://codereview.chromium.org/137923004/diff/110001/tools/android/forwarder2/forwarder.cc#newcode47 tools/android/forwarder2/forwarder.cc:47: // ...
6 years, 11 months ago (2014-01-14 14:15:01 UTC) #5
digit1
They're not really exceptions. T02 happens when the forwarder is waiting for data and the ...
6 years, 11 months ago (2014-01-14 14:33:00 UTC) #6
Philippe
Thanks guys! https://codereview.chromium.org/137923004/diff/110001/tools/android/forwarder2/forwarder.cc File tools/android/forwarder2/forwarder.cc (right): https://codereview.chromium.org/137923004/diff/110001/tools/android/forwarder2/forwarder.cc#newcode80 tools/android/forwarder2/forwarder.cc:80: void SetPeer(BufferedCopier* peer) { peer_ = peer; ...
6 years, 11 months ago (2014-01-14 14:50:57 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/137923004/240001
6 years, 11 months ago (2014-01-14 14:52:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/137923004/240001
6 years, 11 months ago (2014-01-14 23:50:04 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/137923004/240001
6 years, 11 months ago (2014-01-15 04:39:14 UTC) #10
commit-bot: I haz the power
6 years, 11 months ago (2014-01-16 05:37:38 UTC) #11
Message was sent while issue was closed.
Change committed as 245144

Powered by Google App Engine
This is Rietveld 408576698