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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1155 Actions


    Problem Report Number 1155
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0357
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.0
    Test Identification Base/sigaction 14,19
    Problem Summary PG4U.00113 This request asks for rulings on 2 separate issues at once. It is refuesed since an interpretation may only deal with a single issue.
    Problem Text
    Both of these tests are highly timing dependent and as a result may fail on an
    intermittent basis.

    In both sigaction #14 and sigaction #19, the tests set up the action for the
    SIGCHLD signal. In the case of sigaction #14, the test sets the signal handler
    to SIG_DFL and also sets the SA_NOCLDWAIT flag. For sigaction #19, the signal
    handler is set to SIG_IGN.

    After calling sigaction(), the tests fork a child that exits and then fork a
    child that sleeps. In all except for the first test case in sigaction #14
    (wait()), this sleep is for 1 second. The tests then call time(&time1), then
    one of wait(), waitpid(), wait3(), or waitid() expecting a return of -1 and
    errno set to ECHILD. The tests then call time(&time2), expecting that
    time2-time1 >= 1. If the value returned is less than one, the tests fail on
    the assumption that the wait function under test did not block.

    The sleep(1) in the child does not guarantee that the parent will have time to
    block for a full second. The calls to the wait() functions are returning the
    expected results, however depending on what the scheduler does, the timing can
    fall on either side of the tested time interval. Increasing the sleep time
    will more likely guarantee that the assertion under test will not be subject
    to implementation specific timing/scheduling differences. The real problem
    however, is that as the tests are currently written, there is a race condition
    between the parent and child and as such there is no guarantee that the
    the call time(&time1) will occur before the sleep(). A way to guarantee that
    this will occur is to move the first call to time() to before the call to
    fork().
    Test Output
    TEST CASE: sigaction

    TEST PURPOSE #14
    After a call to int sigaction(int sig, const struct
    sigaction *act, struct sigaction *oact) when
    SA_NOCLDWAIT is set in the sa_flags member of the
    structure pointed to by act and sig is SIGCHLD, if the
    calling process subsequently waits for its children
    and the process has no unwaited for children that were
    transformed into zombie processes it shall block until
    all its children terminate, and wait(), wait3(),
    waitid(), and waitpid() shall fail and set errno to
    ECHLD.
    PREP: Set up action for SIGCHLD
    PREP: fork() a child that exits
    PREP: fork() a child that sleeps
    TEST: wait() returns -1 and errno = ECHILD
    TEST: wait() blocks until child exits
    PREP: fork() a child that sleeps
    TEST: waitpid() returns -1 and errno = ECHILD
    TEST: waitpid() blocks until child exits
    PREP: fork() a child that sleeps
    TEST: wait3() returns -1 and errno = ECHILD
    TEST: wait3() blocks until child exits
    PREP: fork() a child that sleeps
    TEST: waitid() returns -1 and errno = ECHILD
    TEST: waitid() blocks until child exits
    ERROR: waitid() did not block
    14 FAIL

    TEST PURPOSE #19
    After a call to int sigaction(int sig, const struct
    sigaction *act, struct sigaction *oact) when the
    action for SIGCHLD is set to SIG_IGN if the calling
    process subsequently waits for its children and the
    process has no unwaited for children that were
    transformed into zombie processes it shall block until
    all its children terminate, and wait(), wait3(),
    waitid(), and waitpid() shall fail and set errno to
    ECHILD.
    PREP: Set SIG_IGN for SIGCHLD
    PREP: fork() a child that exits
    PREP: fork() a child that sleeps
    TEST: wait() returns -1 and errno = ECHILD
    TEST: wait() blocks until child exits
    PREP: fork() a child that sleeps
    TEST: waitpid() returns -1 and errno = ECHILD
    TEST: waitpid() blocks until child exits
    PREP: fork() a child that sleeps
    TEST: wait3() returns -1 and errno = ECHILD
    TEST: wait3() blocks until child exits
    ERROR: wait3() did not block
    PREP: fork() a child that sleeps
    TEST: waitid() returns -1 and errno = ECHILD
    TEST: waitid() blocks until child exits
    19 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this request be refused since the submitter is
    asking for rulings on 2 separate issues at once.

    We suggest the submitter file 2 new IRs; one for each issue.

    At that time we will recommend a TSD for the sleep issue.

    But we will recommend that the race condition issue be rejected.
    We believe the test should work as long as the time() precedes
    the wait*(). Whether the time() precedes the start of the
    sleep() or occurs while the child is sleeping should not matter.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion
    This request is refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority