Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363522 - Corrupt bundle jar not detected
Summary: Corrupt bundle jar not detected
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 14:33 EST by Dean Roberts CLA
Modified: 2019-09-20 14:35 EDT (History)
6 users (show)

See Also:


Attachments
Bad jar file (64 bit windows) (4.41 MB, application/octet-stream)
2011-11-10 14:35 EST, Dean Roberts CLA
no flags Details
Stack Trace (9.96 KB, text/plain)
2011-11-10 14:37 EST, Dean Roberts CLA
no flags Details
Stack Trace with osgi.signedcontent.support=runtime set (9.10 KB, text/plain)
2011-11-10 14:47 EST, Dean Roberts CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Roberts CLA 2011-11-10 14:33:00 EST
I was running     
  Eclipse SDK	4.2.0.I20111014-1625

And used P2 to update to
  Eclipse SDK	4.2.0.I20111108-2200

The update seemed to proceed correctly.  However, after the update I started getting ClassFormatException in org.eclipse.jdt.internal.codeassist/InternalCompletionContext

After some investigation it turns out that this single .class file in the .jar file has an invalid CRC.

The the issue is:

1) Eclipse is loading and running invalid jars

and POSSIBLY

2) P2 downloaded and installed an invalid jar.

I say possibly, since I don't really know where, when or how the file was corrupted.
Comment 1 Dean Roberts CLA 2011-11-10 14:35:05 EST
Created attachment 206809 [details]
Bad jar file (64 bit windows)
Comment 2 Dean Roberts CLA 2011-11-10 14:37:50 EST
Created attachment 206810 [details]
Stack Trace
Comment 3 Matthew Piggott CLA 2011-11-10 14:38:03 EST
What was the repository the JAR came from?

p2 verifies hashes for files when it downloads them if they are defined.
Comment 4 Dean Roberts CLA 2011-11-10 14:45:39 EST
I ran with the bad jar file with the following property set:

osgi.signedcontent.support=runtime

Startup still looked clean.  Upon invoking code assist I get a NoClassDefFoundError instead of the ClassFormatError
Comment 5 Dean Roberts CLA 2011-11-10 14:47:01 EST
Created attachment 206811 [details]
Stack Trace with osgi.signedcontent.support=runtime set
Comment 6 Dean Roberts CLA 2011-11-10 14:49:03 EST
(In reply to comment #3)
> What was the repository the JAR came from?
> 
> p2 verifies hashes for files when it downloads them if they are defined.

The update came from

http://download.eclipse.org/eclipse/updates/4.2-I-builds
Comment 7 Thomas Watson CLA 2011-11-10 14:59:50 EST
(In reply to comment #4)
> I ran with the bad jar file with the following property set:
> 
> osgi.signedcontent.support=runtime
> 
> Startup still looked clean.  Upon invoking code assist I get a
> NoClassDefFoundError instead of the ClassFormatError

That is less than fortunate.  I opened bug 363528 to try and improve that error condition.
Comment 8 DJ Houghton CLA 2011-11-10 15:22:13 EST
After talking to Dean it is unclear if this error occurred immediately after an update, or at a later point in time. Most likely it was later since the error happens (with a modal dialog) whenever code assist tries to run and he has "auto code assist" enabled in his workspace.
Comment 9 Eclipse Genie CLA 2019-09-20 14:35:35 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.