Bug 563609 - Zombie progress entries in the Progress view
Summary: Zombie progress entries in the Progress view
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.16   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2020-05-26 17:11 EDT by Andrey Loskutov CLA
Modified: 2020-05-27 04:23 EDT (History)
3 users (show)

See Also:


Attachments
zombie jobs (122.03 KB, image/png)
2020-05-26 17:11 EDT, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2020-05-26 17:11:56 EDT
Created attachment 283027 [details]
zombie jobs

Not sure if this is a recent regression or not, but I believe this could be one (> 4.12). 

After switching to 4.15 platform (from 4.12) we've noticed that build job "hangs" in the Progress view even the build was done for a long time. Also while preparing patch for bug 563608 I noticed that also other jobs may stay there shown as "sleeping", and to get rid of them one has to explicitly click on "Remove all finished operations" button.

Looks like DetailedProgressViewer seem to keep some entries forever. The bad thing about it - we use testing framework where we check if some operation is done or not by just observing the Progress view elements and reading labels there. That is very convenient, because we don't need to rely on any API / write any Java code to do that, all is scriptable.

That doesn't work of course if some elements stay there forever :-(

Screenshot shows 3 "zombie" jobs in the Progress view, and no corresponding workers in the debugger view (after some time waiting), so I assume that the problem is real. The jobs itself that are "left hanging" seem to be arbitrary.
Comment 1 Andrey Loskutov CLA 2020-05-26 17:59:22 EDT
In debugger I see that DetailedProgressViewer.jobItemControls seem to keep the zombie entries, while FinishedJobs is empty. 

This means, we do not properly dispatch updates to DetailedProgressViewer - either or:
* ProgressViewUpdater.throttledUpdate is not properly sending updates
* ProgressViewUpdater.update() logic is flawed
* UpdatesInfo.processForUpdate() logic is flawed 
* DetailedProgressViewer.remove(JobTreeElement...) is buggy.

Also we might have an issue with JobTreeElement that implement compareTo() in an unstable way, so if they are equal, we might see issues by retrieving them from maps.

I have no time to work on this, but I hope someone has :-).
Comment 2 Thomas Wolf CLA 2020-05-27 03:56:33 EDT
Andrey, the jobs shown in your screenshot are scheduled periodic system jobs. They're not hanging and they're not zombies, they're just waiting for their next run. I presume the "Zzz" icon is supposed to indicate "sleeping" (as in comics), not "zombie".

That said, I sometimes also see finished build jobs with a gray "x" icon at the right. I wonder if that may be caused by some jobs not calling monitor.done() in all cases.
Comment 3 Paul Pazderski CLA 2020-05-27 04:23:15 EDT
@Andrey: from Thomas description you might have the "Show sleeping and system jobs" option enabled.

@Thomas: any job could set the 'KEEP' property to keep the job after finishing in progress view and afair this is in any case done on job failures. If the progress entry has no progress bar I don't think monitor.done() is the problem.