Bug 225272

Summary: Problems with spawner and fast (Dual Core) machines
Product: [Tools] CDT Reporter: Johann Draschwandtner <johann.draschwandtner>
Component: cdt-coreAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: marko.tomljenovic
Version: 4.0.3Keywords: contributed
Target Milestone: 5.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch
bjorn.freeman-benson: iplog+
spawner.dll built with MinGW bjorn.freeman-benson: iplog+

Description Johann Draschwandtner CLA 2008-04-02 04:32:08 EDT
Created attachment 94500 [details]
proposed patch

This bug-report is an excerpt from 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217292

The proposed patch fixed the problems with the fast machine, but not the
original bug reported, therefore i created this entry.

Description:

The problematic steps were that in
Java_org_eclipse_cdt_utils_spawner_Spawner_exec0 a thread for watching the
process termination was started. It seemed that this thread couldn't get the
correct handle for the process to wait for. Therefore it terminated and for the
spawner treated this as if the process couldn't be started.
The patch I attached uses the no thread for the startup check, e.g. it waits
either for the waitEvent, which is triggered from starter.exe and indicates
that everything went ok, or for the process termination which indicates that
the starter.exe wasn't run correctly.

2nd part of the thread was to do the proper cleanup, which is still handled by
the thread, but it's only launched if everything started up correcly. When
passing the args to the thread procedure I noticed that some memory might get
screwed up, so I explicitely handled this.
Comment 1 Anton Leherbauer CLA 2008-04-03 03:23:41 EDT
Is the dll attached to bug 217292 still valid?
Comment 2 Johann Draschwandtner CLA 2008-04-03 03:29:30 EDT
Yes it is still valid. But I don't know the original CDT build
environment (if there is a dedicated one) that is used to build this for official releases.
Comment 3 Anton Leherbauer CLA 2008-04-03 07:03:57 EDT
Created attachment 94698 [details]
spawner.dll built with MinGW

The patch looks good to me.
I have built the dll with the Makefile from CVS using
- gcc version 3.4.2 (mingw-special)
- JDK 1.4.2_14
Comment 4 Anton Leherbauer CLA 2008-04-04 03:19:58 EDT
Committed to HEAD and cdt_4_0.
Thanks for the patch!
Comment 5 Doug Schaefer CLA 2008-09-09 10:10:28 EDT
*** Bug 217292 has been marked as a duplicate of this bug. ***