Bug 15162

Summary: Assertion failure during shutdown
Product: [Eclipse Project] JDT Reporter: Tim Francis <francis>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 F2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Tim Francis CLA 2002-05-02 23:22:14 EDT
When running the headless workbench, I sometimes see the following exception 
during shutdown (I believe it's when BootLoader.shutdown() is called in the 
main thread).  This exception comes from the background indexer thread.  Last 
seen on the M5 build.

Shutting down workbench.                                                       
org.eclipse.core.internal.runtime.AssertionFailedException: assertion failed: 
meta.appNotInit
        at org.eclipse.core.internal.runtime.Assert.isTrue(Assert.java:95)
        at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized
(InternalPlatform.java:178)
        at org.eclipse.core.internal.runtime.InternalPlatform.getPluginRegistry
(InternalPlatform.java:391)
        at org.eclipse.core.runtime.Platform.getPluginRegistry
(Platform.java:319)
        at org.eclipse.core.internal.runtime.PlatformURLPluginConnection.resolve
(PlatformURLPluginConnection.java:46)
        at org.eclipse.core.internal.boot.PlatformURLHandler.openConnection
(PlatformURLHandler.java:57)
        at java.net.URL.openConnection(URL.java:776)
        at org.eclipse.core.internal.runtime.InternalPlatform.resolve
(InternalPlatform.java:829)
        at org.eclipse.core.runtime.Platform.resolve(Platform.java:401)
        at org.eclipse.core.internal.plugins.PluginDescriptor.addLibrary
(PluginDescriptor.java:474)
        at 
org.eclipse.core.internal.plugins.PluginDescriptor.addLibraryWithFragments
(PluginDescriptor.java:438)
        at 
org.eclipse.core.internal.plugins.PluginDescriptor.resolveAndAddLibrary
(PluginDescriptor.java:431)
        at 
org.eclipse.core.internal.plugins.PluginDescriptor.getPluginClassLoaderPath
(PluginDescriptor.java:408)
        at 
org.eclipse.core.internal.plugins.PluginDescriptor.getPluginClassLoader
(PluginDescriptor.java:308)
        at 
org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation
(PluginDescriptor.java:665)
        at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation
(PluginDescriptor.java:184)
        at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin
(PluginClassLoader.java:52)
        at 
org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf
(PluginClassLoader.java:130)
        at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass
(DelegatingURLClassLoader.java:771)
        at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass
(DelegatingURLClassLoader.java:751)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
        at org.eclipse.jdt.internal.core.index.impl.Index.merge(Index.java:231)
        at org.eclipse.jdt.internal.core.index.impl.Index.save(Index.java:341)
        at 
org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndexes
(IndexManager.java:396)
        at org.eclipse.jdt.internal.core.search.indexing.IndexManager.notifyIdle
(IndexManager.java:301)
        at org.eclipse.jdt.internal.core.search.processing.JobManager.run
(JobManager.java:286)
        at java.lang.Thread.run(Thread.java:479)
Comment 1 Philipe Mulet CLA 2002-05-03 04:36:05 EDT
We should shut the background indexer down when exiting.
Comment 2 Philipe Mulet CLA 2002-05-13 12:42:04 EDT
We found a potential deadlock in the indexer shutdown code (bug 15857). Could 
this be the same problem ?

Could you try to use the latest STABLE patch posted there:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-
home/org.eclipse.jdt.core-STABLE.zip

to see if it changes your scenario...
Comment 3 Tim Francis CLA 2002-05-13 12:49:46 EDT
I don't have a completely reproducible testcase for this, it works sometimes 
and fails others.  However I will try the patch and let you know what I see.
Comment 4 Jerome Lanneluc CLA 2002-05-27 05:03:36 EDT
Now forcing the background indexer thread to terminate before the platform 
shuts down.
Comment 5 Olivier Thomann CLA 2002-06-03 14:12:27 EDT
Don't know how to verify this.
Comment 6 Jerome Lanneluc CLA 2002-06-04 05:58:40 EDT
Verified.