| Summary: | Synchronization looks fishy in org.eclipse.ui.console.IOConsoleOutputStream | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie, pawel.1.piech |
| Version: | 3.8 | ||
| Target Milestone: | 4.3 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Dani Megert
I agree, since the class is not to be used (noinstantiate and noextend) and all of the write methods call encodedWrite, we could just synchronize that method. pushed fix to: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=82015c577ff5e8dce7172b91f80218760f027bfa I tried to review the fix, and while adding the synchronized to the write method seems correct, the overall synchronization in IOConsoleOutputStream and IOConsolePartitioner still seems pretty scary. There's a half dozen locks used between the two and IOConsole (not counting the UI thread or the jobs), and they hold references to each other. Given the fact that there's no deadlocks being reported it's likely that everything matches up, but small changes in this code could have dangerous consequences. See bug 421303 for a potential follow-up issue. |