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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2411 Actions


    Problem Report Number 2411
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0661
    Raised 2004-08-03 02:48
    Updated 2004-08-24 21:34
    Published 2004-08-24 21:34
    Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSART version 1.1.4
    Test Identification all tests in POSIX_art.os/synchobjects_spinlocks
    Specification Base Definitions Issue 6
    Location in Spec SUSv3 TC2 lines 36390 - 36449
    Problem Summary spin lock objects not cleared before initial use in spin lock tests
    Problem Text On our system an error of 16 is EBUSY, this error is coming from
    pthread_spin_init() on the initial attempt to use the spin lock object.
    The
    spin lock tests do not clear the allocated storage for the spin lock
    object prior to the initial use. The SUSv3 TC2 states the following in
    pthread_init():

    36415 The results are undefined if pthread_spin_init( ) is called
    specifying an already initialized spin
    36416 lock. The results are undefined if a spin lock is used without
    first being initialized.

    36425 ERRORS
    36426 These functions may fail if:

    36427 [EBUSY] The implementation has detected an attempt to initialize or
    destroy a spin
    36428 lock while it is in use (for example, while being used in a
    pthread_spin_lock( )
    36429 call) by another thread.


    It is clear from these statements that an implementation is expected to be
    able to check the spin lock object to determine if it has already been
    initialized. Without clearing the spin lock object prior to calling
    pthread_spin_init(), it is possible(and probably likely) that garbage in
    the
    spin lock object can fool pthread_spin_init() into thinking it is dealing
    with an already initialized spin lock object.
    Test Output
    ************************************************************************
    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_destroy/T.pthread
    _spin_destroy 1 Unresolved

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    pthread_spin_destroy(lock) destroys the spin lock
    referenced by lock , releases any resources used by
    the lock and returns zero.

    Test Information:
    pthread_spin_init() failed, error == 16


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

    ************************************************************************
    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_destroy/T.pthread
    _spin_destroy 3 Unresolved

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    When the value specified by lock is invalid and the
    implementation detects this, then
    pthread_spin_destroy(lock) returns EINVAL.

    Test Information:
    pthread_spin_init() failed, error == 16


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

    ************************************************************************
    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_init/T.pthread_sp
    in_init 1 Failed

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    pthread_spin_init(lock, pshared) allocates any
    resources required to use the spin lock referenced
    by lock , initializes the lock to an unlocked state
    and returns zero.

    Test Information:
    pthread_spin_init() failed, error == 16


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

    ************************************************************************
    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_lock/T.pthread_sp
    in_lock 4 Unresolved

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    When the value specified by lock is invalid and the
    implementation detects this, then
    pthread_spin_lock(lock) returns EINVAL.

    Test Information:
    pthread_spin_init() failed, error == 16


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

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

    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_trylock/T.pthread
    _spin_trylock 3 Unresolved

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    When the calling thread already holds the lock for
    lock , then pthread_spin_trylock(lock) returns
    EBUSY.

    Test Information:
    pthread_spin_init() failed, error == 16


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

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

    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_trylock/T.pthread
    _spin_trylock 4 Unresolved

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    When the value specified by lock is invalid and the
    implementation detects this, then
    pthread_spin_trylock(lock) returns EINVAL.

    Test Information:
    pthread_spin_init() failed, error == 16


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

    ************************************************************************
    /tset/POSIX_art.os/synchobjects_spinlocks/pthread_spin_unlock/T.pthread_
    spin_unlock 1 Unresolved

    Test Description:
    If {_POSIX_SPIN_LOCKS} is defined:
    When the spin lock referenced by lock is held by
    the calling thread, then pthread_spin_unlock(lock)
    releases the lock and returns zero.

    Test Information:
    pthread_spin_init() failed, error == 16


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

    Review Information

    Review Type TSMA Review
    Start Date 2004-08-03 02:48
    Last Updated 2004-08-03 20:17
    Completed 2004-08-03 20:17
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response SUSv3 states "The results are undefined if pthread_spin_init() is
    called specifying an already initialized spin lock". So it allows
    undefined behaviour if the spin lock was already initialised.
    However, in the test code the spin lock has NOT already been
    initialised before calling pthread_spin_init().

    If an implementor wishes to have pthread_spin_init() check that the
    spin lock has not already been initialised, then it must be done in a
    way that cannot accidentally be triggered when an uninitialised spin
    lock is passed to pthread_spin_init(). The standard does not require
    applications to perform any kind of pre-initialisation of the
    spin_lock object before calling pthread_spin_init().

    Review Type SA Review
    Start Date 2004-08-03 19:17
    Last Updated 2004-08-03 23:36
    Completed 2004-08-03 23:36
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion SUSv3 states "The results are undefined if pthread_spin_init() is
    called specifying an already initialized spin lock". So it allows
    undefined behaviour if the spin lock was already initialised.
    However, in the test code the spin lock has NOT already been
    initialised before calling pthread_spin_init().

    If an implementor wishes to have pthread_spin_init() check that the
    spin lock has not already been initialised, then it must be done in a
    way that cannot accidentally be triggered when an uninitialised spin
    lock is passed to pthread_spin_init(). The standard does not require
    applications to perform any kind of pre-initialisation of the
    spin_lock object before calling pthread_spin_init().

    The standard uses similar words about using pthread_mutex_init,
    pthread_cond_init and other pthread_*_init functions on an already
    initialized object as it does about the function in question
    (pthread_spin_init). We therefore recommend that this Problem Report
    request is refused.

    The submitter has requested a 14 day review by the expert working group.

    Review Type Expert Group Review
    Start Date 2004-08-03 22:36
    Last Updated 2004-08-24 21:31
    Completed 2004-08-24 21:31
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion The Base Working Group agrees with the consultant's response.
    This request should be refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority