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

Issue 1855653002: net: Rewrite TestWebServer shutdown to avoid deadlock (Closed)

Created:
4 years, 8 months ago by boliu
Modified:
4 years, 8 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

net: Rewrite TestWebServer shutdown to avoid deadlock Android's URLConnection implementation can cause a deadlock in shutdown. See bug for details. Rewrite shutdown by just dropping existing requests on the server, and join the thread. The server thread can be blocked on either the server socket or the request socket. Need to ensure that both are closed without races for shutdown to avoid deadlocks. BUG=600021 Committed: https://crrev.com/0b612120ae81e866ff66061ff9fee9d2cae87645 Cr-Commit-Position: refs/heads/master@{#387501}

Patch Set 1 #

Patch Set 2 : close request socket #

Total comments: 2

Patch Set 3 : ignore ioexception #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -44 lines) Patch
M net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java View 1 2 7 chunks +37 lines, -44 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
boliu
ptal
4 years, 8 months ago (2016-04-02 00:35:42 UTC) #2
boliu
Wait.. this CL is not yet ready. I can still reproduce a hang. Remove reviewer ...
4 years, 8 months ago (2016-04-02 01:00:02 UTC) #3
boliu
Ok, ready this time. PTAL
4 years, 8 months ago (2016-04-11 20:45:21 UTC) #8
Paweł Hajdan Jr.
Could you get review from someone more familiar with Java and this code? I can ...
4 years, 8 months ago (2016-04-12 20:42:30 UTC) #9
boliu
On 2016/04/12 20:42:30, Paweł Hajdan Jr. wrote: > Could you get review from someone more ...
4 years, 8 months ago (2016-04-12 20:48:57 UTC) #11
hush (inactive)
Just making sure: are you running the tests infinitely over night to make sure there ...
4 years, 8 months ago (2016-04-12 22:01:25 UTC) #12
boliu
On 2016/04/12 22:01:25, hush wrote: > Just making sure: are you running the tests infinitely ...
4 years, 8 months ago (2016-04-12 22:02:04 UTC) #13
boliu
On 2016/04/12 22:02:04, boliu wrote: > On 2016/04/12 22:01:25, hush wrote: > > Just making ...
4 years, 8 months ago (2016-04-13 15:19:15 UTC) #14
hush (inactive)
lgtm https://codereview.chromium.org/1855653002/diff/20001/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java File net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java (right): https://codereview.chromium.org/1855653002/diff/20001/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java#newcode627 net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java:627: if (mCurrentRequestSocket != null) { It is possible ...
4 years, 8 months ago (2016-04-14 17:57:36 UTC) #15
Paweł Hajdan Jr.
LGTM
4 years, 8 months ago (2016-04-14 21:18:48 UTC) #16
boliu
https://codereview.chromium.org/1855653002/diff/20001/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java File net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java (right): https://codereview.chromium.org/1855653002/diff/20001/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java#newcode627 net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java:627: if (mCurrentRequestSocket != null) { On 2016/04/14 17:57:36, hush ...
4 years, 8 months ago (2016-04-14 21:58:43 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1855653002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1855653002/40001
4 years, 8 months ago (2016-04-14 21:59:44 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/51120) linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, ...
4 years, 8 months ago (2016-04-14 22:11:38 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1855653002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1855653002/40001
4 years, 8 months ago (2016-04-15 00:14:28 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-15 00:59:58 UTC) #26
commit-bot: I haz the power
4 years, 8 months ago (2016-04-15 01:02:20 UTC) #28
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0b612120ae81e866ff66061ff9fee9d2cae87645
Cr-Commit-Position: refs/heads/master@{#387501}

Powered by Google App Engine
This is Rietveld 408576698