| Summary: | Deadlock between UIThread and UICallback worker thread | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Phil Xue <phil.xue> | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | critical | ||||||||
| Priority: | P2 | CC: | chris, fwaibel, Istvan.Ballok, rsternberg | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 1.4 RC1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | sr132 | ||||||||
| Attachments: |
|
||||||||
|
Description
Phil Xue
Created attachment 182258 [details]
thread dump
thread dump file attached for ease of reading
Created attachment 184531 [details]
Patch to fix the deadlock
The problem is that the UICallBackManager calls Display methods (in UIThread) to get the runnable count while the Display calls UICallBackManager methods in a backgroundThread (asyncExec) to wake a blocked UICallBack request. Both Display and UICallBackManager acquire their own locks in the respective methods.
With this patch, the Synchronizer notifies the UICallBackManager when the runnables queue changes from empty to filled (or vice versa) so that the UICallBackManager does not need to access the Display anymore.
Applied patch to 1.3 branch after reviewing with RĂ¼diger. For HEAD, I'll try to find a better solution, ideally one that doesn't involve two different locks for Display and UICallBackManager. (In reply to comment #3) > Applied patch to 1.3 branch after reviewing with RĂ¼diger. > For HEAD, I'll try to find a better solution, ideally one that doesn't involve > two different locks for Display and UICallBackManager. Is there any chance this will make it into 1.3.2 on feb 25th? (In reply to comment #4) > Is there any chance this will make it into 1.3.2 on feb 25th? Yes, the fix is included in 1.3.2. (In reply to comment #5) > (In reply to comment #4) > > Is there any chance this will make it into 1.3.2 on feb 25th? > > Yes, the fix is included in 1.3.2. What about 1.4 M5? (In reply to comment #6) > What about 1.4 M5? See comment 3. When this bug is fixed, the Target Milestone field will be set to the milestone that contains the fix. Applied patch to CVS HEAD. Will be available with 1.4 RC1. We decided to keep this fix as a basis for a rework of the UICallback mechanism in 1.5. Opened bug 344989 for this re-design. |