| Summary: | OperationCanceledException when opening task | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mik Kersten <mik.kersten> | ||||||||||
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | minor | ||||||||||||
| Priority: | P2 | CC: | robert.elves, shawn.minto, steffen.pingel, thomas.ehrnhoefer | ||||||||||
| Version: | unspecified | ||||||||||||
| Target Milestone: | 3.4 | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 154396, 334302 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Mik Kersten
The UI thread was interrupted while waiting for the task list lock. I can reproduce this in the debugger when setting a break point in TaskList.lock() and opening an editor: Thread [Worker-8] (Suspended (breakpoint at line 841 in Thread)) Thread.interrupt() line: 841 UILockListener.interruptUI() line: 166 UISynchronizer.syncExec(Runnable) line: 166 Display.syncExec(Runnable) line: 4018 ActivityContextManager.getStructureHandle() line: 224 ActivityContextManager.addMonitoredActivityTime(long, long) line: 107 ActivityContextManager.access$10(ActivityContextManager, long, long) line: 103 ActivityContextManager$CheckActivityJob.run(IProgressMonitor) line: 193 Worker.run() line: 55 How frequently is addMonitoredActivityTime() invoked? I am not sure that it's a good idea to use Display.syncExec(). The active working set could be tracked with a listener for instance and stored in a field on the class. Created attachment 103661 [details]
throw core exception when cancelled
We either need to throw this as a core exception (as in the patch) or simply ignore all together. This patch throws the core exception with CANCEL status.
Haven't had this happen but will keep this report alive for 3.1 in case we get more input on it. *** Bug 237386 has been marked as a duplicate of this bug. *** The saving interval of the task list is now 42 seconds which should decrease the chances of this happening but we will need to investigate a proper solution for 3.0.1. I have committed a work around for 3.0.2 to retry once but this operation should be moved into a job instead. Is there any chance that for 3.0.2 a task will fail to open and end up with that blank editor whose tab says "label"? I haven't seen this since the fix was committed but, yet, there is a slight chance, if the task list saving takes longer than 6 seconds for instance. I don't think I've seen it since either. *** Bug 246596 has been marked as a duplicate of this bug. *** Created attachment 158369 [details]
work-around
Created attachment 158370 [details]
mylyn/context/zip
I have committed the attached work-around. Fixing the underlying problem would require moving all code that runs on the UI thread and acquires task list locks to run on separate threads to avoid interruptions. That is a large refactoring and out of the scope of the current milestone. Created attachment 159121 [details]
fix life-lock
*** Bug 342878 has been marked as a duplicate of this bug. *** I have opened bug 390159 to track further improvements since we still have tests failing intermittently because of this problem. |