Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 128452 - Race Condition on Auto-Removal of terminated Launches
Summary: Race Condition on Auto-Removal of terminated Launches
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 100700 108321 135240 145551 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-17 13:45 EST by Branden J. Moore CLA
Modified: 2006-06-06 11:38 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Branden J. Moore CLA 2006-02-17 13:45:19 EST
There is a race condition with the automatic removal of terminated launches.  Specifically, the org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager#removeTerminatedLaunches()  method schedules a Job to remove the old launches.  This job might not run until after the new Lauch has completed (if the lauch is very quick, such as a 'cat' of a file), thus removing the console of the process you just invoked.

Enabling "[Always] Save dirty editors before launching" seems to exacerbate the issue (hence how I discovered this).

Obviously, disabling the automatic removal of terminated launches allows you to get around this problem, but is a sub-optimal solution to the race-condition.

Note:  Bugzilla only allows me to enter one version number, but this has been tested on and confirmed on 3.1, 3.1.2, and 3.2 (Nightly build)

Thanks,

Branden
Comment 1 Darin Wright CLA 2006-04-04 17:54:23 EDT
Loosk similar to bug 108321.
Comment 2 Kevin Barnes CLA 2006-04-05 13:06:12 EDT
Fixed in RC1.

Moved the Job to the LaunchManger. It now removes the launch synchronously and schedules a job to notify its listeners.

I haven't been able to reproduce the bad behavior w/ or w/o the fix so any help verifing this one would be appreciated.
Comment 3 Kevin Barnes CLA 2006-04-05 13:08:01 EDT
Darin, please verify
Comment 4 Branden J. Moore CLA 2006-04-05 13:53:38 EDT
With the latest nightly build (N20060405-0010), this problem still occurs, although less frequently, it seems.
Comment 5 Kevin Barnes CLA 2006-04-05 13:58:33 EDT
I just released the fix today. It will be in tomorrow's build.
Comment 6 Kevin Barnes CLA 2006-04-06 08:43:09 EDT
*** Bug 135240 has been marked as a duplicate of this bug. ***
Comment 7 Kevin Barnes CLA 2006-04-07 12:35:09 EDT
*** Bug 108321 has been marked as a duplicate of this bug. ***
Comment 8 Darin Wright CLA 2006-04-27 15:06:57 EDT
Launch removal notification should be performed synchronously as before. Removed job from LaunchManager and LaunchConfigurationsManager.

Verified.
Comment 9 Darin Wright CLA 2006-05-15 11:01:44 EDT
*** Bug 100700 has been marked as a duplicate of this bug. ***
Comment 10 Darin Wright CLA 2006-06-06 11:38:32 EDT
*** Bug 145551 has been marked as a duplicate of this bug. ***