|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2030 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2030.
Report 2030 Actions
Problem Report Number 2030 Submitter's Classification Test Suite problem State Resolved Resolution Temporary Interpretation (TIN) Problem Resolution ID TIN.X.0091 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1998-03-03 08:00 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/pthread_key_create 5 Specification System Interfaces and Headers Issue 5 Location in Spec See Problem Text Problem Summary TIN5TH.00002 This test fails because it tries to create PTHREAD_KEY_MAX keys, to get the EGAIN error. However, on our implementation some system calls will use up keys, making it impossible for a user app to creat... Problem Text
This test fails because it tries to create PTHREAD_KEY_MAX
keys, to get the EGAIN error. However, on our implementation
some system calls will use up keys, making it impossible for
a user app to create PTHREAD_KEY_MAX keys. The total for the
process will be PTHREAD_KEY_MAX. As can be seen from the
output above our implemenation returns errno=11 which is
EAGAIN as required by the XPG5 spec.
TOG Commentary:
VSTH uses a configuration variable, VSTH_KEYS_USED, to define the
number of thread specific data keys used by the test scaffold and
implementation libraries. The test attempts to create a number of
keys defined by the value returned by a call to sysconf(_SC_THREAD_KEYS_MAX)
adjusted by the value of VSTH_KEYS_USED. In this case, the test
is unable to successfully create this number of keys but the implementation
correctly returns EAGAIN when pthread_key_create() fails.
We note that PTHREAD_KEYS_MAX is a possibly indeterminate value
as provided by POSIX.1 1996 and that system libraries may
use some portion of this per-process limit. We also note that
the number of keys so used may, in general, be non-deterministic
from an application point of view.
We also note than an implementation which claimed to provide a
maximum of 256 (for example) thread specific data keys but actually
could provide only 3 (to pick an extreme case) keys to an application
(the rest being used by system libraries, etc) could argue for a
waiver on an identical basis.
For an application to find utility in the ability to query the
maximum number of thread specific data keys available to it, the
value returned by a sysconf(_SC_THREAD_KEYS_MAX) or defined by
PTHREAD_KEYS_MAX should be a close approximation to the true value
available to the application prior to it's creation of any keys.
Because this implementation correctly returns EAGAIN when unable
to create another key and because the number of keys created is
close to the claimed value, we recommend that a TIN be allowed
and that a ruling from the base working group be sought regarding
the acceptable accuracy of the return value of
sysconf(_SC_THREAD_KEYS_MAX).Test Output
************************************************************************
/tset/PTHR.os/all/pthread_key_create/T.pthread_key_create 5
Unresolved
Test Description:
If the system-imposed limit on the number of keys per process defined
by PTHREAD_KEYS_MAX would be exceeded:
a call to pthread_key_create() shall fail and return a value of EAGAIN.
Posix Ref: Component PTHREAD_KEY_CREATE Assertion 9945-1:1996
17.1.1.4-5(C)
Test Information:
If the system-imposed limit on the number of keys per process
defined by PTHREAD_KEYS_MAX would be exceeded:
a call to pthread_key_create() shall fail and return
A value of EAGAIN.
Posix Ref: Component PTHREAD_KEY_CREATE
Assertion 9945-1:1996 17.1.1.4-5(C)
Maximum number of keys is 450
Unable to create key 440, rval == 11
Thread exitval, expected 0, got 1
************************************************************************Review Information
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Temporary Interpretation (TIN) Review Conclusion
A Temporary Interpretation is granted.
Problem Reporting System Options:
- View Report 2030
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority