summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortkent <tkent@chromium.org>2015-03-24 21:40:10 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-25 04:40:59 +0000
commit5eab51f762a444966a1914cd15de196ee0d801a9 (patch)
treea0b5c6a43115a1ca9e8cbf2a7cee49c7e9d2d517
parent55116befde714e1af631ada42ed8f31f17f0ed12 (diff)
downloadchromium_src-5eab51f762a444966a1914cd15de196ee0d801a9.zip
chromium_src-5eab51f762a444966a1914cd15de196ee0d801a9.tar.gz
chromium_src-5eab51f762a444966a1914cd15de196ee0d801a9.tar.bz2
Revert of ChannelMojo: Let MessagePipeReader wait "peer closed" signal as well. (patchset #2 id:20001 of https://codereview.chromium.org/1023043002/)
Reason for revert: speculative revert for "Too many open files" on various Mac bots. e.g. http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.9/builds/17511/steps/webkit_tests/logs/stdio Original issue's description: > ChannelMojo: Let MessagePipeReader wait "peer closed" signal as well. > > This CL adds MOJO_SIGNAL_PEER_CLOSED for the MessagePipeReader's > waiting bits. Without this, PRECONDITION_FAILED error can be notified > at the end of the channel lifetime, and the browser process misinterprets > it as a renderer crash, which results sadface screen. > > This rarely happens and is reproduced only with some underpowered CPU > with excessive pressure. So we cannot have any reliable test. > > BUG=466814 > R=viettrungluu@chromium.org > > Committed: https://crrev.com/29d88220e88d21deaf6856b7ded300fa06ab94d3 > Cr-Commit-Position: refs/heads/master@{#322094} TBR=viettrungluu@chromium.org,morrita@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=466814 Review URL: https://codereview.chromium.org/1035633002 Cr-Commit-Position: refs/heads/master@{#322112}
-rw-r--r--ipc/mojo/ipc_message_pipe_reader.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/ipc/mojo/ipc_message_pipe_reader.cc b/ipc/mojo/ipc_message_pipe_reader.cc
index d40d6e2..61b36f6 100644
--- a/ipc/mojo/ipc_message_pipe_reader.cc
+++ b/ipc/mojo/ipc_message_pipe_reader.cc
@@ -161,9 +161,8 @@ void MessagePipeReader::ReadMessagesThenWait() {
// If can fail with |MOJO_RESULT_ALREADY_EXISTS| otherwise.
// Also, we don't use MOJO_HANDLE_SIGNAL_WRITABLE here, expecting buffer in
// MessagePipe.
- MojoResult result = async_waiter_->Wait(
- pipe_.get().value(),
- MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED);
+ MojoResult result =
+ async_waiter_->Wait(pipe_.get().value(), MOJO_HANDLE_SIGNAL_READABLE);
// If the result is |MOJO_RESULT_ALREADY_EXISTS|, there could be messages
// that have been arrived after the last |ReadAvailableMessages()|.
// We have to consume then and retry in that case.
@@ -181,9 +180,13 @@ void MessagePipeReader::ReadMessagesThenWait() {
void MessagePipeReader::PipeIsReady(MojoResult wait_result) {
if (wait_result != MOJO_RESULT_OK) {
- CHECK_NE(wait_result, MOJO_RESULT_ABORTED);
- LOG(ERROR) << "Pipe got error from the waiter. Closing: " << wait_result;
- OnPipeError(wait_result);
+ if (wait_result != MOJO_RESULT_ABORTED) {
+ // FAILED_PRECONDITION happens every time the peer is dead so
+ // it isn't worth polluting the log message.
+ LOG_IF(WARNING, wait_result != MOJO_RESULT_FAILED_PRECONDITION)
+ << "Pipe got error from the waiter. Closing: " << wait_result;
+ OnPipeError(wait_result);
+ }
Close();
return;