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

Bug 319911

Summary: Composite framework event threads are not terminated when service listener hook is registered
Product: [Eclipse Project] Equinox Reporter: Valentin Mahrwald <vmahrwald>
Component: FrameworkAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.7 M1   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Test case bundle, includes source
none
patch none

Description Valentin Mahrwald CLA 2010-07-14 15:43:03 EDT
Build Identifier: 3.5.2.R35x_v20100126

When stopping a composite framework, the equinox core event thread is not stopped. This appears to happen as a direct consequence of a service listener hook being registered in the composite framework.

The result is that equinox leaks both threads and memory.

Reproducible: Always

Steps to Reproduce:
1.Run the attached test jar in a 3.5.2 build of equinox (source code included)
Comment 1 Valentin Mahrwald CLA 2010-07-14 15:43:55 EDT
Created attachment 174335 [details]
Test case bundle, includes source
Comment 2 Thomas Watson CLA 2010-07-15 15:31:18 EDT
Created attachment 174438 [details]
patch

This is also possible outside of composites.  If a launcher registers a listenerhook with the framework system bundle context then the same thing can happen.  I fixed this by calling a new method that protects against the illegal state exception.
Comment 3 Thomas Watson CLA 2010-07-15 15:33:05 EDT
Patch released.