Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363869 - [console] trying to unregister consolesession service twice
Summary: [console] trying to unregister consolesession service twice
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 16:28 EST by Stoyan Vassilev CLA
Modified: 2019-10-13 17:57 EDT (History)
0 users

See Also:


Attachments
shows the stack trace of the exception thrown and the stack trace of how the console is closed in ConsoleSession (969 bytes, text/plain)
2011-11-15 16:32 EST, Stoyan Vassilev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stoyan Vassilev CLA 2011-11-15 16:28:21 EST
Build Identifier: 3.6.0.v20100517

We're using Equinox as our OSGi container. At times, when running with -console flag, and we shutdown our product we get one of the two stack traces (will atttach stack traces). It seems like there's a race in the way ConsoleManager and ConsoleSession interact with each other, and causes it to try to unregister the service more than once. People have seen this more often when running our product in the background (but still with -console)

Reproducible: Sometimes

Steps to Reproduce:
1. Start equinox, pass in -console
2. Let start-up complete, do stuff
3. Shutdown
Comment 1 Stoyan Vassilev CLA 2011-11-15 16:32:50 EST
Created attachment 207057 [details]
shows the stack trace of the exception thrown and the stack trace of how the console is closed in ConsoleSession
Comment 2 Stoyan Vassilev CLA 2011-11-15 16:36:13 EST
The top stack trace is what we get as we try to shutdown our product running in background with -console. Why anyone would want to do that is a good question since you cant read stdin in this case. But people are doing it.

The bottom stack trace is how we see the console being shut down almost immediately after start, in background, probably precisely because you cant read stdin in this case. A possible fix is to set builtinSession field of ConsoleManager to null in this case.
Comment 3 Eclipse Genie CLA 2019-10-13 17:57:52 EDT
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.