|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0276 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 0276.
Report 0276 Actions
Problem Report Number 0276 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0276 Raised 1998-12-18 08:00 Updated 2003-03-13 08:00 Published 1998-12-23 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.4.3 Test Identification ANSI.os/streamio/fclose 10,11,12,13,14,15,16 Problem Summary TSD4.276 In addition to fclose #10, 11, 12, 13, 14, 15, 16, this IR concerns freopen #4 and pclose #1. For fclose #10, #11, #12, #15, #16, and freopen #4, pclose #1, we are getting an unexpected SIGSEGV (signa... Problem Text
In addition to fclose #10, 11, 12, 13, 14, 15, 16, this IR concerns
freopen #4 and pclose #1.
For fclose #10, #11, #12, #15, #16, and freopen #4, pclose #1, we are
getting an unexpected SIGSEGV (signal 11)
on our platform . For fclose #13, #14 the child is unexpectedly exiting
with child wait status = 11.
After the initial fclose(fp) (or pclose(fp)) , depending on storage
allocation the next reference to fp may** result in
a SIGSEGV. (**It will result in a SIGSEGV if the page of memory where fp
is stored becomes unbacked because fp is
the last valid memory location on the page at the time of the fclose().)
The particulars for each test case are further desribed
below. We have also observed that when these testcases are run with
tracing (VSX_DBUG_FLAGS=t:P:d,trace:l,2) the
SIGSEGV does not occur and these testcases PASS on our platform. (Note
that I did not try other values of
VSX_DBUG_FLAGS to see what would and would not cause a SIGSEGV not to be
generated.) When these VSX_DBUG_FLAGS
are set as above, the SIGSEGV is not generated because the storage
allocation is such that fp is not the last valid memory location
on the page of memory where it is stored. Therefore that page of memory
is not unbacked when the fp is first fclose()-ed
(or pclose()-ed), and a SIGSEGV does not result when fp is referenced
again. The PASSing journal entries when run with tracing
on are included below for your perusal.
For fclose #10, #11, #12, #15, and #16, fclose() is first called from
t10_16func() which is called from do_ferr() on
line 472 (fret = (*func)(fp,1);
line 474 of do_ferr() calls *ferr = ferror(fp);
and this call to ferror(fp) results in a SIGSEGV on our platform (when we
do not have VSX_DBUG_FLAGS=t:P:d,trace:l,2)
because the memory page which fp was found on was unbacked by the initial
fclose().
For fclose #13,#14, fclose() is first called from t10_16func() which is
called from do_ferr() on
line 479 fret = ch_func(errnum, func, fp, ferr);
Then the test case /* cleans up opened files */ and on
line 510 (void) fclose(fp);
references fp which is unbacked, resulting in the child wait status of 11.
freopen #4 has the following scenario:
fp1 = fopen(t4_file, "a+");
fd = creat(t4a_file, 777);
close(fd);
fp = freopen(f4a_file, "r", fp1); <---- after this point, fp and fp1 are
the same
flags = fcntl(fileno(fp), FGETFL, 0);
/*verifies that reopened in read mode only, as specified.*/
/*cleanup: */
fclose(fp); <---- fp and fp1 were just closed, since fp and fp1 are the
same
fclose(fp1); <--- this generates the SIGSEGV
unlink(t4a_file);
unlink(t4_file);
And finally, pclose #1 is as follows:
The stream is initially pclose()-ed from test1() on line 186 of
~vsx0/tset/XOPEN.os/genuts/pclose/pclose.c
(void) pclose(fp);
line 201 again calls (void) pclose(fp); which results in a SIGSEGV when
fp is unbacked.
-----------------------------------------------------------------------------
Here are the journals when run with VSX_DBUG_FLAGS=t:P:d,trace:l,2
demonstrating they PASS on our
platform:
0|1.10 09:44:06 19981218|User: vsx0 (240) TCC Start, Command Line: tcc -e
-v VSX_DBUG_FLAGS=t:P:d,trace:l,2 -l
/tset/ANSI.os/streamio/fclose/T.fclose{10,11,12,13,14,15,16}
10|0 /tset/ANSI.os/streamio/fclose/T.fclose 09:44:07|TC Start, scenario
ref 0-1, ICs {10,11,12,13,14,15,16}
15|0 1.10 7|TCM Start
400|0 10 1 09:44:08|IC Start
200|0 10 09:44:08|TP Start
220|0 10 0 09:44:08|PASS
410|0 10 1 09:44:08|IC End
400|0 11 1 09:44:08|IC Start
200|0 11 09:44:08|TP Start
220|0 11 0 09:44:08|PASS
410|0 11 1 09:44:09|IC End
400|0 12 1 09:44:09|IC Start
200|0 12 09:44:09|TP Start
220|0 12 0 09:44:09|PASS
410|0 12 1 09:44:09|IC End
400|0 13 1 09:44:09|IC Start
200|0 13 09:44:09|TP Start
220|0 13 0 09:47:29|PASS
410|0 13 1 09:47:29|IC End
400|0 14 1 09:47:29|IC Start
200|0 14 09:47:29|TP Start
220|0 14 0 09:47:30|PASS
410|0 14 1 09:47:30|IC End
400|0 15 1 09:47:30|IC Start
200|0 15 09:47:30|TP Start
220|0 15 0 09:47:30|PASS
410|0 15 1 09:47:30|IC End
400|0 16 1 09:47:30|IC Start
200|0 16 09:47:30|TP Start
220|0 16 0 09:47:30|PASS
410|0 16 1 09:47:30|IC End
80|0 0 09:47:31|TC End
900|09:47:31|TCC End
0|1.10 10:04:29 19981218|User: vsx0 (240) TCC Start, Command Line: tcc -e
-v VSX_DBUG_FLAGS=t:P:d,trace:l,2 -l
/tset/ANSI.os/streamio/freopen/T.freopen{4}
10|0 /tset/ANSI.os/streamio/freopen/T.freopen 10:04:29|TC Start, scenario
ref 0-1, ICs {4}
15|0 1.10 1|TCM Start
400|0 4 1 10:04:31|IC Start
200|0 4 10:04:31|TP Start
220|0 4 0 10:04:31|PASS
410|0 4 1 10:04:31|IC End
80|0 0 10:04:31|TC End
900|10:04:31|TCC End
0|1.10 09:35:08 19981218|User: vsx0 (240) TCC Start, Command Line: tcc -e
-v VSX_DBUG_FLAGS=t:P:d,trace:l,2 -l
/tset/XOPEN.os/genuts/pclose/T.pclose{1}
10|0 /tset/XOPEN.os/genuts/pclose/T.pclose 09:35:08|TC Start, scenario ref
0-1, ICs {1}
15|0 1.10 1|TCM Start
400|0 1 1 09:35:09|IC Start
200|0 1 09:35:09|TP Start
220|0 1 0 09:38:30|PASS
410|0 1 1 09:38:30|IC End
80|0 0 09:38:30|TC End
900|09:38:30|TCC EndTest Output
Journal output (fclose #10 -#16):
400|204 10 1 02:39:16|IC Start
200|204 10 02:39:16|TP Start
520|204 10 687865912 1 1|unexpected signal 11 (SIGSEGV) received
220|204 10 2 02:39:16|UNRESOLVED
410|204 10 1 02:39:16|IC End
400|204 11 1 02:39:16|IC Start
200|204 11 02:39:16|TP Start
520|204 11 687865912 1 1|unexpected signal 11 (SIGSEGV) received
220|204 11 2 02:39:16|UNRESOLVED
410|204 11 1 02:39:16|IC End
400|204 12 1 02:39:16|IC Start
200|204 12 02:39:16|TP Start
520|204 12 687865912 1 1|unexpected signal 11 (SIGSEGV) received
220|204 12 2 02:39:16|UNRESOLVED
410|204 12 1 02:39:16|IC End
400|204 13 1 02:39:16|IC Start
200|204 13 02:39:16|TP Start
520|204 13 687865912 3 1|deletion reason: error in do_ferr(): child wait
status = 11
220|204 13 2 02:40:09|UNRESOLVED
410|204 13 1 02:40:09|IC End
400|204 14 1 02:40:09|IC Start
200|204 14 02:40:09|TP Start
520|204 14 687865912 3 1|deletion reason: error in do_ferr(): child wait
status = 11, errno = 121(EINVAL)
220|204 14 2 02:40:10|UNRESOLVED
410|204 14 1 02:40:10|IC End
400|204 15 1 02:40:10|IC Start
200|204 15 02:40:10|TP Start
520|204 15 687865912 1 1|unexpected signal 11 (SIGSEGV) received
220|204 15 2 02:40:10|UNRESOLVED
410|204 15 1 02:40:10|IC End
400|204 16 1 02:40:10|IC Start
200|204 16 02:40:10|TP Start
520|204 16 687865912 1 1|unexpected signal 11 (SIGSEGV) received
220|204 16 2 02:40:10|UNRESOLVED
410|204 16 1 02:40:10|IC End
Vrpt output (fclose #10 - #16):
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 10 Unresolved
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
EAGAIN in errno and a return value of EOF when fclose() is called
and the underlying file descriptor references a pipe with the
O_NONBLOCK flag set and there is insufficient capacity in the pipe
to accept the data.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-09(C)
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 11 Unresolved
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
EAGAIN in errno and a return value of EOF when fclose() is called
and the underlying file descriptor references a FIFO with the
O_NONBLOCK flag set and there is insufficient capacity in the FIFO
to accept the data.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-09(C)
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 12 Unresolved
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
EBADF in errno and a return value of EOF when fclose() is called
and the stream pointer argument is not open for writing.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-10(A)
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 13 Unresolved
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
EINTR in errno and a return value of EOF when fclose() is
terminated due to the receipt of a signal.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-11(C)
Test Information:
deletion reason: error in do_ferr(): child wait status = 11
************************************************************************
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 14 Unresolved
Test Description:
EFBIG in errno and a return value of EOF when fclose() attempts to
write to a file that exceeds an implementation defined maximum file
size.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-12(D)
Test Information:
deletion reason: error in do_ferr(): child wait status = 11, errno =
121(EINVAL)
************************************************************************
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 15 Unresolved
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
EPIPE in errno, a SIGPIPE signal and a return value of EOF when
fclose() attempts to write to a pipe that is not open for reading
by any process.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-14(C)
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************
************************************************************************
/tset/ANSI.os/streamio/fclose/T.fclose 16 Unresolved
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
EPIPE in errno, a SIGPIPE signal and a return value of EOF when
fclose() attempts to write to a FIFO that is not open for reading
by any process.
Posix Ref: Component FCLOSE Assertion 8.2.3.11-14(C)
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************
Journal output (freopen #4):
400|213 4 1 02:52:11|IC Start
200|213 4 02:52:11|TP Start
520|213 4 1660944404 1 1|unexpected signal 11 (SIGSEGV) received
220|213 4 2 02:52:11|UNRESOLVED
410|213 4 1 02:52:11|IC End
Vrpt output (freopen #4):
************************************************************************
/tset/ANSI.os/streamio/freopen/T.freopen 4 Unresolved
Test Description:
type = "r" the file specified by file-name is associated with stream
and opened for reading only.
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************
Journal output (pclose #1):
10|657 /tset/XOPEN.os/genuts/pclose/T.pclose 22:47:32|TC Start, scenario
ref 666-1
15|657 1.10 6|TCM Start
400|657 1 1 22:47:33|IC Start
200|657 1 22:47:33|TP Start
520|657 1 721420344 1 1|unexpected signal 11 (SIGSEGV) received
220|657 1 2 22:48:24|UNRESOLVED
410|657 1 1 22:48:24|IC End
Vrpt output (pclose #1):
************************************************************************
/tset/XOPEN.os/genuts/pclose/T.pclose 1 Unresolved
Test Description:
pclose() waits for the process associated with the stream to terminate
before closing stream.
Test Information:
unexpected signal 11 (SIGSEGV) received
************************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a fault in the test suite and it is recommended that a
waiver is granted on the grounds of a test suite deficiency.
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 0276
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority