TCPSocketTest.IsConnected fails on iOS 11 device |
||||||
Issue description[ RUN ] TCPSocketTest.IsConnected ../../net/socket/tcp_socket_unittest.cc:642: Failure Value of: connecting_socket.IsConnectedAndIdle() Actual: true Expected: false Stack trace: 0 net_unittests 0x0000000104a37b88 base::debug::StackTrace::StackTrace() + 56 1 net_unittests 0x0000000103ec4b04 StackTraceGetter::CurrentStackTrace(int, int) + 64 2 net_unittests 0x0000000103ecd490 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) + 76 3 net_unittests 0x0000000103eccf4c testing::internal::AssertHelper::operator=(testing::Message const&) const + 184 4 net_unittests 0x0000000102aa19b0 net::(anonymous namespace)::TCPSocketTest_IsConnected_Test::TestBody() + 4416 [ FAILED ] TCPSocketTest.IsConnected (26 ms)
,
Jan 16
(6 days ago)
lindsayw@ could you PTAL and triage if necessary
,
Jan 16
(6 days ago)
I don't think that Lindsay is the right owner for this. Net team does own bug triage and we should let them triage this bug.
,
Jan 17
(5 days ago)
This is a new test added when wez@ fixed SocketPosix::IsConnected() pre-Connect() behaviour for Fuchsia. wez@, can you take a look? Is the added test for fuchsia only?
,
Jan 17
(5 days ago)
Related chromium changeļ¼ https://chromium-review.googlesource.com/c/chromium/src/+/1407505 if that helps.
,
Jan 17
(5 days ago)
Re #4/#5: This is a cross-platform test that IsConnected() and IsConnectedAndIdle() have the correct behaviour on all of our platforms; while investigating issues with a test that incidentally used IsConnected() failing under Fuchsia, we realised that there was no existing test coverage of the APIs. The test is failing at https://cs.chromium.org/chromium/src/net/socket/tcp_socket_unittest.cc?l=648 under iOS, which indicates that the TCPClientSocket is reporting the connection as "idle" (i.e. no data ready to read) when it should not be. I'm not sure how the stack works on iOS, but perhaps the write to the "accept" end of the socket is not _immediately_ causing the "connecting" end to be readable, and so that
,
Jan 17
(5 days ago)
... cause it to do the check before it's actually readable?
,
Jan 18
(5 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d174213df2f194c4abaf857a71b8f2d93d782922 commit d174213df2f194c4abaf857a71b8f2d93d782922 Author: Wez <wez@chromium.org> Date: Fri Jan 18 02:50:46 2019 Ensure test socket is readable before IsConnectedAndIdle check. The IsConnected test writes a byte to a loopback socket, to verify that that it is then correctly treated as not "idle". Since the test did not actually block until the underlying platform socket was signalled as readable, the test was flaky. Add a call to select() to wait for the write to cause the receive side to be readable, before testing expectations. Bug: 921852 Change-Id: I424fc33e430f25846eb9505d134fe1ee893ce6e5 Reviewed-on: https://chromium-review.googlesource.com/c/1419577 Commit-Queue: Ryan Hamilton <rch@chromium.org> Reviewed-by: Ryan Hamilton <rch@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Auto-Submit: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#623972} [modify] https://crrev.com/d174213df2f194c4abaf857a71b8f2d93d782922/net/socket/tcp_socket_unittest.cc
,
Jan 18
(5 days ago)
Tentatively closing this out - please re-open if you see evidence of continued flakiness. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bugdroid1@chromium.org
, Jan 16