Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357655

Summary: Synchronization in RSEProcess.waitFor() and RSEProcess.destroy() is problematic
Product: [Tools] PTP Reporter: Chris Recoskie <recoskie>
Component: CoreAssignee: Project Inbox <ptp-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: g.watson
Version: 4.0.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Chris Recoskie CLA 2011-09-14 12:08:18 EDT
Similar problem to Bug 357653

I've run into this problem... this is an over-simplification of the scenario
(the local builders do not exhibit this problem), but it illustrates the issue.


- Remote make builder creates an RSEProcess to do the build and launches a thread to keep tabs on it.  If this thread notices that the progress monitor is canceled, it will try to destroy the process

- the builder then does a waitFor() on the make process to know when the build
is done, and update the progress accordingly

- user cancels the progress monitor, but RSEProcess.destroy() blocks because the builder holds the lock on the process via its call to waitFor()

I don't think destroy() should ever by synchronized.  You should be able to
kill a given process no matter what state it's in;  it's your last resort
against something that's running amok.  Having it synchronized means you are
forced to wait for it to complete if anyone anywhere is waiting for it to
complete.
Comment 1 Greg Watson CLA 2018-06-08 09:57:58 EDT
This component has been deprecated.