Bug 303204 - Out of Memory exceptions with SQLJ files
Summary: Out of Memory exceptions with SQLJ files
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-02-18 11:05 EST by ujjvala CLA
Modified: 2011-01-25 11:21 EST (History)
3 users (show)

See Also:


Attachments
attaching file with big option (3.00 MB, application/zip)
2010-02-20 07:46 EST, ujjvala CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ujjvala CLA 2010-02-18 11:05:32 EST
Build Identifier: Eclipse 3.4

Found bug http://bugs.sun.com/view_bug.do?bug_id=4797189

Multiple tries are required to repro this Out of memory exception with Rational
Application Developer/Rational Software Architect for Websphere 7.5.4 versions.

When building a J2EE project containing a large number of SQLJ files,
with the option:

Windows->Preferences->Data Management->SQL Development->SQLJ Applications
Attaching sample file for reference.

The following execption occurs:

!MESSAGE An internal error occurred during: "Building Workspace".
!STACK 0
java.lang.OutOfMemoryError
        at java.util.zip.Inflater.init(Native Method)
        at java.util.zip.Inflater.<init>(Unknown Source)
        at java.util.zip.ZipFile.getInflater(Unknown Source)
        at java.util.zip.ZipFile.getInputStream(Unknown Source)
        at java.util.zip.ZipFile.getInputStream(Unknown Source)
        at
org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(Unknown Source)
        at
org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(Unknown Source)
        at org.eclipse.jdt.internal.core.builder.ClasspathJar.findClass(Unknown
Source)
        at
org.eclipse.jdt.internal.core.builder.NameEnvironment.findClass(Unknown Source)
        at
org.eclipse.jdt.internal.core.builder.NameEnvironment.findType(Unknown Source)
        at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getResolvedType(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.Scope.getJavaLangObject(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperclass(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(Unknown
Source)
        at
org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Unknown
Source)
        at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Unknown
Source)
        at org.eclipse.jdt.internal.compiler.Compiler.compile(Unknown Source)
        at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(Unknown
Source)
        at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(Unknown Source)
        at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(Unknown
Source)
        at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(Unknown Source)
        at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(Unknown
Source)
        at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(Unknown
Source)
        at org.eclipse.core.internal.events.BuildManager$2.run(Unknown Source)
        at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown
Source)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown
Source)
        at org.eclipse.core.internal.events.BuildManager$1.run(Unknown Source)
        at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown
Source)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(Unknown
Source)
        at org.eclipse.core.internal.events.BuildManager.build(Unknown Source)
        at org.eclipse.core.internal.resources.Workspace.build(Unknown Source)
        at org.eclipse.ui.actions.GlobalBuildAction$1.run(Unknown Source)
        at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)

!ENTRY org.eclipse.ui 4 0 2010-01-20 15:58:34.078
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.OutOfMemoryError)
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown
Source)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
        at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
        at org.eclipse.ui.internal.Workbench.access$4(Unknown Source)
        at org.eclipse.ui.internal.Workbench$5.run(Unknown Source)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown
Source)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown
Source)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown
Source)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown
Source)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown
Source)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown
Source)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
        at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
        at org.eclipse.equinox.launcher.Main.run(Unknown Source)
        at org.eclipse.equinox.launcher.Main.main(Unknown Source)
Caused by: java.lang.OutOfMemoryError
        at java.util.zip.Inflater.inflateBytes(Native Method)
        at java.util.zip.Inflater.inflate(Unknown Source)
        at java.util.zip.InflaterInputStream.read(Unknown Source)
        at
org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleEntry$ZipBundleEntryInputStream.read(Unknown
Source)
        at org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry.getBytes(Unknown
Source)
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(Unknown
Source)
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(Unknown
Source)
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(Unknown
Source)
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Unknown
Source)
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Unknown
Source)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(Unknown
Source)
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(Unknown Source)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Unknown
Source)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Unknown
Source)
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Unknown
Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at
org.eclipse.ui.statushandlers.WorkbenchErrorHandler.getStatusDialogManager(Unknown
Source)
        at
org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(Unknown
Source)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.access$0(Unknown
Source)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler$1.run(Unknown
Source)
        at org.eclipse.ui.internal.UILockListener.doPendingWork(Unknown Source)
        at org.eclipse.ui.internal.UISynchronizer$3.run(Unknown Source)
        at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
        ... 24 more


Reproducible: Always

Steps to Reproduce:
1.Import the attached Project Interchange file from RAD 7.5.4 or RSA for Websphere 7.5.4 versions
2. clean and build the project for around 5-10 times
3. Out of Memory exception alert appears with an option to exit workbench.
Comment 1 ujjvala CLA 2010-02-18 11:19:48 EST
sample project too large to attach.
Comment 2 Jay Arthanareeswaran CLA 2010-02-18 11:27:13 EST
(In reply to comment #1)
> sample project too large to attach.

Did you try with the "Big File" option on?
Comment 3 Olivier Thomann CLA 2010-02-18 11:29:50 EST
What do you expect from us ?
We are properly closing the stream when reading the zip entries. We are using standard libraries and if the stream is closed, we are expecting the memory to be freed.

Found bug http://bugs.sun.com/view_bug.do?bug_id=4797189 seems to point to a VM issue to free the memory used by Deflater and Inflater object.
Comment 4 ujjvala CLA 2010-02-20 07:46:54 EST
Created attachment 159668 [details]
attaching file with big option
Comment 5 ujjvala CLA 2010-02-20 07:52:23 EST
If you can tell me which component can use the workaround mentioned in the defect, it will be useful.
Comment 6 Dani Megert CLA 2010-02-22 02:54:42 EST
>If you can tell me which component can use the workaround mentioned in the
>defect, it will be useful.
I guess you mean the Sun bug. That suggests to close the streams which we already do as Olivier mentioned in comment 3.
Comment 7 Olivier Thomann CLA 2010-02-24 15:06:57 EST
Removing target as requested information is not provided.
Comment 8 Olivier Thomann CLA 2010-03-31 10:13:56 EDT
A critical bug deserves more attention from the reporter. Reducing severity.
Comment 9 Olivier Thomann CLA 2010-07-15 15:48:44 EDT
What are you expecting here ?
We cannot be responsible for a leak in the library code.
Comment 10 Dani Megert CLA 2010-07-19 05:01:25 EDT
Marking as invalid as there's just not enough information/response from the bug reporter.
Comment 11 Olivier Thomann CLA 2011-01-25 11:21:51 EST
Verified.