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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2470 Actions


    Problem Report Number 2470
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0269
    Raised 2005-07-23 08:53
    Updated 2005-07-26 14:43
    Published 2005-07-26 14:43
    Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version VSX4.6.4
    Test Identification /tset/POSIX.os/procprim/sigconcept/T.sigconcept,35
    Specification Base Definitions Issue 6
    Location in Spec http://www.opengroup.org/onlinepubs/000095399/functions/
    xsh_chap02_04.html#tag_02_04
    Linked Problem Reports PR0327/PIN.X.0043
    Problem Summary We consistently see the read() and write() portion of the sigconcept
    test fail. We
    intermittently see open() and fcntl() portions of the sigconept test
    fail. These tests fail
    because operations in the kernel on behalf of a process are able to b
    Problem Text These tests fail because operations in the kernel, on behalf of a
    process, are able to be
    completed and run up to the system call boundary, even though the
    process itself is
    considered stopped.

    The tests assume that these operations cannot be completed, and because
    these operations
    are interruptible, they should fail with an EINTR and return -1 to
    indicate an interruption by a
    SIGCONT signal for which there is a signal handler established.

    Our kernel is designed to work on multiprocessor hardware and regards
    these operations as
    kernel work occurring on behalf of a process rather than work in the
    context of the process,
    therefore the operations are interruptible, but are in fact performed
    asynchronously, and
    therefore it's possible for them to complete on behalf of the process
    while the process itself
    is stopped.

    As an explanation, and taking the read() test failure as an example, the
    failure mode is for
    the test to fail with an ECHILD on the child process performing the
    read(). This happens due
    to the structure of the test, and the ECHILD is not from the read, but
    from an attempt to
    obtain the child process status after the child's read() has succeeded,
    and the child exited.
    The test is assuming that the read() has not completed, and therefore
    the child is available
    for the parent process to manipulate, but the parent has in fact already
    reaped the child.

    The operation of the test is to cause a process to perform a read() on
    an empty pipe. This
    read() blocks in the kernel, pending data availability on the pipe. A
    SIGTSTP is sent to the
    process, which is then stopped. Another process writes data to the
    pipe. ** At this point,
    our kernel completes the read() on behalf of the stopped process, and
    runs up to the system
    call boundary, but as the process is stopped, does not return to user
    space **. A SIGCONT is
    sent to the stopped process; the signal is caught. The process is
    continued as a
    consequence of the SIGCONT, and because the read() was in fact
    satisfied, runs to
    completion. As the test attempts to recover from what it assumes is a
    failed read() in the
    process, a system call involved in the recovery attempt receives an
    unexpected ECHILD, and
    the test terminates in failure.


    In our kernel, most system call operations are processed asynchronously
    to permit the level
    of concurrency necessary to efficient multiprocessor operation.

    We think this is an area outside the scope of the standard, and that a
    waiver should be
    granted for the following reasons:

    i) In no place does the standard define interactions between kernel
    activities and a stopped
    process status.

    ii) In no place does the standard require the kernel to internally
    implement completion of the
    read(), write(), open(), or fcntl() operations synchronously.

    iii) In no place does the standard define which kernel operations may or
    may not be carried
    out asynchronously on behalf of a process.

    The tests for read() and write() consistently fail on our kernel when
    run on multiprocessor
    hardware, and consistently pass on our kernel when run on multiprocessor
    hardware with all
    but one CPU disabled. Additionally, we see intermittent failures in
    open() and fcntl(); these
    are difficult to reproduce, and we have been unable to provide test
    results that fail all four
    operations simultaneously. We would ask any interpretation apply to
    those interfaces as
    well.
    Test Output /tset/POSIX.os/procprim/sigconcept/T.sigconcept 35 Failed
    Test Description:
    For PSE52 test mode:
    Not in use.
    For other test modes:
    If _POSIX_JOB_CONTROL is defined, when any of the functions
    fcntl(), open(), pause(), read(), sleep(), sigsuspend(),
    tcdrain(),
    wait(), waitpid(), and write() are stopped by the delivery of a
    signal whose action is to stop the process, the subsequent
    generation of a SIGCONT signal that is being caught by a signal
    catching function shall cause the process to continue after
    returning from the signal catching function with the function
    reporting that it has been interrupted by the SIGCONT signal.
    Posix Ref: Component Signal Concepts Assertion 3.3.1.4-48(C)
    Posix Ref: Component Signal Concepts Assertion 3.3.1.4-49(C:D)

    Test Strategy:
    FOR each of the test functions tcdrain(), fcntl(), sleep(), pause(),
    sigsuspend(), read(), write(), open(), wait(), waitpid():
    IF terminal output is buffered or not testing tcdrain
    FORK a child process
    CHILD process:
    CREATE new process group using setpgid(0,0)
    SET the SIGCONT signal action to signal catching function
    SET the SIGSTOP signal action to SIG_DFL
    IF testing wait() or waitpid()
    FORK a child process which sleeps for 2.5 * WAITTIME
    CALL the test function
    PARENT process:
    SET alarm for time WAITTIME
    WAIT for the child process to obtain the child status
    VERIFY the child process is active
    SEND the SIGSTOP signal to the child process
    SLEEP for WAITTIME
    WAIT for the child process to obtain the child status
    VERIFY the child process stopped
    CALL a variable function dependent on the test function which
    will cause the test function to continue after SIGCONT is
    received
    SEND the SIGCONT signal to the child process
    CHILD process:
    VERIFY that test function returned an error with errno set to
    EINTR
    IF testing wait() or waitpid()
    KILL the child process waited for
    EXIT
    PARENT process:
    WAIT for the child process to obtain the child status
    VERIFY the child process exited

    Test Information:
    function reported no interruption by stopping or SIGCONT signal
    read() returned 1 errno 10, should return -1 errno 4
    function reported no interruption by stopping or SIGCONT signal
    write() returned 1 errno 35, should return -1 errno 4
    function reported no interruption by stopping or SIGCONT signal
    open() returned 8 errno 10, should return -1 errno 4

    ************************************************************************
    /tset/POSIX.os/procprim/sigconcept/T.sigconcept 35 Failed

    Test Description:
    For PSE52 test mode:
    Not in use.
    For other test modes:
    If _POSIX_JOB_CONTROL is defined, when any of the functions
    fcntl(), open(), pause(), read(), sleep(), sigsuspend(),
    tcdrain(),
    wait(), waitpid(), and write() are stopped by the delivery
    of a
    signal whose action is to stop the process, the subsequent
    generation of a SIGCONT signal that is being caught by a
    signal
    catching function shall cause the process to continue after
    returning from the signal catching function with the function
    reporting that it has been interrupted by the SIGCONT signal.
    Posix Ref: Component Signal Concepts Assertion 3.3.1.4-48(C)
    Posix Ref: Component Signal Concepts Assertion 3.3.1.4-49(C:D)

    Test Strategy:
    FOR each of the test functions tcdrain(), fcntl(), sleep(),
    pause(),
    sigsuspend(), read(), write(), open(), wait(), waitpid():
    IF terminal output is buffered or not testing tcdrain
    FORK a child process
    CHILD process:
    CREATE new process group using setpgid(0,0)
    SET the SIGCONT signal action to signal catching function
    SET the SIGSTOP signal action to SIG_DFL
    IF testing wait() or waitpid()
    FORK a child process which sleeps for 2.5 * WAITTIME
    CALL the test function
    PARENT process:
    SET alarm for time WAITTIME
    WAIT for the child process to obtain the child status
    VERIFY the child process is active
    SEND the SIGSTOP signal to the child process
    SLEEP for WAITTIME
    WAIT for the child process to obtain the child status
    VERIFY the child process stopped
    CALL a variable function dependent on the test function
    which
    will cause the test function to continue after SIGCONT is
    received
    SEND the SIGCONT signal to the child process
    CHILD process:
    VERIFY that test function returned an error with errno
    set to
    EINTR
    IF testing wait() or waitpid()
    KILL the child process waited for
    KILL the child process waited for
    EXIT
    PARENT process:
    WAIT for the child process to obtain the child status
    VERIFY the child process exited

    Test Information:
    function reported no interruption by stopping or SIGCONT signal
    fcntl() returned 0 errno 10, should return -1 errno 4
    function reported no interruption by stopping or SIGCONT signal
    read() returned 1 errno 10, should return -1 errno 4
    function reported no interruption by stopping or SIGCONT signal
    write() returned 1 errno 35, should return -1 errno 4
    function reported no interruption by stopping or SIGCONT signal
    open() returned 8 errno 10, should return -1 errno 4


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

    Review Information

    Review Type SA Review
    Start Date 2005-07-23 08:53
    Last Updated 2005-07-26 14:41
    Completed 2005-07-26 14:41
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion This is the same issue for which PIN.X.0043 was granted for XPG4. A
    permanent interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority