This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Deadlock when creating a web service. | ||
---|---|---|---|
Product: | webservices | Reporter: | _ pcw <pcw> |
Component: | Code | Assignee: | Andrei Badea <abadea> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | abadea, jglick, tzezula |
Priority: | P2 | Keywords: | THREAD |
Version: | 4.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Deadlock vm threaddump.
An attempt to fix |
Description
_ pcw
2005-02-23 21:11:28 UTC
Created attachment 20490 [details]
Deadlock vm threaddump.
looks like the "Error Annotation Queue" locks CompiledSourceForBinaryQuery.Result in getRoots and tries to get read access to project, while web service creation locks the project and tries to call fireChange on the Result. What is proper order for aquiring here? Annotation support holds CS4BQ and requests project mutex, AWT thread has project (it modifies projects files from wizard) and listener in web project wants CS4BQ. Tome, Jesse canyou commet this? While working on this bug, I have this other one http://www.netbeans.org/issues/show_bug.cgi?id=56413 related to java files lock I think... :-) Tomas and Jesse, any advice on this problem? Thanks. I tried hard, but I didn't manage to reproduce this deadlock. It seems that the "Error Annotation Queue" RP only starts after the WS wizard finishes. To reporter: can you still reproduce it? However, IMHO it could be fixed by making CS4BQ$Result.getRoots() unsynchronized. ISTM this method doesn't have to be synchronized. Tomas agrees. To reporter: if you can still reproduce, could you please try the attached diff? Created attachment 21106 [details]
An attempt to fix
Removed the synchronized keyword from CS4BQ$Result.getRoots() in order to match the J2SE project. Checking in CompiledSourceForBinaryQuery.java; /cvs/web/project/src/org/netbeans/modules/web/project/queries/CompiledSourceForBinaryQuery.java,v <-- CompiledSourceForBinaryQuery.java new revision: 1.11; previous revision: 1.10 done Checking in CompiledSourceForBinaryQuery.java; /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/queries/CompiledSourceForBinaryQuery.java,v <-- CompiledSourceForBinaryQuery.java new revision: 1.7; previous revision: 1.6 done No feedback from the reporter, and I believe my fix removes the deadlock. Marking as fixed, reopen if necessary. It seems so. |