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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2417 Actions


    Problem Report Number 2417
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1252
    Raised 2004-08-26 22:50
    Updated 2004-09-01 19:50
    Published 2004-09-01 19:50
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.2.4
    Test Identification CAPI.os/procprim/sigaction/T.sigaction 13
    Problem Summary Race conditon can cause CAPI.os/procprim/sigaction/T.sigaction{13} to fail.
    Problem Text For test CAPI.os/procprim/sigaction/T.sigaction{13}, a race condition
    can occur that will cause the test to intermittently fail.

    We show the timing issues involved by modifying the sigaction{13}
    code as follow
    s:

    -------------------
    ......
    sleep(5);

    tet_infoline("TEST: getpgid() returns ESRCH for child");
    errno=0;
    if (getpgid(pid) != -1) {
    tet_infoline("ERROR: Child process still exists");
    tet_infoline("VWM: Before setting TET_FAIL issue getpgid(pid) again");
    if (getpgid(pid) == -1) {
    tet_infoline("VWM: ok this time it did return -1");
    }
    else {
    tet_infoline("VWM: **ERROR** child process STILL exists");
    }
    tet_result(TET_FAIL);
    } else if (errno != ESRCH) {
    uwerrno("getpgid");
    return;
    }
    tet_result(TET_PASS);
    }
    -------------------

    We ran this modified sigaction{13} five consecutive times and
    obtained the attached output showing a run with three PASSes and two
    FAILs that immediately reissued getpgid() and did not find the child PID.

    Here are the Journal results:

    10|0 /tset/CAPI.os/procprim/sigaction/T.sigaction 10:48:03|TC Start,
    scenario ref 1-0, ICs: {13}
    15|0 3.6-lite 1|TCM Start
    400|0 13 1 10:48:03|IC Start
    200|0 13 10:48:03|TP Start
    520|0 13 00016842814 1 1|PREP: Set up action for SIGCHLD
    520|0 13 00016842814 1 2|PREP: fork() a child that does nothing but exit
    520|0 13 00016842814 2 1|TEST: getpgid() returns ESRCH for child
    220|0 13 0 10:48:03|PASS
    410|0 13 1 10:48:03|IC End
    80|0 0 10:48:04|TC End, scenario ref 1-0

    10|1 /tset/CAPI.os/procprim/sigaction/T.sigaction 10:48:04|TC Start,
    scenario ref 2-0, ICs: {13}
    15|1 3.6-lite 1|TCM Start
    400|1 13 1 10:48:04|IC Start
    200|1 13 10:48:04|TP Start
    520|1 13 00050397246 1 1|PREP: Set up action for SIGCHLD
    520|1 13 00050397246 1 2|PREP: fork() a child that does nothing but exit
    520|1 13 00050397246 2 1|TEST: getpgid() returns ESRCH for child
    520|1 13 00050397246 2 2|ERROR: Child process still exists
    520|1 13 00050397246 2 3|VWM: Before setting TET_FAIL issue getpgid(pid)
    again
    520|1 13 00050397246 2 4|VWM: ok this time it did return -1
    220|1 13 1 10:48:04|FAIL
    410|1 13 1 10:48:04|IC End
    80|1 0 10:48:05|TC End, scenario ref 2-0
    10|2 /tset/CAPI.os/procprim/sigaction/T.sigaction 10:48:05|TC Start,
    scenario ref 3-0, ICs: {13}
    15|2 3.6-lite 1|TCM Start
    400|2 13 1 10:48:05|IC Start
    200|2 13 10:48:05|TP Start
    520|2 13 00067174462 1 1|PREP: Set up action for SIGCHLD
    520|2 13 00067174462 1 2|PREP: fork() a child that does nothing but exit
    520|2 13 00067174462 2 1|TEST: getpgid() returns ESRCH for child
    520|2 13 00067174462 2 2|ERROR: Child process still exists
    520|2 13 00067174462 2 3|VWM: Before setting TET_FAIL issue getpgid(pid)
    again
    520|2 13 00067174462 2 4|VWM: ok this time it did return -1
    220|2 13 1 10:48:05|FAIL
    410|2 13 1 10:48:05|IC End
    80|2 0 10:48:06|TC End, scenario ref 3-0
    10|3 /tset/CAPI.os/procprim/sigaction/T.sigaction 10:48:06|TC Start,
    scenario ref 4-0, ICs: {13}
    15|3 3.6-lite 1|TCM Start
    400|3 13 1 10:48:06|IC Start
    200|3 13 10:48:06|TP Start
    520|3 13 00083951678 1 1|PREP: Set up action for SIGCHLD
    520|3 13 00083951678 1 2|PREP: fork() a child that does nothing but exit
    520|3 13 00083951678 2 1|TEST: getpgid() returns ESRCH for child
    220|3 13 0 10:48:06|PASS
    410|3 13 1 10:48:06|IC End
    80|3 0 10:48:07|TC End, scenario ref 4-0
    10|4 /tset/CAPI.os/procprim/sigaction/T.sigaction 10:48:07|TC Start,
    scenario ref 5-0, ICs: {13}
    15|4 3.6-lite 1|TCM Start
    400|4 13 1 10:48:07|IC Start
    200|4 13 10:48:07|TP Start
    520|4 13 00050397313 1 1|PREP: Set up action for SIGCHLD
    520|4 13 00050397313 1 2|PREP: fork() a child that does nothing but exit
    520|4 13 00050397313 2 1|TEST: getpgid() returns ESRCH for child
    220|4 13 0 10:48:07|PASS
    410|4 13 1 10:48:07|IC End
    80|4 0 10:48:08|TC End, scenario ref 5-0
    900|10:48:08|TCC End
    Test Output 10|1 /tset/CAPI.os/procprim/sigaction/T.sigaction 10:48:04|TC Start,
    scenario ref 2-0, ICs: {13}
    15|1 3.6-lite 1|TCM Start
    400|1 13 1 10:48:04|IC Start
    200|1 13 10:48:04|TP Start
    520|1 13 00050397246 1 1|PREP: Set up action for SIGCHLD
    520|1 13 00050397246 1 2|PREP: fork() a child that does nothing but exit
    520|1 13 00050397246 2 1|TEST: getpgid() returns ESRCH for child
    520|1 13 00050397246 2 2|ERROR: Child process still exists
    220|1 13 1 10:48:04|FAIL
    410|1 13 1 10:48:04|IC End
    80|1 0 10:48:05|TC End, scenario ref 2-0

    Review Information

    Review Type TSMA Review
    Start Date 2004-08-26 22:50
    Last Updated 2004-08-31 20:56
    Completed 2004-08-31 20:56
    Status Complete
    Review Recommendation Test Suite Deficiency (TSD)
    Review Response The race condition occurs if the sleep(5) is interrupted by a SIGCHLD
    signal. The test should be modified to allow for this by calling
    sleep() a second time if the first call is interrupted.

    Review Type SA Review
    Start Date 2004-08-31 19:56
    Last Updated 2004-09-01 00:33
    Completed 2004-09-01 00:33
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion This PR represents an agreed test suite deficiency

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority