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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2023 Actions


    Problem Report Number 2023
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0596
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSTH version 5.1.2
    Test Identification PTHR.os/all/sigwait 5
    Problem Summary PG5TH.00003 This failures occurs because the parent process is not notified when the child is stopped. The parent is setting sa.flags = SA_NOCLDSTOP thus requesting not to be be notified with a SIGCHLD when the c...
    Problem Text
    This failures occurs because the parent process is not notified when the
    child is stopped. The parent is setting sa.flags = SA_NOCLDSTOP
    thus requesting not to be be notified with a SIGCHLD when the child is
    stopped. As a result, the parent never returns from waitpid because the
    child calls pthread_kill( pthread_self(), SIGSTOP );

    Here are the relevant code fragments:
    Look for: <<<<<<< HERE markers...

    ---------------------- parent code ------------------
    void
    t5_f2( int *errors, int *fails )




    {
    int rval;
    pid_t pid;
    struct sigaction sa;

    tet_infoline("Testing suspend and continue");

    rval = sigfillset( &sa.sa_mask );
    if ( rval != 0 )
    {
    vsth_surprise("sigfillset", 0, rval, errors);
    return;
    }

    sa.sa_flags = SA_NOCLDSTOP; <<<<< HERE
    sa.sa_handler = t5_sigchld;

    rval = sigaction( SIGCHLD, &sa, &T5_osa_chld );
    if ( rval != 0 )
    {
    vsth_surprise("sigaction SIGCONT", 0, rval, errors);
    return;
    }

    sa.sa_handler = t5_sigcont;
    rval = sigaction( SIGCONT, &sa, &T5_osa_cont );
    if ( rval != 0 )
    {
    vsth_surprise("sigaction SIGCONT", 0, rval, errors);
    return;
    }
    ------------------------- more parent code ----------------------------
    void
    t5_p2( pid_t pid, int *errors, int *fails )
    {

    int rval;
    pid_t wval;
    int status;

    wval = waitpid( pid, &status, WUNTRACED ); <<<<< HERE
    if ( wval == pid )
    {
    if ( WIFSTOPPED(status) )
    {
    rval = kill( pid, SIGCONT );
    if ( rval == 0 )
    {
    while ( wval = waitpid( pid, &status, 0 ) )
    {
    if ( wval == pid )




    {

    ----------------------- pthread in child code -------------------------------
    void *
    t5_t2( void *arg )
    {
    int rval;
    int nerrs;
    int nfails;
    void *tval;

    nerrs = 0;
    nfails = 0;
    tval = (void *) 1;

    rval = pthread_mutex_lock( &T5_mx );
    if ( rval == 0 )
    {

    ++T5_flag;

    rval = pthread_cond_signal( &T5_cv );
    if ( rval != 0 )
    {
    vsth_surprise("pthread_cond_signal", 0, rval, &nerrs);
    }

    rval = pthread_kill( pthread_self(), SIGSTOP ); <<<<< HERE
    if ( rval != 0 )
    {
    vsth_surprise("pthread_kill", 0, rval, &nerrs);
    }

    Test Output
    ************************************************************************
    /tset/PTHR.os/all/sigwait/T.sigwait 5 Failed

    Test Description:
    When a signal is delivered to a thread and the action of that signal
    specifies termination, stop, or continue,
    then the entire process shall be terminated, stopped or continued
    respectively.
    Posix Ref: Component SIGWAIT Assertion 9945-1:1996 3.3.8.2, 9945-1:1996
    3.3.1.2-5(A)^Ov$Error: format error in archive
    /tsuites/VSTH/vsth/MAN/tset/PTHR.os/all/sigwait/L.sigwait_t,
    could not extract file

    Test Information:
    When a signal is delivered to a thread and the action of
    that signal specifies termination, stop, or continue,
    then the entire process shall be terminated, stopped or
    continued respectively.
    Posix Ref: Component SIGWAIT
    Assertion 9945-1:1996 3.3.8.2, 9945-1:1996 3.3.1.2-5(A)
    Testing process termination
    Testing suspend and continue
    first waitpid unexpectedly failed, errno == 4

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

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We agree with the applicant that setting SA_NOCLDSTOP should ensure that
    a SIGCHLD is not generated for the parent process when the child process is
    stopped. However, waitpid() is required to report the status of children
    to the parent when a child is stopped irregardless of whether a SIGCHLD
    is generated.

    POSIX.1 1996, page 66, lines 368 .. 372 state:

    "WUNTRACED




    If the implementation supports job control, the status of any
    child processes specified by pid that are stopped, and whose
    status has not yet been reported since they stopped, shall also
    be reported to the requesting process."

    POSIX.1 does not state that this waitpid() behavior is conditional on the
    generation of a SIGCHLD to the parent when a child stops.

    We recommend that this request is refused.


    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