Bug 301609 - Regression: A build doesn't cancel if I tell it to Cancel
Summary: Regression: A build doesn't cancel if I tell it to Cancel
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.4.2   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2010-02-02 18:26 EST by swright CLA
Modified: 2010-04-23 08:20 EDT (History)
5 users (show)

See Also:
markus.kell.r: review+


Attachments
build.xml (1.09 KB, text/xml)
2010-03-19 11:13 EDT, Markus Keller CLA
no flags Details
patch (7.01 KB, patch)
2010-04-22 11:46 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swright CLA 2010-02-02 18:26:19 EST
Build Identifier: M20090211-1700

I am executing a build using a custom build.xml. I change my mind and want to cancel. I click the red square, and now next to 'Build Project' it says '(cancel requested)'. I wait 10 minutes and Eclipse is still trying to build my project. The cancel button does not actually seem to do anything.

Reproducible: Always

Steps to Reproduce:
Try to build a project and then try to force it to cancel.
Comment 1 Remy Suen CLA 2010-02-02 19:45:17 EST
(In reply to comment #0)
> Try to build a project and then try to force it to cancel.

Since you mention a build.xml, this is an Ant build? Does the Ant build kick off other processes? Do you get this problem with building a regular Java project? Is the problem reproducible? If yes, can you attach a thread dump?
http://wiki.eclipse.org/How_to_report_a_deadlock
Comment 2 Markus Keller CLA 2010-03-19 11:13:15 EDT
Created attachment 162530 [details]
build.xml

This works fine for me in 3.5.2.

In I20100316-0859, I can reproduce with these steps:
- create an Ant launch config for the attached build.xml
- on the JRE tab, check "Run in the same JRE as the workspace"
- run as Ant build
=> Terminate button in Debug view is initially enabled, but clicking it only disables the button but does not stop the Ant build.
=> Terminate button in Console stays enabled, but clicking it does nothing.
Comment 3 Michael Rennie CLA 2010-03-25 14:04:13 EDT
could be related to the bundle split from bug 264338
Comment 4 Michael Rennie CLA 2010-03-25 14:05:10 EDT
Also reproduced on Linux and Mac, updating platform...
Comment 5 Darin Wright CLA 2010-04-22 11:46:15 EDT
Created attachment 165782 [details]
patch

There were two issues here. (1) The launcher was incorrectly launching in the foreground (when launch in background was checked). (2) The Ant process needs to wrapper the launch progress monitor when running in the foreground.

Problem (1) was introduced when splitting the ant/external tools launcher into headless code. External tool builders run synchronously by default, where as ant launches do not.
Comment 6 Darin Wright CLA 2010-04-22 11:50:45 EDT
Fixed. Please verify, Markus.
Comment 7 Markus Keller CLA 2010-04-23 08:20:39 EDT
Verified in N20100422-2133.