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

Issue 841180 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 2
Type: Bug-Regression



Sign in to add a comment

TCPSocketTest.CancelPendingReadIfReady consistently fails under Fuchsia/x64/FYI bot

Project Member Reported by w...@chromium.org, May 9 2018

Issue description

This fails 100% of the time, e.g. https://ci.chromium.org/buildbot/chromium.fyi/Fuchsia/17123 has:

6707/30565] TCPSocketTest.DestroyWithPendingWrite (302 ms)
[ RUN      ] TCPSocketTest.CancelPendingReadIfReady
../../net/socket/tcp_socket_unittest.cc:583: Failure
Expected equality of these values:
  msg_size
    Which is: 6
  read_callback2.GetResult(read_result)
    Which is: 0
Stack trace:
#00: testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) at gtest.cc:?
#01: testing::internal::AssertHelper::operator=(testing::Message const&) const at gtest.cc:?
#02: net::(anonymous namespace)::TCPSocketTest_CancelPendingReadIfReady_Test::TestBody() at tcp_socket_unittest.cc:?

[  FAILED  ] TCPSocketTest.CancelPendingReadIfReady (68 ms)


The test appears to have been failing since it was added by https://chromium-review.googlesource.com/c/chromium/src/+/1050025.
 

Comment 1 by w...@chromium.org, May 9 2018

Test is failing due to a zero-byte result from ReadIfReady() at the end of the test.

Running the test under Linux I notice that that call completes synchronously, whereas under Fuchsia we get an ERR_IO_PENDING, and then the zero-bytes result from GetResult().

Comment 2 by w...@chromium.org, May 9 2018

I am able to trivially repro the same failure under Linux as under Fuchsia, if I swap the order of the write and ReadIfReady calls. Looking at the ReadIfReady() API comments, the test just doesn't cope correctly with this API's ERR_IO_PENDING semantics.

Comment 3 by w...@chromium.org, May 9 2018

Cc: xunji...@chromium.org
Owner: w...@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, May 9 2018

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

commit 1c67dcbe6e22b3111346f19cbf0c5cc5764a9b8c
Author: Wez <wez@chromium.org>
Date: Wed May 09 10:48:34 2018

Fix ReadIfReady() calls in new CancelPendingReadIfReady test.

ReadIfReady() either completes synchronously, or notifies the caller
when it should be called again, rather than completing asynchronously.

Bug:  841180 
TBR: xunjieli
Change-Id: I70258381380feea49279cb81a7f285f2b1d11f01
Reviewed-on: https://chromium-review.googlesource.com/1051447
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557140}
[modify] https://crrev.com/1c67dcbe6e22b3111346f19cbf0c5cc5764a9b8c/net/socket/tcp_socket_unittest.cc

Comment 5 by w...@chromium.org, May 9 2018

Status: Fixed (was: Started)

Sign in to add a comment