| Summary: | [console] Refreshing bundles results in continual creation of GoGo shell daemon threads. | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | John Ross <jwross> |
| Component: | Components | Assignee: | equinox.components-inbox <equinox.components-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | l.kirchev, tjwatson |
| Version: | 3.8.0 Juno | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Hmmm, refreshing every single bundle installed, that sounds like a recipe for disaster ;-) (In reply to comment #1) > Hmmm, refreshing every single bundle installed, that sounds like a recipe for > disaster ;-) And indeed it was :) But that shouldn't prohibit cleaning up obsolete threads, should it? All that's really happening is the GoGo shell bundle is being stopped and started as part of each refresh. The same issue might be there when refreshing only the GoGo shell bundle, although I did not try this. (In reply to comment #2) > (In reply to comment #1) > > Hmmm, refreshing every single bundle installed, that sounds like a recipe for > > disaster ;-) > > And indeed it was :) But that shouldn't prohibit cleaning up obsolete threads, > should it? All that's really happening is the GoGo shell bundle is being > stopped and started as part of each refresh. The same issue might be there when > refreshing only the GoGo shell bundle, although I did not try this. Yes, you are right - I also think this should happen even if only the shell is refreshed. I will see how to fix this. The problem is in the Gogo code, opened bug https://issues.apache.org/jira/browse/FELIX-4024 This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Refreshing bundles using FrameworkWiring results in the creation of a new GoGo shell daemon thread, and the previous one is not cleaned up. This will eventually result in an OutOfMemory error. To reproduce, just write an Activator with something like the following. public void start(final BundleContext context) throws Exception { thread = new Thread(new Runnable() { public void run() { Collection<Bundle> bundles = Arrays.asList(context.getBundles()); FrameworkWiring wiring = context.getBundle(0).adapt( FrameworkWiring.class); while (!Thread.currentThread().isInterrupted()) { try { Thread.sleep(1000); wiring.refreshBundles(bundles); } catch (InterruptedException e) { break; } catch (Throwable t) { t.printStackTrace(); } } } }); thread.setDaemon(true); thread.start(); }