JDK-6540130 : Out of Memory Error occurs when open and close applet in IE7 many times
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0u12
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-03-29
  • Updated: 2014-02-27
  • Resolved: 2009-01-21
Related Reports
Relates :  
Relates :  
Description
Yokogawa test TC04-01 (attached with instructions how to run) throws the following exception after several hours run with Internet Ixplorer 7 (IE6 is OK for at least 24 hours):

java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-ArcTest.class" java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at sun.awt.image.ImageFetcher$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.awt.image.ImageFetcher.createFetchers(Unknown Source)
	at sun.awt.image.ImageFetcher.add(Unknown Source)
	at sun.awt.image.InputStreamImageSource.startProduction(Unknown Source)
	at sun.awt.image.InputStreamImageSource.addConsumer(Unknown Source)
	at sun.awt.image.InputStreamImageSource.startProduction(Unknown Source)
	at sun.awt.image.ImageRepresentation.startProduction(Unknown Source)
	at sun.awt.image.ImageRepresentation.prepare(Unknown Source)
	at sun.awt.SunToolkit.prepareImage(Unknown Source)
	at sun.awt.windows.WComponentPeer.prepareImage(Unknown Source)
	at java.awt.Component.prepareImage(Unknown Source)
	at java.awt.Component.prepareImage(Unknown Source)
	at java.awt.ImageMediaEntry.startLoad(Unknown Source)
	at java.awt.MediaEntry.getStatus(Unknown Source)
	at java.awt.ImageMediaEntry.getStatus(Unknown Source)
	at java.awt.MediaTracker.statusID(Unknown Source)
	at java.awt.MediaTracker.waitForID(Unknown Source)
	at java.awt.MediaTracker.waitForID(Unknown Source)
	at sun.plugin.util.GrayBoxPanel.getErrorImage(Unknown Source)
	at sun.plugin.util.GrayBoxPanel.setError(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.getGrayBoxPanel(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
	at sun.plugin.AppletViewer.showAppletException(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-68623" java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at sun.applet.AppletPanel.createAppletThread(Unknown Source)
	at sun.applet.AppletPanel.init(Unknown Source)
	at sun.plugin.AppletViewer.createClassLoader(Unknown Source)
	at sun.plugin.AppletViewer.appletInit(Unknown Source)
	at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
	at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
Exception in thread "Thread-68625" java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.beginPainting(Unknown Source)
	at sun.plugin.AppletViewer.initApplet(Unknown Source)
	at sun.plugin.AppletViewer.appletInit(Unknown Source)
	at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
	at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)


Also Mem Usage in Windows Taks Manager is really huge, more than 1.5GB (of course, depends on machine)

Comments
EVALUATION Handle leak is IE7 related. Disabling Phishing filter in IE7 should fix the handle leak. The following are related patches for IE7 KB955478 Phishing Filter situation with Internet Explorer 7.0 KB956625 Microsoft Text Services situation on Windows XP and Windows Server 2003.
21-01-2009

EVALUATION I've tested with jre 6u2 promoted build and couldn't reproduce the OOM error. Both thread and GDI objects counts remain pretty much the same after a 14-hour run. However, the handles count and the memory usage increaes quite a lot. Data as follows: mem use (KB) handles threads GDI objects start 54060 914 34 539 after 14hrs. 871404 20774 33 578 So some investigations is still need for the increase in handles an memory usage in jre 6 update. I'm marking this bug as mustang-na since there's no OOM error with 6u2 but leaving it open for continue investigation on the handles and memory leak.
21-05-2007