HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1378 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1378.


Report 1378 Actions


    Problem Report Number 1378
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0660
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1996-09-18 08:00
    Product Standard Sockets (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.0
    Test Identification Sockets/connect 3,5,8
    Problem Summary TSD4U.00157 This test may fail on implementations where the algorithm for checking a blocked connect does not check within time window allotted.
    Problem Text
    The above tests fail because they do not wait long enough for connect()
    to complete.

    The tests wait between 5 and 12 seconds in various places where it instead
    should wait as long as VSU_CONNECT_TIMEOUT. The test suite problems occur
    when the listen queue has overflowed and the client tries to establish a TCP
    connection. In these cases there is no hard limit on the amount of time it
    will take until the connection is established, yet the test suite assumes
    that a wait or alarm for between 5 and 12 seconds is sufficient.

    The X/Open CAE specification, Networking Services, Issue 4 for connect()
    only specifies that "connect() will block for up to an unspecified timeout
    interval until the connection is established." The specification does not
    state any other time limit for connection establishment.

    Thus either the test suite needs a separate configuration variable to capture
    the maximum time it takes for a connection to be established when the listen
    queue has been full (due to the listen() backlog having been been exceeded),
    and becomes non-full, or the test suite needs to base the wait and alarm times
    on the already existing VSU_CONNECT_TIMEOUT configuration variable.

    The reason these tests are failing in our implementation is that we use the
    values recommended in Internet RFC-1122 "Requirements for Internet Hosts --
    Communication Layers" (http://ds.internic.net/rfc/rfc1122.txt) in section
    4.2.3.1 for the initial retransmission timeout. This is 3 seconds.

    When the listen queue is full on the peer, the TCP SYN segments are silently
    discarded. This causes the TCP to retransmit the SYN segments using binary
    exponential backoff for the retransmit timer as specified in RFC-1122 and
    RFC-793. Thus the first retransmission will occur after 3 seconds, the
    second retransmission after 6 additional seconds, the third after 12 more
    seconds, etc. Depending on when the peer calls accept to make the listen
    queue non-full it might take a lot longer than 5 seconds until the next
    time a SYN will be retransmitted and the connection is established.

    Note that some implementations might have an upper bound on the retransmit
    timer (such as 60 seconds) which will ensure that the connection completes
    under that time limit after the listen queue becomes non-full. However, for
    other implementations the only upper limit might be the connection establishment
    time limit (i.e. VSU_CONNECT_TIMEOUT).

    We would recommend increasing the relevant timeouts from between 5 and 12
    seconds to either a new implementation dependent configuration variable value
    or changing the tests to use VSU_CONNECT_TIMEOUT for these timeout values.

    Using VSU 4.1.0D as a base for comparison, the diff that follows indicates
    those areas where we have confirmed the wait period or alarm is too short.

    <72>: diff fconnect1.c_4.1.0D fconnect1.c
    832c832
    < SET_ALARM(DELAY+10);
    ---
    > SET_ALARM(DELAY+30);
    1714c1714
    < SET_ALARM(5);
    ---
    > SET_ALARM(30);
    1883c1883
    < s2 = WAIT_EVENT(CHILD_DONE);
    --
    < s2 = WAIT_EVENTN(CHILD_DONE, 30);
    3538c3538
    < s2 = WAIT_EVENT(CHILD_DONE);
    ---
    < s2 = WAIT_EVENTN(CHILD_DONE, 30);
    <73>:
    Test Output
    TEST CASE: connect

    TEST PURPOSE #3
    If the implementation supports a communications domain
    and a connection-oriented socket type:
    A call to int connect(int socket, const struct
    sockaddr *address, size_t address_len) when the
    connection cannot be immediately established and
    O_NONBLOCK is not set for socket shall block until the
    connection is established or a timeout elapses.
    PREP: Get VSU_CONNECT_TIMEOUT configuration variable
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 129.146.86.131, port = 3189
    PREP: Create three sockets
    PREP: Wait for child to be ready
    PREP: Connect twice to fill queue
    PREP: Notify child to delay and then accept
    TEST: connect blocks until connection accepted
    ERROR: connect failed, errno = 4(EINTR - Interrupted system call)
    PREP: Child: create socket
    PREP: Child: bind to socket
    PREP: Child: listen on socket with backlog of 2
    PREP: Child: tell parent ready
    PREP: Child: wait for parent to become ready
    PREP: Child: delay
    PREP: Child: accept queued connections
    PREP: Child: accept connection from blocking connect
    3 FAIL

    TEST PURPOSE #5
    If the implementation supports a communications domain
    and a connection-oriented socket type:
    A call to int connect(int socket, const struct
    sockaddr *address, size_t address_len) when blocking
    is interrupted by a signal shall set errno to EINTR,
    return -1, and establish the connection asynchronously.
    PREP: Get VSU_CONNECT_TIMEOUT configuration variable
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 129.146.86.131, port = 1233
    PREP: Create three sockets
    PREP: Wait for child to be ready
    PREP: Connect twice to fill queue
    EST: connect blocks until interrupted
    TEST: Duration of blocking
    PREP: Notify child to accept
    TEST: Await notification connections completed
    ERROR: Timed out waiting for completion.
    PREP: Child: create socket
    PREP: Child: bind to socket
    PREP: Child: listen on socket with backlog of 2
    PREP: Child: tell parent ready
    PREP: Child: wait for parent to become ready
    PREP: Child: accept queued connections
    PREP: Child: accept connection being asynchronously established
    ERROR: accept failed, errno = 4(EINTR - Interrupted system call)
    5 UNRESOLVED

    TEST PURPOSE #8
    If the implementation supports a communications domain
    and a connection-oriented socket type:
    After a connection is asynchronously established due
    to a call to int connect(int socket, const struct
    sockaddr *address, size_t address_len) select() and
    poll() shall indicate socket is ready for writing.
    PREP: Get VSU_CONNECT_TIMEOUT configuration variable
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 129.146.86.131, port = 4433
    PREP: Create three sockets
    PREP: Wait for child to be ready
    PREP: Connect twice to fill queue
    PREP: Set O_NONBLOCK
    TEST: connect returns with EINPROGRESS
    PREP: Notify child to accept
    TEST: Await notification connections completed
    ERROR: Timed out waiting for completion.
    PREP: Child: create socket
    PREP: Child: bind to socket
    PREP: Child: listen on socket with backlog of 2
    PREP: Child: tell parent ready
    PREP: Child: wait for parent to become ready
    PREP: Child: accept queued connections
    PREP: Child: accept connection being asynchronously established
    8 UNRESOLVED

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We agree this is a test suite deficiency in the test
    suite version(s) listed.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed Test Suite Deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority