Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 381882

Summary: [mirror] p2 doesn't detect corruption when mirroring packed artifacts
Product: [Eclipse Project] Equinox Reporter: Tobias Oberlies <t-oberlies>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: benjamin.dev, Ed.Merks, mn, pascal
Version: 3.8.0 Juno   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 373173    

Description Tobias Oberlies CLA 2012-06-06 12:14:37 EDT
AFAIK, all pack200 compressed artifacts in the common Eclipse.org repositories don't have the download.md5 property set (see publisher bug 271707).

When mirroring such an artifact with org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest (i.e. a mirror operation that involves the processing steps), a corruption on the network (or in the unpack200 step) is *not* detected. The only processing step that comes after the unpack, the org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier, reports that the file is not signed if the artifact isn't a ZipFile any more.

We reconstructed that the exception when opening the corrupted file is caught here:
	at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile:73)
	at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getEntry(ZipBundleFile:245)
	at org.eclipse.osgi.internal.signedcontent.SignatureBlockProcessor.process(SignatureBlockProcessor:38)
	at org.eclipse.osgi.internal.signedcontent.SignedBundleFile.setBundleFile(SignedBundleFile:47)
	at org.eclipse.osgi.internal.signedcontent.SignedBundleHook.getSignedContent(SignedBundleHook:256)
	at org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier.verifyContent(SignatureVerifier:77)

The problem of successfully mirrored, corrupted artifacts can be regularly seen in Tycho builds (bug 373173) if you happen to be behind a proxy with "bad days".
Comment 1 Ed Merks CLA 2020-02-19 03:27:11 EST
Is this issue still current?  If so, how could I reproduce it to fix something?