Summary: | Thread timed out waiting on initial start of RSE | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] Target Management | Reporter: | Martin Oberhuber <mober.at+eclipse> | ||||
Component: | RSE | Assignee: | Martin Oberhuber <mober.at+eclipse> | ||||
Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
Severity: | normal | ||||||
Priority: | P3 | CC: | dmcknigh, wb-rel | ||||
Version: | 2.0 | Flags: | dmcknigh:
review+
|
||||
Target Milestone: | 2.0.1 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Bug Depends on: | 142722 | ||||||
Bug Blocks: | 218304 | ||||||
Attachments: |
|
Description
Martin Oberhuber
2007-09-12 13:04:36 EDT
Created attachment 78209 [details]
Patch decoupling plugin activation for UI adapters
The problem seems to be, that when RSE initially loads and needs the SystemRegistry the first time (through InitRSEJob), a very long sequence of plugin activations is started:
SystemRegistry instantiates subsystem configurations as needed
subsystem configurations activate e.g. files.core
files.core load the UI adapters unconditionally
files.ui requires shells.core
shells.core load shells.ui unconditionally
...
At some point, there may be a recursive sequence of activations: Because the Main Thread can instanciate the SystemRegistry, which loads the subsystems, but the InitRSEJob (running in a different thread) loads the profiles! This may essentially deadlock, depending on the exact timing of when and by whom the SystemRegistry is first needed, versus when the InitRSEJob runs.
To fix the issue in the longer term future, we should consider getting rid of asynchronously filling the SystemRegistry in a Job; and, we should make plugin activation of subsystems deferred. Different bugs are used to track both these approaches.
In the meantime, it should help to decouple UI plugin activation from the Core plugin activation by running them in a separate thread; then, the Core plugin is activated earlier and doesn't have to wait for UI to fully activate, so the deadlock should not occur.
Attached patch does exactly that (decouple UI plugin activation to separate thread).
Dave can you review this for 2.0.1? - Thanks! DaveM -- since DaveD seems not to be in today, could you review the patch? The patch looks fine to me. Patch applied, thanks |