Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 183476

Summary: To many files open - when running large debug sessions
Product: [Eclipse Project] Equinox Reporter: Mike Boyersmith <mjboyers>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: clin, wassim.melhem
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Mike Boyersmith CLA 2007-04-20 18:44:47 EDT
I'm running using 33m6, when I try to debug a large target with 1200 plugins when the system comes up (runtime workspace, I Get in my debugger console output the following error, from this point on, the system is unstable and you can't really do anything with the runtime instance. 


** (Eclipse:16468): WARNING **: Cannot open font file for font Luxi Sans Oblique 10
CJL0038E The PDLogger,  could not get the host name.

!ENTRY com.ibm.etools.logging.discovery.common 4 0 2007-04-20 15:21:43.957
!MESSAGE 
!STACK 0
java.util.zip.ZipException: Too many open files /root/work/targets/33m6/eclipse/plugins/com.ibm.etools.logging.discovery.common_1.0.0.v200702232226/src.apache_jars/commons-lang-2.1.jar
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:238)
	at java.util.zip.ZipFile.<init>(ZipFile.java:268)
	at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:251)
	at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:79)
	at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:92)
	at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:65)
	at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:234)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:452)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
	at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:405)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:568)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:787)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:243)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:49)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:239)
	at org.eclipse.ui.internal.EarlyStartupRunnable.getExecutableExtension(EarlyStartupRunnable.java:117)
	at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.ui.internal.Workbench$52.run(Workbench.java:2171)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Comment 1 Thomas Watson CLA 2007-04-22 21:29:17 EDT
Try setting the osgi.bundlefile.limit system property to a reasonable number when launching.  For example, when launching a target use the following as a vm arg.

-Dosgi.bundlefile.limit=500
Comment 2 Mike Boyersmith CLA 2007-04-23 12:49:35 EDT
This certainly helped to resolve this problem. I also found that turning off certain sets of plug-ins also mitigated the problem. Thank you for the help and quick support here. 


Comment 3 Thomas Watson CLA 2007-04-23 14:27:26 EDT
Many large products ship with this property set in their config.ini.  Maybe PDE should automatically set the property if it determines a very large target.

Wassim, does PDE use any properties from the targets config.ini when creating a launch configuration.  Maybe this property should be used in the launch configuration if the target configuration for a large product already has this property set.
Comment 4 Wassim Melhem CLA 2007-04-23 14:51:44 EDT
Yes, Tom.

When launching the default application/product, PDE uses all the properties set in the target's config.ini.  So we will pick up anything there.

This is a 3.3 feature that Brian did.
Comment 5 Thomas Watson CLA 2007-04-25 14:25:33 EDT
Closing as works for me.  Large products must set the osgi.bundlefile.limit.  This works around the open file limitation.  If the target config.ini has this property set then it should be used when launching a target runtime from eclipse.