Bug 225272 - Problems with spawner and fast (Dual Core) machines
Summary: Problems with spawner and fast (Dual Core) machines
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 5.0 M7   Edit
Assignee: Anton Leherbauer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 217292 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-02 04:32 EDT by Johann Draschwandtner CLA
Modified: 2008-09-09 10:10 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (4.28 KB, patch)
2008-04-02 04:32 EDT, Johann Draschwandtner CLA
bjorn.freeman-benson: iplog+
Details | Diff
spawner.dll built with MinGW (39.61 KB, application/octet-stream)
2008-04-03 07:03 EDT, Anton Leherbauer CLA
bjorn.freeman-benson: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***