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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1355 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 1355.


Report 1355 Actions


    Problem Report Number 1355
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0637
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1997-02-06 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.1
    Test Identification base/waitid 1
    Problem Summary TSD4U.00180 This test may fail on implementations where the child is scheduled before the parent.
    Problem Text
    This test may fail on implementations where the child is scheduled before
    the parent.

    We believe that a timing problem in waitid test #1 causes the test to fail
    intermittently.

    The test forks a child, which loops to waste time, and sleeps to waste a speci-
    fic amount of time. After accomplishing this, it exits.

    In the meantime, the parent does a time() to record the starting time in seconds
    seconds since the Epoch. It then does a waitid(), which blocks, waiting for the
    child to exit. When it unblocks, the ending time is recorded and the delta
    calculated. The test fails unless the delta time is greater than the sleep time
    done by the child.

    While this appears perfectly logical on the surface, on some systems, due to the
    vagaries of scheduling, this test occasionally fails. We believe this occurs
    when the child runs before the parent, finishes the 200K loop, and starts sleep-
    ing prior to the scheduling of the parent and the execution of the first call
    to time(). Under this scenario, the exit in the child would occur before the
    the waitid() blocked for SLEEP_TIME seconds.


    Graphically:

    Child Parent

    200K loop Wait Queue
    | |
    T | |
    I Start of Sleep |
    M | |
    E | Parent Schedules & Runs
    | | time(1)
    | | waitid()
    | | |
    | End of Sleep |
    | | |
    V Child Exits waitid() Returns
    | time(2)
    | |
    o o


    In the situation depicted, time2-time1 would yield a value less than SLEEP_TIME
    because time(1) would have occurred after the start of the sleep.

    This scenario is similar to the one sometimes seen for sigpause 1, which was
    addressed in a different SR. While the test generates PASSes the vast majority
    of the time, it does fail occasionally -- we believe when the parent doesn't
    run before the child.
    Test Output
    TEST CASE: waitid

    TEST PURPOSE #1
    A successful call to int waitid(idtype_t idtype, id_t
    id, siginfo_t *infop, int options) when idtype is
    P_PID and the child process with process ID equal to
    id has not changed state prior to the call shall
    suspend the calling process until this process changes
    state and shall then place the current state of this
    process in the structure pointed to by infop with the
    si_signo member equal to SIGCHLD and return 0.
    PREP: fork() a child that eats up some time
    PREP: waitid() called with P_PID set
    TEST: Calling process waited for child to change state
    ERROR: waitid() did not wait for child to change state. Expected 2 second wait,
    Received 1 second wait
    TEST: SIGCHLD in si_signo
    TEST: waitid() returned 0
    1 FAIL

    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