"Too many open files" problem [message #333307] |
Wed, 03 December 2008 19:55 |
Eclipse User |
|
|
|
Originally posted by: Bill.Joy.codegear.com
I run into every once in a while since moving from Eclipse 3.3 to 3.4.1.
Eclipse can get into a mode where the UI hangs for a long time. Sometimes
afterwards the Error Log is filled with error messages about "Invalid ZIP
archive" resulting from JavaModelManager.getZipFile() getting the
ZipException "Too many open files". (Note that I can see 6 more of the
exact same message for each archive that is supposedly "invalid" -- these
are coming from different threads all doing the same time at pretty much the
same time.)
For instance, today I used the "Import Existing Projects into Workspace"
wizard and imported one plugin project. My workspace already had over 30
related plugin projects in the workspace. I also had several files open (I
think that is probably a key point). Build automatically was also enabled.
There was a really long wait with the progress dialog up (I invoked an
action which was blocked until the rebuild was complete). I took a thread
dump in the console window (I started Eclipse with eclipsec.exe) and saw
many instances of the thread
"org.eclipse.jdt.internal.ui.text.JavaReconciler". My guess is that there
was one of these per file that I had open. All these threads were doing zip
operations called by the method JarPackageFragmentRoot.computeChildren().
Suddenly there was exception after exception about "too many open files".
I think part of the problem is related to JavaModelManager which appears to
now cache zip file handles on a thread basis. Having multiple reconciler
threads running at the same time would logically seem to end up in using all
the available handles on Windows depending on how many of them were present.
There are also some major performance implications here that I don't
understand.
Guessing from the Error Log entries, there is probably some synchronization
between the threads happening since the threads are complaining about the
same archive in consecutive entries. Perhaps that is part of the
performance problem.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03479 seconds