| Summary: | Windows File Locks are obtained on bundles exporting extension points and not released. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Ed Costello <edward.costello> | ||||
| Component: | UI | Assignee: | Curtis Windatt <curtis.windatt.public> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ankur_sharma, curtis.windatt.public, darin.eclipse, edward.costello, Olivier_Thomann, simon.lieschke | ||||
| Version: | 3.7 | Flags: | curtis.windatt.public:
review?
(ankur_sharma) |
||||
| Target Milestone: | 3.6.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ed Costello
Created attachment 179592 [details]
Reproduction of this Issue
Confirmed using PDE code from HEAD on linux. If the plug-in manifest builder has run, there is a lock opened on the bundle in the target. I couldn't find anything in the builder code that would lock the file. I expect that buried somewhere in the builder we open the jar to get the schema file. The schema file would be used to verify the contents of plug-in.xml. I'll do some more digging. The file is opened in SchemaUtil.getInputStream(URL). Darin thinks there may be a known issue with url.openStream(). Olivier, do you happen to know anything about it? We do use open stream in many places in the platform. Fixed in HEAD. Added two addtions: 1) When opening the url connection, if it is a jar file connection setUseCaches is set to false. This results in the file being closed when the stream is no longer being used. It also avoids connection issues that others have had. 2) If the connection is a jar file connection, the jar file is obtained an explicitly closed. In my test cases (1) was enough to close the file, but since the behaviour can change based on the JRE being used, it is better to have the additional check. I used code from JDT (JavaElement) for reference. See Schema, SchemaUtil and SchemaTraversePerfTest Thanks for the quick resolution, would it be possible to back port this fix to a 3.6 service pack? This is causing significant pain for our windows based developers and we'd like to take advantage of it without waiting for 3.7. Reopening to consider for 3.6.2. I'm on the fence whether this is something we want to backport. It's not a trivial fix, but it should be safe. I have committed the code to the maintenance branch. Ankur, please verify. ping Ankur, Please verify this when going through the 3.6.2 test pass. Verified in M20110112-0800 3.6.2. is not holding file locks |