|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1369 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 1369.
Report 1369 Actions
Problem Report Number 1369 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0651 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1996-11-22 08:00 Product Standard Internationalised System Calls and Libraries Extended (UNIX 95) Certification Program The Open Brand certification program Test Suite VSU version 4.1.1 Test Identification Base/sigpause 1 Problem Summary TSD4U.00166 This test may fail intermittently on slow implementations. Problem Text
We believe that a timing problem in sigpause test #1 causes the test to fail
intermittently on slow machines.
In fsigpause1.c, Test1A loops through a defined set of signals, testing
sigpause for each. Sigpause is tested by forking a child, which performs
some setup operations, saves the time since the epoch in seconds, issues a
sigpause(), and waits for the parent process to issue a signal to end the
pause. When sigpause returns, the child compares the current time to the
time saved before the call to sigpause. If the difference is less than one
second, the test fails.
The parent and child processes are coordinated via POST_EVENT and WAIT_EVENT.
The parent waits for the coordinating semaphore event, sleeps one second, and
sends the signal to the child to end the sigpause. The test assumes that the
sleep(1) ensures that the clock will advance one second, which will show up
in the difference between time2 and time1.
We believe this assumption to be false. There is no guarantee that the parent
or child will be scheduled in any particular order or manner following returns
from WAIT_EVENT and POST_EVENT. For example, if the parent returns from
WAIT_EVENT and is scheduled to run prior to the child, there should be no
expectation that the child will run before the parent begins its sleep or, for
that matter, before it ends its sleep and sends the signal. Because of this,
there is no guarantee that the calls to time() in the child will occur in a
manner that ensures that one second will elapse between the first call to
time() and the generation of the signal in the parent.
For instance:
Child Parent
POST_EVENT WAIT_EVENT
| |
T | Scheduled after WAIT_EVENT
I | |
M | Starts sleep(1)
E | |
| Schedules after POST_EVENT |
| | |
V Gets time1 |
| |
Calls sigpause() |
| |
| Sends signal
| |
Wakes |
| |
Gets time2 o
|
o
In the scenario diagrammed above, the parent schedules before the child, which
causes it to sleep before the child records time1. This causes the signal
sent by the parent to be generated before sigpause has a chance to rest for
a full second.
Practically speaking, the child usually runs quickly enough for the test to
pass on fast machines. On slower machines, however, this isn't always the
case.
In order to increase the likelihood of the timing cycle in the child coinciding
with the sleep in the parent, we suggest increasing the length of the sleep by
by one. When we did this, we found the extra second allowed the child to be
scheduled in time to pause at least a second, even on a slow, heavily-loaded
system. Please note that while we have inductive evidence that the suggested
change makes the problem less likely to occur, the change does not fix the
test and may not work on some systems.Test Output
TEST PURPOSE #1
A successful call to int sigpause(int sig) shall
remove sig from the calling process's signal mask,
suspend the calling process until it receives a
signal, then return -1, and set errno to EINTR.
PREP: Fork child to test sig=6 (SIGABRT)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=14 (SIGALRM)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=18 (SIGCHLD)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=25 (SIGCONT)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=8 (SIGFPE)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=1 (SIGHUP)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=4 (SIGILL)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=2 (SIGINT)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=13 (SIGPIPE)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=3 (SIGQUIT)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=11 (SIGSEGV)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=15 (SIGTERM)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=24 (SIGTSTP)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=26 (SIGTTIN)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=27 (SIGTTOU)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=16 (SIGUSR1)
PREP: Set signal mask
TEST: sigpause() suspends execution
ERROR: sigpause() did not suspend calling process
Expected 1 second wait,Received 0 second wait
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=17 (SIGUSR2)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=5 (SIGTRAP)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=10 (SIGBUS)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=12 (SIGSYS)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=22 (SIGPOLL)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=29 (SIGPROF)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=30 (SIGXCPU)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=31 (SIGXFSZ)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=21 (SIGURG)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from mask
PREP: Fork child to test sig=28 (SIGVTALRM)
PREP: Set signal mask
TEST: sigpause() suspends execution
TEST: sigpause() returns -1 and sets errno to EINTR
TEST: sigpause() removed signal from maskReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We agree this is a test suite deficiency in the test
suite version(s) listed.
In the future, in order for a vendor to site this TSD in
support of a test report showing failures of these tests,
the vendor must also provide results for these tests
from a run in which they did not fail, so as to illustrate the
intermittent failure documented here is in fact the problem
encountered.
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:
- View Report 1369
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority