Bug 136666 - JAR verification happening on startup
Summary: JAR verification happening on startup
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Branko Tripkovic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-13 11:42 EDT by John Arthorne CLA
Modified: 2006-05-03 17:48 EDT (History)
2 users (show)

See Also:


Attachments
Patch (2.55 KB, patch)
2006-04-13 12:34 EDT, John Arthorne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2006-04-13 11:42:43 EDT
Build id: I20060413-0010

All JARs in the SDK are now signed.  This is causing some expensive JAR verification to happen, induced by IniFileReader.  I'm not sure yet where is the best place to fix this. Here is the stack trace that leads to the verification:

URLJarFile(JarFile).maybeInstantiateVerifier() line: 315
URLJarFile(JarFile).getInputStream(ZipEntry) line: 423
JarURLConnection.getInputStream() line: 146
URL.openStream() line: 941
IniFileReader.load(URL, URL, URL) line: 317
IniFileReader.load() line: 138
AboutInfo.readFeatureInfo(String, String, String) line: 69
FeatureEntry.getProperty(String) line: 241
BundleGroupProperties.getWelcomePageUrl(IBundleGroup) line: 195
BundleGroupProperties.getWelcomePageUrl() line: 103
AboutInfo.getWelcomePageURL() line: 298
WorkbenchActionBuilder.hasWelcomePage(AboutInfo[]) line: 1528
WorkbenchActionBuilder.makeFeatureDependentActions(IWorkbenchWindow) line: 1485
WorkbenchActionBuilder.makeActions(IWorkbenchWindow) line: 1290
WorkbenchActionBuilder(ActionBarAdvisor).fillActionBars(int) line: 147
WorkbenchActionBuilder.fillActionBars(int) line: 350
WorkbenchWindow.fillActionBars(int) line: 3069
WorkbenchWindow.<init>(int) line: 347
Comment 1 John Arthorne CLA 2006-04-13 11:50:13 EDT
This trace seems to happen once per feature plugin, for a total of 9 times in the SDK.
Comment 2 Dejan Glozic CLA 2006-04-13 12:26:38 EDT
Based on the stack, it seems that it is trying to fetch the intro URL file. This is backward compatibility support for <3.0 Welcome support. Since we are now in 3.2, we may simply fix it by not making this check any more. I am not aware of feature still producing old Welcome content.
Comment 3 John Arthorne CLA 2006-04-13 12:33:09 EDT
Jeff and I looked through this, and looks like an alternative fix is to not resolve bundle URLS into jar: URLs in the class IniFileReader.  If bundle URLs are used, then we control at the OSGi level whether verification happens or not.  If JAR URLs are used, you have no choice as verification happens by default.  I will attach a patch that I have run some basic tests on, and it seems to fix the problem.
Comment 4 John Arthorne CLA 2006-04-13 12:34:34 EDT
Created attachment 38524 [details]
Patch

Note I have only done minimal testing of this.  It would be good for someone who is familiar with this code path to verify (we couldn't see why the URLs were being resolved, but perhaps there was some reason?)
Comment 5 John Arthorne CLA 2006-04-13 13:01:08 EDT
I'm not convinced that it's essential to fix this for RC2.  With the other turmoil today it might be better to wait until after we declare RC2.
Comment 6 John Arthorne CLA 2006-04-13 15:48:30 EDT
On the other hand, if removing support for <3.0 Welcome buys us some startup improvement, it might be worth going with that fix instead of or in addition to my patch.  We'll take any startup performance improvement we can get.
Comment 7 Dejan Glozic CLA 2006-04-13 16:26:05 EDT
It may help, but PDE is reporting big drop in performance for plug-in resolution step. This is a more persistent problem that we should try to address in a more substantial way.
Comment 8 Dejan Glozic CLA 2006-04-13 16:26:32 EDT
Meant to say 'pervasive'.
Comment 9 John Arthorne CLA 2006-04-13 17:28:13 EDT
We have decided to pull JAR signing for Eclipse 3.2.  However, we still want to get these fixes in if possible.  We know that some people will want to take Eclipse 3.2 and sign it, and we will likely be putting signing back into the builds after 3.2 has shipped.
Comment 10 Jeff McAffer CLA 2006-04-17 21:37:24 EDT
The importance of running well with signed bundles has not gone away.  We have just decided that we should not, for now, force the consequences of signing on everyone at this stage in the release cycle.  Fixes like this are strongly encouraged.
Comment 11 John Arthorne CLA 2006-04-27 11:49:28 EDT
Can this fix be considered for RC3?  Signing is still important for many people in the community, even though we are not signing 3.2 ourselves. If the fix works it improves startup performance in the signed JAR case, it's worth getting this in for 3.2.
Comment 12 Dejan Glozic CLA 2006-04-27 12:08:53 EDT
(In reply to comment #11)
> If the fix
> works it improves startup performance in the signed JAR case, it's worth
> getting this in for 3.2.

John, I am a bit concerned about the comment 'if the fix works'. At this stage, I would assume that patches for such a sensitive code (update configurator) have been unit tested before proposing.

Comment 13 John Arthorne CLA 2006-04-27 12:20:04 EDT
I don't know the code well enough to be confident that my patch is the best fix... I was hoping someone who knows that code could comment on it.  I tested it to the extent that I started Eclipse with the patch running, I stepped through the code in the debugger to be sure that it was being executed, and no problems occurred.  However, I don't have any context on what this code is doing, what the expected behaviour is, etc... if it is a code path for pre-3.0 welcome, perhaps a plugin that uses pre-3.0 welcome needs to be installed to properly test it?
Comment 14 Jeff McAffer CLA 2006-05-01 23:04:10 EDT
What's up here?
Comment 15 Dejan Glozic CLA 2006-05-02 10:08:52 EDT
RC3 candidate - Branko, please check if there are any side effects when running 3.2 tests with this.
Comment 16 Branko Tripkovic CLA 2006-05-03 13:43:01 EDT
Released.
Comment 17 Dejan Glozic CLA 2006-05-03 15:01:20 EDT
Need formal votes.

Dejan adds +1.
Comment 18 Dejan Glozic CLA 2006-05-03 15:02:01 EDT
Jeff, need additional +1 before releasing.
Comment 19 Dejan Glozic CLA 2006-05-03 16:38:57 EDT
Wassim, you can help Jeff to unblock this backlog. This bug is checked and ready to go.
Comment 20 Wassim Melhem CLA 2006-05-03 16:41:19 EDT
+1 for RC3
Comment 21 Branko Tripkovic CLA 2006-05-03 17:48:33 EDT
fixed