Chromium Code Reviews

Issue 1616153007: Stay writable after partial socket writes. (Closed)

Created:
4 years, 11 months ago by joachim
Modified:
4 years, 10 months ago
Reviewers:
pthatcher1
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Stay writable after partial socket writes. This CL fixes an issue where the "writable" flag didn't stay set after ::send or ::sendto only sent a partial buffer. Also SocketTest::TcpInternal has been updated to use rtc::Buffer instead of manually allocating data. BUG=webrtc:4898 Committed: https://crrev.com/f2a2bf4ae448dff45974a7f38f8db005f643f3a3 Cr-Commit-Position: refs/heads/master@{#11480}

Patch Set 1 #

Patch Set 2 : Removed unnecessary cast. #

Patch Set 3 : Fixed compiler error about signed/unsigned comparison. #

Total comments: 32

Patch Set 4 : Feedback from Peter. #

Total comments: 2

Patch Set 5 : Tentative fix for Mac. #

Total comments: 6

Patch Set 6 : More feedback. #

Unified diffs Side-by-side diffs Stats (+194 lines, -85 lines)
M webrtc/base/physicalsocketserver.h View 2 chunks +9 lines, -2 lines 0 comments
M webrtc/base/physicalsocketserver.cc View 5 chunks +20 lines, -5 lines 0 comments
M webrtc/base/physicalsocketserver_unittest.cc View 5 chunks +78 lines, -7 lines 0 comments
M webrtc/base/socket_unittest.h View 2 chunks +4 lines, -1 line 0 comments
M webrtc/base/socket_unittest.cc View 5 chunks +83 lines, -70 lines 0 comments

Messages

Total messages: 33 (11 generated)
joachim
Ptal, this is another fix for async socket event handling.
4 years, 11 months ago (2016-01-22 23:49:08 UTC) #2
joachim
On 2016/01/22 23:49:08, joachim wrote: > Ptal, this is another fix for async socket event ...
4 years, 10 months ago (2016-01-28 22:47:25 UTC) #3
pthatcher1
It all looks very good, except that I'd like to make the unit test a ...
4 years, 10 months ago (2016-01-30 00:03:10 UTC) #4
joachim
Thanks for your detailed feedback. Please see my replies to your comments for further clarifications ...
4 years, 10 months ago (2016-01-31 23:29:07 UTC) #6
pthatcher1
lgtm https://codereview.webrtc.org/1616153007/diff/60001/webrtc/base/socket_unittest.cc File webrtc/base/socket_unittest.cc (right): https://codereview.webrtc.org/1616153007/diff/60001/webrtc/base/socket_unittest.cc#newcode788 webrtc/base/socket_unittest.cc:788: EXPECT_EQ(0, memcmp(recv_buffer.data(), send_buffer.data(), data_size)); Doesn't EXPECT_EQ(recv_buffer, send_buffer) work?
4 years, 10 months ago (2016-02-01 20:27:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616153007/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616153007/60001
4 years, 10 months ago (2016-02-01 20:27:24 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: mac_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/mac_rel/builds/12451)
4 years, 10 months ago (2016-02-01 20:40:50 UTC) #11
joachim
Ptal at the test changes that fix the failures on Mac https://codereview.webrtc.org/1616153007/diff/60001/webrtc/base/socket_unittest.cc File webrtc/base/socket_unittest.cc (right): ...
4 years, 10 months ago (2016-02-01 21:39:53 UTC) #12
pthatcher1
Can you make just a few more readability tweaks? One for the new line of ...
4 years, 10 months ago (2016-02-02 18:25:39 UTC) #13
joachim
All changed. https://codereview.webrtc.org/1616153007/diff/80001/webrtc/base/socket_unittest.cc File webrtc/base/socket_unittest.cc (right): https://codereview.webrtc.org/1616153007/diff/80001/webrtc/base/socket_unittest.cc#newcode724 webrtc/base/socket_unittest.cc:724: int unsent_count = static_cast<int>(send_buffer.size() - sent_size); On ...
4 years, 10 months ago (2016-02-03 18:44:23 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616153007/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616153007/100001
4 years, 10 months ago (2016-02-03 21:06:37 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_x64_gn_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_x64_gn_dbg/builds/6849)
4 years, 10 months ago (2016-02-03 21:11:19 UTC) #18
pthatcher1
lgtm
4 years, 10 months ago (2016-02-03 22:38:32 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616153007/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616153007/100001
4 years, 10 months ago (2016-02-03 22:38:49 UTC) #21
pthatcher1
lgtm Land if it's urgent, but please follow up with a unit test.
4 years, 10 months ago (2016-02-03 22:40:03 UTC) #22
pthatcher1
On 2016/02/03 22:40:03, pthatcher1 wrote: > lgtm > > Land if it's urgent, but please ...
4 years, 10 months ago (2016-02-03 22:40:50 UTC) #23
joachim
On 2016/02/03 22:40:50, pthatcher1 wrote: > On 2016/02/03 22:40:03, pthatcher1 wrote: > > lgtm > ...
4 years, 10 months ago (2016-02-03 22:41:36 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL) linux_baremetal on ...
4 years, 10 months ago (2016-02-03 23:06:51 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616153007/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616153007/100001
4 years, 10 months ago (2016-02-04 00:36:04 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-04 00:45:35 UTC) #30
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/f2a2bf4ae448dff45974a7f38f8db005f643f3a3 Cr-Commit-Position: refs/heads/master@{#11480}
4 years, 10 months ago (2016-02-04 00:45:48 UTC) #32
ivoc
4 years, 10 months ago (2016-02-05 15:18:47 UTC) #33
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.webrtc.org/1670213002/ by ivoc@webrtc.org.

The reason for reverting is: This is suspected to cause the race conditions that
Linux Tsan v2 started detecting recently. Revert to see if the race conditions
go away..

Powered by Google App Engine