Opened 8 months ago

Closed 7 months ago

#5216 closed defect (fixed)

IOFetchTest failures

Reported by: wlodekwencel Owned by: stephen
Priority: medium Milestone: Kea1.2-final
Component: Unclassified Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Jenkins report:
https://jenkins.isc.org/job/Kea-multiconfig-build/138/testReport/

Tests like:

  • IOFetchTest.TcpSendReceive2
  • IOFetchTest.TcpSendReceive3
  • IOFetchTest.TcpSendReceive15
  • IOFetchTest.TcpSendReceive16
  • IOFetchTest.TcpSendReceive17
  • IOFetchTest.TcpSendReceive31
  • IOFetchTest.TcpSendReceive32
  • IOFetchTest.TcpSendReceive33
  • IOFetchTest.TcpSendReceive4096
  • IOFetchTest.TcpSendReceive8192
  • IOFetchTest.TcpSendReceive16384
  • IOFetchTest.TcpSendReceive32768
  • IOFetchTest.TcpSendReceive65535
  • TCPSocket.sequenceTest
  • TCPAcceptorTest.asyncAccept
  • TCPAcceptorTest.close

OS: Debian 7 amd64
CONF: ./configure --with-gtest-source=/opt/googletest --with-log4cplus=/opt/log4cplus --disable-silent-rules --with-werror=no --with-boost-include=/opt/boost/include --with-boost-libs-dir=/opt/boost
BOOST: 1.63
Test report: https://jenkins.isc.org/job/Kea-multiconfig-build/138/BOOST=boost,WERROR=--with-werror=no,slaves=debian7-amd64-1/testReport/
Console output: https://jenkins.isc.org/job/Kea-multiconfig-build/138/BOOST=boost,WERROR=--with-werror=no,slaves=debian7-amd64-1/console

OS: debian 7 amd64
CONF: ./configure --with-gtest-source=/opt/googletest --with-log4cplus=/opt/log4cplus --disable-silent-rules --with-werror=no --with-boost-include=/opt/boost158/include --with-boost-libs-dir=/opt/boost158
BOOST: 1.58
Test report: https://jenkins.isc.org/job/Kea-multiconfig-build/138/BOOST=boost158,WERROR=--with-werror=no,slaves=debian7-amd64-1/testReport/
Console output: https://jenkins.isc.org/job/Kea-multiconfig-build/138/BOOST=boost158,WERROR=--with-werror=no,slaves=debian7-amd64-1/console

OS: ubuntu 12.04.5 i686
CONF: ./configure --with-gtest-source=/opt/googletest --with-log4cplus=/opt/log4cplus --disable-silent-rules --with-werror=no --with-boost-include=/opt/boost/include --with-boost-libs-dir=/opt/boost158
BOOST: 1.63
Test report: https://jenkins.isc.org/job/Kea-multiconfig-build/138/BOOST=boost,WERROR=--with-werror=no,slaves=ubuntu12-i686-1/testReport/
Console output: https://jenkins.isc.org/job/Kea-multiconfig-build/138/BOOST=boost,WERROR=--with-werror=no,slaves=ubuntu12-i686-1/consoleFull

Subtickets

Change History (9)

comment:1 Changed 8 months ago by wlodekwencel

  • Milestone changed from Kea-proposed to Kea1.2-final

comment:2 Changed 7 months ago by stephen

Some observations:

IOFetchTest: all the failures in the these test appear to be due to the receive operation timing out. (The gtest assertion error comes from the test's fetch callback function, IOFetchTest::operator(). The expected value of the status code passed as argument is 0 (success) but the received status is 1 (timeout).) Note that the "SendReceive" tests which failed are followed by the "ShortSend" tests that passed: these tests expect a timeout status to be passed to the callback.

TCPAcceptorTest::asyncAccept: this creates ten connections then runs the IO Service until they have been accepted. However, the test appears to end early, which can happen if an error or timeout occurred. What is odd is that the test reports that connections_num_ is zero but connections_.size() is 1. connections_num_ is altered in TcpAcceptorTest::acceptHandler (in tcp_acceptor_unittest.cc), whereas connections_size() is altered in the call to TcpAcceptorTest::accept (which is called by acceptHandler). However, connections_num_ is always incremented, although it is possible that accept() is not called.

TCPSocket::sequenceTest: this fails because the I/O completion code for opening the socket is non-zero. The value returned is 115 which appears to be the code EINPROGRESS:

The socket is nonblocking and the connection cannot be completed
immediately. It is possible to select(2) or poll(2) for comple-
tion by selecting the socket for writing. After select(2) indi-
cates writability, use getsockopt(2) to read the SO_ERROR option
at level SOL_SOCKET to determine whether connect() completed
successfully (SO_ERROR is zero) or unsuccessfully (SO_ERROR is
one of the usual error codes listed here, explaining the reason
for the failure).

comment:3 Changed 7 months ago by marcin

The issues with !TCPAcceptor and the !TCPSocket::sequenceTest have been addressed with #5217.

comment:4 Changed 7 months ago by marcin

  • Owner set to marcin
  • Status changed from new to accepted

comment:5 Changed 7 months ago by marcin

  • Owner changed from marcin to UnAssigned
  • Status changed from accepted to reviewing

The same fix applies here as in case of #5217.

Proposed ChangeLog:

12XX.	[bug]		marcin
	Corrected IOFetch unit test failures on Debian.
	(Trac #5216, git abcd)

comment:6 Changed 7 months ago by stephen

  • Owner changed from UnAssigned to stephen

comment:7 Changed 7 months ago by wlodekwencel

Tested on jenkins, fix works for debian systems

comment:8 Changed 7 months ago by stephen

Reviewed commit d1ae2bffa1bdee348befe9cc8416940208aed30d

All OK, please merge.

comment:9 Changed 7 months ago by marcin

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged with commit a7c2946678c43aedfb2e3c37b9730a10067528f3

Note: See TracTickets for help on using tickets.