Bug 170356 - Build not interrupting on editor save
Summary: Build not interrupting on editor save
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 3.3 M6   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-12 15:09 EST by John Arthorne CLA
Modified: 2007-02-27 09:39 EST (History)
3 users (show)

See Also:


Attachments
Stack dump when editor is blocked by build (28.66 KB, text/plain)
2007-01-12 15:10 EST, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2007-01-12 15:09:40 EST
Build: 3.3 M4

I am noticing that autobuild is no longer interrupting when I perform editor save.Editor save should be attempting to beginRule on a resource scheduling rule.  Autobuild job should then notice this thread waiting, and abort the build.

I don't know if this is something that has changed in the editor save, or something I have done in resources, but it needs further investigation.
Comment 1 John Arthorne CLA 2007-01-12 15:10:42 EST
Created attachment 56847 [details]
Stack dump when editor is blocked by build
Comment 2 Boris Bokowski CLA 2007-01-12 15:44:16 EST
I believe that the background save support that I put into M4 only changes the save behaviour when the saveable supports background save, and I am quite sure that nothing in the SDK supported background save in M4.

I just removed the code that used scheduling rules from the background save implementation, and would suggest that the investigation be performed based on HEAD, or based on builds after today.
Comment 3 John Arthorne CLA 2007-02-13 12:18:52 EST
Must investigate for 3.3. Possibly related to fix for bug 164496.
Comment 4 Markus Keller CLA 2007-02-15 06:39:53 EST
The autobuild job also blocks CVS actions such as Replace With > Latest from HEAD. I always have to kill the job at least two times before the CVS job can make progress.
Comment 5 Markus Keller CLA 2007-02-20 12:01:55 EST
Same problem when build is running and I try to import plug-ins from target platform.
Comment 6 John Arthorne CLA 2007-02-20 17:11:44 EST
The fix for bug 164496 was to immediately reschedule the autobuild job upon interruption.  Waiting thread jobs don't compete for scheduling rules according to a fair queuing scheme, so when the autobuild completes there is a race for who gets the lock.  It can easily occur that the rescheduled autobuild grabs the lock first.  In this case the waiting thread job (editor save) is starved and continues to be blocked by the autobuild.

Normally when autobuild job is scheduled, it is given a scheduling delay within bounds of MIN_SCHEDULING_DELAY (default 100ms) and MAX_SCHEDULING_DELAY (default 1000ms), depending on how recently it has run.  I think the rescheduling of the autobuild should also follow these bounds rather than eagerly rescheduling. This will give an opportunity for other threads to compete for the scheduling rule.
Comment 7 John Arthorne CLA 2007-02-20 17:38:40 EST
Fix released (AutobuildJob)
Comment 8 Dani Megert CLA 2007-02-27 03:02:42 EST
John, I see that you backported the "fix" for bug 164496 to 3.2.2 (see bug 167178). Does that mean 3.2.2 now suffers from this bug here? That would be pretty bad and should be corrected in a subsequent build.
Comment 9 John Arthorne CLA 2007-02-27 09:39:56 EST
Yes, it's quite possible the same regression went into 3.2.2, although nobody has reported a problem.  Since there are no further 3.2.x maintenance releases planned there's not much we can do.