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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1551 Actions


    Problem Report Number 1551
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0833
    Raised 2000-09-25 08:00
    Updated 2003-03-13 08:00
    Published 2000-10-04 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.1.1
    Test Identification CAPI.os/procprim/sigaction 39
    Problem Summary TSD4U.00294 The test fails on systems which generate a SIGCHLD when a handler for the signal is installed and an unwaited-for terminated process exists.
    Problem Text
    Test fails because it does not anticipate all places where
    SIGCHILD can be generated.

    Additional Commentary:

    First: note from a previous waiver request.

    From Waiver Number: PIN4U.00038, granted on November 14, 1996.

    "The question of if a SIGCHLD should be generated when the parent sets up
    a signal handler with SA_NOCLDWAIT set is unspecified in the X/Open
    specification."


    The XSH4v2 specification does not specify when a SIGCHLD signal is
    to be generated. When a signal handler for SIGCHILD is set by a call
    to sigaction and the process has a child process that is a zombie
    and SA_NOCLDWAIT has not been specified our implementation
    sends a SIGCHLD, which is allowed by the Single UNIX Specification (SUS).

    From the X/Open CAE Specification for system interface

    "If a process establishes a signal-catching function for the SIGCHILD signal
    while it has a terminated child process for which it has not waited,
    it is unspecified whether a SIGCHLD signal is generated to indicate
    that child process."

    Thus if a signal handler is redefined and there are still zombies present
    there is a good possibility of a second signal being sent. The test is
    testing for the absence of core files for certain signal numbers. The
    test does not compensate for unspecified but allowed side affects of SIGCHLD.

    Test 39C is susceptible to a failure unrelated to the purpose of the test.
    This is because the test does not reap any zombie child processes before
    looping to test the next signal. The previous version of the test,
    was not susceptible to this failure on some systems because the test
    set SA_NOCLDWAIT. It no longer does so because of the previous waiver.

    To allow for the unspecified side affects, the test should be changed so
    no unexpected zombies are present before the call to sigaction. the
    test could be changed to do the following.

    Insert a waitpid() at the end of the loop, so that zombies are
    cleaned up before sigaction() is again called. Warning: The
    program must handle EINTR from the wait call:


    int stat_loc;

    do{
    rc = waitpid(ExpPid, &stat_loc,0);
    } while (rc == -1 && errno == EINTR);


    With the change, the test accomplishes it's purpose, and any unspecified
    side affects are nullified.

    Test Output
    ************************************************************************
    /tset/CAPI.os/procprim/sigaction/T.sigaction 39 Failed

    Test Description:
    Base Conditional Conformance
    If the implementation supports a signal which causes abnormal
    termination but does not cause the generation of a core file:
    After a call to int sigaction(int sig, const struct sigaction *act,
    struct sigaction *oact) with SA_SIGINFO set in the sa_flags member of
    the sigaction structure pointed to by act and sig equal to SIGCHLD, on
    entry to the signal catching function specified by the sa_sigaction
    member when the child terminated abnormally with a signal does not
    cause generation of a core file the si_code member of the structure
    pointed to by the siginfo argument shall contain CLD_KILLED, the
    si_pid member shall contain the child process ID, the si_status member
    shall contain the child's signal, the si_uid member shall contain the
    real user ID of the process that sent the signal and a core file shall
    not be present.

    Test Information:
    PREP: Set up action for SIGCHLD
    PREP: fork() a child that ends abnormally
    PREP: generate SIGALRM from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGALRM
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGKILL
    ERROR: si_status incorrect. Expected SIGKILL,Received SIGALRM
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGKILL from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGKILL
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGHUP
    ERROR: si_status incorrect. Expected SIGHUP,Received SIGKILL
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGHUP from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGHUP
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGINT
    ERROR: si_status incorrect. Expected SIGINT,Received SIGHUP
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGINT from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGINT
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGPIPE
    ERROR: si_status incorrect. Expected SIGPIPE,Received SIGINT
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGPIPE from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGPIPE
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGTERM
    ERROR: si_status incorrect. Expected SIGTERM,Received SIGPIPE
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGTERM from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGTERM
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGUSR1
    ERROR: si_status incorrect. Expected SIGUSR1,Received SIGTERM
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGUSR1 from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGUSR1
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGUSR2
    ERROR: si_status incorrect. Expected SIGUSR2,Received SIGUSR1
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGUSR2 from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGUSR2
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGPOLL
    ERROR: si_status incorrect. Expected SIGPOLL,Received SIGUSR2
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGPOLL from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGPOLL
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGPROF
    ERROR: si_status incorrect. Expected SIGPROF,Received SIGPOLL
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGPROF from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGPROF
    TEST: Core file is NOT present
    PREP: Set up action for SIGCHLD
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGVTALRM
    ERROR: si_status incorrect. Expected SIGVTALRM,Received SIGPROF
    TEST: Core file is NOT present
    PREP: fork() a child that ends abnormally
    PREP: generate SIGVTALRM from child
    TEST: signal = SIGCHLD
    TEST: si_code = CLD_KILLED
    TEST: si_status = SIGVTALRM
    TEST: Core file is NOT present

    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is accepted as a fault in the test suite.

    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