| Summary: | Deadlock can occur between JSPModelProcessor and tag registry via MD framework | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Java Server Faces | Reporter: | Cameron Bateman <cameron.bateman> | ||||
| Component: | Core | Assignee: | Cameron Bateman <cameron.bateman> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | carlin.rogers, gerry.kessler, raghunathan.srinivasan | ||||
| Version: | 3.2 | Flags: | raghunathan.srinivasan:
pmc_approved+
raghunathan.srinivasan: pmc_approved? (david_williams) raghunathan.srinivasan: pmc_approved? (naci.dai) deboer: pmc_approved+ raghunathan.srinivasan: pmc_approved? (neil.hauge) raghunathan.srinivasan: pmc_approved? (kaloyan) carlin.rogers: review+ gerry.kessler: review+ |
||||
| Target Milestone: | 3.2 RC3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | PMC_approved | ||||||
| Attachments: |
|
||||||
|
Description
Cameron Bateman
Created attachment 169746 [details]
Proposed fix.
This attempts to resolve the problem in a similar way to the fix for ModelManagerImpl. As I've stated on that issue, I don't think this is a long term solution, however it eliminates the chance of this particular deadlock involving rule locks and the MetadataManager lock. The problem remains that that we can't predict the order of locks held when called, take a lock and then call out into code we don't control (i.e. the tag registry with all its possible locators).
This stop gap attempts to resolve the situation by spinning on a ReentrantLock with 5000 second timeouts. Each time it fails to take the lock, it attempts to yield any rules it holds. Ultimately, MD model acquisition will fail after 30seconds.
> with 5000 second timeouts. Each time it fails to take the lock, it attempts to
Meant 5000 milliseconds :)
Good fix * Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. This is a stop-ship bug. The fix avoids a deadlocak scenario discovered during testing. * Is there a work-around? If so, why do you believe the work-around is insufficient? No workaround. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Manual testing, reviewed by Carlin and Gerry. * Give a brief technical overview. Who has reviewed this fix? See comment 1. * What is the risk associated with this fix? low-medium Patch applied to HEAD (3.2M3). |