Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319911 - Composite framework event threads are not terminated when service listener hook is registered
Summary: Composite framework event threads are not terminated when service listener ho...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 15:43 EDT by Valentin Mahrwald CLA
Modified: 2010-07-15 15:33 EDT (History)
0 users

See Also:


Attachments
Test case bundle, includes source (4.88 KB, application/java-archive)
2010-07-14 15:43 EDT, Valentin Mahrwald CLA
no flags Details
patch (2.99 KB, patch)
2010-07-15 15:31 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.