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

Bug 351828

Summary: PAR deploy - StackOverflowError
Product: [RT] Virgo Reporter: Vladimir Stevanovic <vstevanovic>
Component: runtimeAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: glyn.normington, vstevanovic
Version: 3.0.0.M06   
Target Milestone: 3.0.0.RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
PAR file. Some bundles contains only manifest file - it is sufficient for reproducing the bug none

Description Vladimir Stevanovic CLA 2011-07-12 08:22:46 EDT
If attached PAR file is deployed in Virgo (using hot deploy), error occurs and the following logs are generated.
Bug was reported on forum too.  (http://www.eclipse.org/forums/index.php/mv/msg/220061/695683/#msg_695683)

-event.log:
(...)
[2011-07-12 11:32:15.681] sync Event Dispatcher Thread <UR0001I> User region ready.
[2011-07-12 11:32:16.686] fs-watcher <HD0001I> Hot deployer processing 'INITIAL' event for file 'wf.par'.
[2011-07-12 11:32:44.927] fs-watcher <DE0000I> Installing par 'org.gs.editor.par' version '1.0.0'.
[2011-07-12 11:32:44.929] fs-watcher <DE0000I> Installing bundle 'org.gs.editor.par-1-com.healthmarketscience.rmiio' version '2.0.2'.
[2011-07-12 11:32:44.931] fs-watcher <DE0000I> Installing bundle 'org.gs.editor.par-1-com.mchange.c3p0-0.9.1.2-gs' version '0.9.1.2'.
[2011-07-12 11:32:44.933] fs-watcher <DE0000I> Installing bundle 'org.gs.editor.par-1-com.repsoftware.lm' version '9.1.3'.
[2011-07-12 11:32:44.935] fs-watcher <DE0000I> Installing bundle 'org.gs.editor.par-1-com.repsoftware.lm.win32' version '9.1.3'.
(...)
[2011-07-12 11:32:45.055] fs-watcher <DE0000I> Installing bundle 'org.gs.editor.par-1-org.restlet' version '1.1.7'.
[2011-07-12 11:32:47.874] fs-watcher <ME0003I> Dump 'serviceability\dump\2011-07-12-11-32-963' generated


-log.log:
(...)
[2011-07-12 11:32:45.286] INFO fs-watcher o.e.virgo.kernel.userregion.internal.quasi.DependencyCalculator Calculating missing dependencies of bundle(s) 'org.gs.editor.par-1-com.healthmarketscience.rmiio_2.0.2'
[2011-07-12 11:32:47.875] INFO fs-watcher org.eclipse.virgo.medic.eventlog.default ME0003I Dump 'serviceability\dump\2011-07-12-11-32-963' generated
[2011-07-12 11:32:59.885] WARN fs-watcher org.eclipse.virgo.kernel.deployer.hot.HotDeployer Listener threw exception for event INITIAL java.lang.StackOverflowError: null
at org.eclipse.osgi.internal.resolver.ExportPackageDescriptionImpl.getDirective(ExportPackageDescriptionImpl.java:114)
at org.eclipse.osgi.internal.resolver.ImportPackageSpecificationImpl.isSatisfiedBy(ImportPackageSpecificationImpl.java:90)
at org.eclipse.virgo.kernel.userregion.internal.equinox.UsesAnalyser.getResolvedCandidateExports(UsesAnalyser.java:144)
at org.eclipse.virgo.kernel.userregion.internal.equinox.UsesAnalyser.getCandidateExports(UsesAnalyser.java:269)
at org.eclipse.virgo.kernel.userregion.internal.equinox.UsesAnalyser.addUsedImportedPackages(UsesAnalyser.java:210)
at org.eclipse.virgo.kernel.userregion.internal.equinox.UsesAnalyser.addUsedImportedPackages(UsesAnalyser.java:214)
(x 1000 times)
at org.eclipse.virgo.kernel.userregion.internal.equinox.UsesAnalyser.addUsedImportedPackages(UsesAnalyser.java:214)
at org.eclipse.virgo.kernel.userregion.internal.equinox.UsesAnalyser.addUsedImportedPackages(UsesAnalyser.java:214)
(...)
Comment 1 Vladimir Stevanovic CLA 2011-07-12 08:30:25 EDT
Created attachment 199486 [details]
PAR file. Some bundles contains only manifest file - it is sufficient for reproducing the bug
Comment 2 Glyn Normington CLA 2011-07-13 05:02:28 EDT
Thanks Vladimir for raising this and for providing a testcase!
Comment 3 Glyn Normington CLA 2011-07-18 07:32:35 EDT
The problem reproduces on Virgo Web Server with the supplied testcase, so I should be able to get on and debug this.

(Note that the problem does not reproduce on Virgo Kernel, presumably because some more basic dependencies are missing which causes resolution to fail in a different way.)
Comment 4 Glyn Normington CLA 2011-07-18 11:38:50 EDT
Fixed by widening an existing check for unwanted recursion.

See kernel commit ece3f398078f59be234c1372f3389f49195309d1.