|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1150 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 1150.
Report 1150 Actions
Problem Report Number 1150 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0352 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Sockets (UNIX 95) Certification Program The Open Brand certification program Test Suite VSU version 4.1.1 Test Identification Socket/accept 13 Problem Summary PG4U.00118 This was refused because it is a duplicate. Use TSD4U.00171 instead. Problem Text
Race condition in accept test case #13 AF_UNIX. This test succeeds
if all the file descriptors are consumed by the server, accept
returns -1 with EMFILE as errno. However, if the client process
is scheduled before the server such that the TEMFILE is not created
by the server yet, client would return ENOENT since O_NONBLOCK is
set. ENOENT is a valid errno from connect call according to XOPEN
spec.
The test suite didn't take care of the ENOENT case in unix_client2()
shown as follows:
if (connect(s, (struct sockaddr *) sun2, slen) == -1) {
if ((errno != ECONNABORTED) && (errno != ECONNREFUSED) &&
(errno != ECONNRESET) &&
(((flags & CL_NONBLOCK) == 0) || (errno != EINPROGRESS))) {
uwerrno("unix_client: connect");
vsu_debug_exit("capi_sock/unix.c:unix_client2()", 0);
return(-1);
}
}
If the client gets scheduled before the server creates the TEMPFILE.
parent child
----------------------------------------------------------
fork
WAIT_EVENT(PARENT_READY)
s = socket()
bind()
listen()
POST_EVENT(PARENT_READY)
s = unix_client2
socket()
connect()
return ENOENT
consume all available fds
by create(TEMPFILE, PROT_ALL)
accept()
release fds
Test Output
TEST CASE: accept
TEST PURPOSE #13
SPEC1170TESTSUITE CASE 13
If the implementation supports a communications
domain and a connection-oriented socket type:
EMFILE in errno and return -1 on a call to int
accept(int socket, struct sockaddr *address, size_t
*address_len) when OPEN_MAX file descriptors are
currently open in the calling process.
PREP: Determine OPEN_MAX
TEST: AF_INET SOCK_STREAM
PREP: Create test sockaddr_in: address = 129.214.206.5, port = 4901
PREP: Child: wait for parent
PREP: Create a socket
PREP: Connect socket to address 129.214.206.5, port 4901
ERROR: inet_client: connect failed, errno = 146(ECONNREFUSED - Connection
refused)
PREP: Create socket
PREP: Bind to socket
PREP: Call listen for socket
PREP: Signal child parent is ready
PREP: Consume all available file descriptors
TEST: Call accept
TEST: Return value
TEST: errno value
CLEANUP: Close sockets, kill child
TEST: AF_UNIX SOCK_STREAM
PREP: Create test sockaddr_un: path = ../tmp/unix.a004p3
PREP: Child: wait for parent
PREP: Create socket
PREP: Set O_NONBLOCK for socket
PREP: Connect to address ../tmp/unix.a004p3
ERROR: unix_client: connect failed, errno = 2(ENOENT - No such file or
directory)
PREP: Create socket
PREP: Bind to socket
PREP: Call listen for socket
PREP: Signal child parent is ready
PREP: Consume all available file descriptors
TEST: Call accept
TEST: Return value
TEST: errno value
CLEANUP: Close sockets, kill child
UNRESOLVED
IC End
TC End
/tset/CAPIsockets/faccept/faccept1 11:04:10|Clean Start, scenario ref 3-1
Clean End
TCC EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The submitter is correct but a recent ruling regarding this issue
exists. To avoid the confusion duplicate rulings regarding the same
issue might cause we recommend this request be refused and the submitter
use TSD4U.00171 instead.
Note that the reason for the failure is the same. The output is
just different when it affects the AF_UNIX case.
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:
- View Report 1150
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority