Bug 4107 - TestRunner is leaking file descriptors
Summary: TestRunner is leaking file descriptors
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 2234 4103
  Show dependency treegraph
 
Reported: 2007-02-27 22:13 UTC by Mike Cvet
Modified: 2007-03-05 16:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cvet 2007-02-27 22:13:00 UTC
$ ./TestRunner -r 100 frysk.rt.TestStepping

Running testASMStepping(frysk.rt.TestStepping) ...
execvp: Too many open files
ERROR
  java.lang.NullPointerException

When cntl-Z'ing TestRunner during its execution, and taking a look through the 
output of lsof, there are thousands of open files belonging to TestRunner which 
hasn't properly quit after the test failure.
Comment 1 Rick Moseley 2007-02-27 22:26:42 UTC
The limit on my FC5/i686 box for the file descriptors for TestRunner is about
1042 and then it aborts.  When I run the command Mike shows I see a couple of
processes running: TestRunner and funit-rt-asmstepper.  Running the "lsof"
command while running those, funit-rt-asmstepper appears to never open any
files.  If I run the "lsof" command on TestRunner I see the file descriptors run
up pretty quickly until the test aborts when it reaches ~1042 fd's.

Now, the weird thing is, when the test aborts, TestRunner remains in the cpu
queue but it now has a *totally* PID.  Doing a "lsof" on that shows about 1042
fd's open.  Looking at /proc/TESTRUNNERPID/fd and doing a list I see lines and
lines of this:

lr-x------ 1 rmoseley rmoseley 64 Feb 27 16:06 110 ->
/home/rmoseley/frysk-cvs3/build/frysk-core/frysk/pkglibdir/funit-rt-asmstepper


It seems nearly all the fd's are pointing to the funit-rt-asmstepper executable.
 Why would the TestRunner be repeatedly opening a fd pointing to the executable?
Comment 2 Rick Moseley 2007-02-28 14:13:44 UTC
In the previous comment I meant to say "*totally different PID" instead of
"*totally PID".  That is, the TestRunner PID had changed from its original PID
when it was running funit-rt-asmstepper.  But, the new TestRunner inherited the
fd's of the original TestRunner.