Community
Participate
Working Groups
The Autobuild in my Xtext development workspace keeps building xtend.website.generator in an infinite loop. I'm using Xtend IDE 2.8.0.v201502071251. Xtext Builder Log: [Worker-125] Building xtend.website.generator [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/XtendWebsiteGenerator.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Index.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Documentation.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/AbstractXtendWebsite.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Download.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Community.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/ReleaseNotes.xtend [Worker-125] indexing platform:/resource/xtend.website.generator/src/generator/xtend/News.xtend [Worker-125] Build xtend.website.generator in 2663 ms [Worker-124] Building xtend.website.generator [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/XtendWebsiteGenerator.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Index.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Documentation.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/AbstractXtendWebsite.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Download.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Community.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/ReleaseNotes.xtend [Worker-124] indexing platform:/resource/xtend.website.generator/src/generator/xtend/News.xtend [Worker-124] Build xtend.website.generator in 918 ms [Worker-119] Building xtend.website.generator [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/XtendWebsiteGenerator.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Index.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Documentation.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/AbstractXtendWebsite.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Download.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/Community.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/ReleaseNotes.xtend [Worker-119] indexing platform:/resource/xtend.website.generator/src/generator/xtend/News.xtend [Worker-119] Build xtend.website.generator in 1053 ms
Same with org.eclipse.xtend.core.tests
I also observe many interrupted builds also on a machine that's otherwise idle
This is the loop: 1. IncrementalProjectBuilder.isInterrupted() is true, so XtextBuilder.build(int, Map, IProgressMonitor) throws an OperationCanceledException. 2. BuildManager.getSafeRunnable().new ISafeRunnable() {...}.handleException(Throwable) catches the exception and calls currentBuilder.forgetLastBuiltState(); 3. The AtoBuildJob schedules itself again in AutoBuildJob.canceled() it an OperationCanceledException is thrown and the job is marked as interrupted. 4. Because the LastBuildState was forgotten, the next build is a full build. 5. At some point, the build is marked as ‘interrupted’ again because Job.isBlocking() returns true. Long story short, something keeps interrupting my AutoBuilds so that the next build is a full build.
On my Machine, it's always the Job ThreadJob(Updating Git status for repository org.eclipse.xtext(691),[R/]) that causes the AutoBuild to feel like it's blocking something.
The EGit Job is a thread-job, i.e. it's not a subclass of Job, but implicitly became a job by calling JobManager.beginRule(). This is its stack trace: Thread [Worker-72] (Suspended) waiting for: Object (id=998) Object.wait(long) line: not available [native method] Object.wait() line: 502 ThreadJob.waitForRun(ThreadJob, IProgressMonitor, InternalJob, Thread) line: 270 ThreadJob.joinRun(ThreadJob, IProgressMonitor) line: 197 ImplicitJobs.begin(ISchedulingRule, IProgressMonitor, boolean) line: 92 JobManager.beginRule(ISchedulingRule, IProgressMonitor) line: 306 IndexDiffCacheEntry.waitForWorkspaceLock(IProgressMonitor) line: 359 IndexDiffCacheEntry.access$3(IndexDiffCacheEntry, IProgressMonitor) line: 351 IndexDiffCacheEntry$5.updateIndexDiff(Collection<String>, Collection<IResource>, IProgressMonitor) line: 408 IndexDiffCacheEntry$5(IndexDiffUpdateJob).run(IProgressMonitor) line: 74 Worker.run() line: 55
New Gerrit change created: https://git.eclipse.org/r/41526
Gerrit change https://git.eclipse.org/r/41526 was merged to [master]. Commit: http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=33a97a72a61e3f6749b2c27517127db0c9d38281
fixed.
Changed code a bit to make it clearer that we are exiting the build on interruption.
I'm seeing this on my machine atm.
The egit job (IndexDiffUpdateJob) still frequently interrupts our builds, as it is not super regularly scheduled (every ten seconds, see org.eclipse.egit.ui.Activator.RepositoryChangeScanner.REPO_SCAN_INTERVAL The job itself doesn't have a scheduling rule, but it calls org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.waitForWorkspaceLock(IProgressMonitor) private void waitForWorkspaceLock(IProgressMonitor monitor) { // Wait for the workspace lock to avoid starting the calculation // of an IndexDiff while the workspace changes (e.g. due to a // branch switch). // The index diff calculation jobs do not lock the workspace // during execution to avoid blocking the workspace. IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); try { Job.getJobManager().beginRule(root, monitor); } catch (OperationCanceledException e) { return; } finally { Job.getJobManager().endRule(root); } } All non-system jobs with the same scheduling rule will make the AutoBuildJob interrupted. I think the cause is, that the scheduled job is not a system job. Another effect of a system job is that it is not shown in the UI. I have filed a bugzilla for egit about this : https://bugs.eclipse.org/bugs/show_bug.cgi?id=474003 For the time being we need to somehow deal with this.
GitHub Pull Request 443 created by [svenefftinge] https://github.com/eclipse/xtext/pull/443
merged
Requested via bug 522520. -M.
I don't understand how this can be a fix. If there is a problem with an EGIT job, then where is the EGIT bug awaiting a fix? If there is not a problem with an EGIT job, then why is Xtext modifying EGIT jobs? Given the outstanding Xtext builder/indexer issues this kind of fudge seems like a recipe for making a bad situation worse, if not today, after an EGIT evolution.
please discuss at https://github.com/eclipse/xtext-eclipse/issues/251
(In reply to Christian Dietrich from comment #17) > please discuss at https://github.com/eclipse/xtext-eclipse/issues/251 I don't see why. Bugzilla is the EF bug reporting network. Xtext is an EF supported project. XtextBuilder.java has the text: * This is a fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459525 This bug had no reference to anything else.
xtext uses github issues. bugzilla is legacy. it just there cause auf aeri and cause there is no editable but no new issues mode afaik. nobody reads or care about bugzilla. i am just nice answering you here. https://github.com/eclipse/xtext-eclipse/issues/251 is about getting rid about this workaround. discussing the same thing at 20 different places makes no sense to me.