Bug 28813 - gfortran.dg/direct_io_6.f90 can exhaust system disk space
Summary: gfortran.dg/direct_io_6.f90 can exhaust system disk space
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Jerry DeLisle
Depends on:
Reported: 2006-08-22 21:46 UTC by Jack Howarth
Modified: 2006-09-28 22:39 UTC (History)
1 user (show)

See Also:
Host: powerpc-apple-darwin8
Target: powerpc-apple-darwin8
Build: powerpc-apple-darwin8
Known to work:
Known to fail:
Last reconfirmed: 2006-08-23 04:19:03


Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2006-08-22 21:46:53 UTC
The current implementation of the direct_io_6 doesn't check for available disk space before attempting to use it. This can result in complete exhaustion of the disk space on a build system resulting in the failure of other tasks running on it. Since this test is run eight times with different compiler flags, the possiblity of causing some other task on the build machine to crash is even higher. This really should be addressed before 4.2 is released.
Comment 1 Jerry DeLisle 2006-08-23 04:19:03 UTC
I can temporarily delete this test until I can come up with a better approach.  On my linux system the actual disk space used is less then 100 bytes even though it logically consumes a huge amount.  It depends on the file system being used.

Have you actually experianced the disk space issue?
Comment 2 Jack Howarth 2006-08-23 08:28:50 UTC
     Yes. I filed the bug report after my wife lost a bunch of open word processing documents when Word crashed while the direct_io_6 test was executing in the background under MacOS X. I suspect this problem may occur with other operating systems and applications as well. This probably is the only gcc testsuite test that is certain to exhaust the available diskspace. Isn't there someway to check for available disk space within fortran?
       Normally when this test is executing on an idle machine, the test silently fails. However, on MacOS X at least, if you are actively using the browser or other applications, an alert comes up reporting that the disk is full. So it definitely is an issue under MacOS X.
Comment 3 Jerry DeLisle 2006-08-24 00:24:07 UTC
I will delete the test tonight shortly.  Will add a new one later
Comment 4 Jerry DeLisle 2006-08-24 01:11:03 UTC
Subject: Bug 28813

Author: jvdelisle
Date: Thu Aug 24 01:10:55 2006
New Revision: 116368

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116368
2006-08-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR 28813
	* gfortran.dg/direct_io_6.f90: Remove test.


Comment 5 Jerry DeLisle 2006-09-27 00:55:31 UTC
The only solutions to this problem I see is to either:

1. close this bug and leave the test case deleted or

2. write a C function to query for disk space and if enough available, proceed with the test.

I am leaning to 1.  If no other opinions i will close this bug.
Comment 6 Jerry DeLisle 2006-09-28 22:39:15 UTC
Closing, test not needed.