New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 877167 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug
Proj-Servicification



Sign in to add a comment

Extensions TCP Socket API error out on reading 0 byte

Project Member Reported by xunji...@chromium.org, Aug 23

Issue description

internal bug: 110354086 

On receiving 0 byte from the network, network::TCPConnectedSocket::ShutdownReceive closes the producer side of the receive pipe. When this happens, MojoDataPump::ReceiveMore
will get result != MOJO_RESULT_OK and invoke the read callback with net::ERR_FAILED.

This broke a CrOS app that uses the TCP socket API.

The fix is to not error out when mojo pipe is closed, and consider all read errors to be connection close.

 
This API is regressed in bff8e3ea6d0d7c1f1fe045f595ffaeaf64ff41f9
Labels: Proj-Servicification-Canary OS-Chrome
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37e44dbf60a0fb7bd98acb9be976209c51ab4561

commit 37e44dbf60a0fb7bd98acb9be976209c51ab4561
Author: Helen Li <xunjieli@chromium.org>
Date: Fri Aug 24 21:24:32 2018

Extensions TCP socket API. Do not error out on EOF

On receiving 0 byte from the network,
network::TCPConnectedSocket::ShutdownReceive closes the producer side of the
receive pipe. When this happens, MojoDataPump::ReceiveMore
will get result != MOJO_RESULT_OK and invoke the read callback with
net::ERR_FAILED.

This broke a CrOS app that uses the TCP socket API.

The fix is to not error out when mojo pipe is closed, and consider all read
errors to be connection close.

BUG= 877167 

Change-Id: I9ec8eb58110b3f255d8ef380f111eec278797fcb
Reviewed-on: https://chromium-review.googlesource.com/1187076
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Helen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585995}
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/chrome/browser/extensions/api/socket/tcp_socket_unittest.cc
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/chrome/browser/extensions/api/socket/tls_socket_unittest.cc
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/chrome/test/data/extensions/api_test/socket/api/background.js
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/mojo_data_pump.cc
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/mojo_data_pump_unittest.cc
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/tcp_socket.cc
[modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/tls_socket.cc

Status: Fixed (was: Started)

Sign in to add a comment