Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 238908 - [installer] installer logging and error messages
Summary: [installer] installer logging and error messages
Status: RESOLVED DUPLICATE of bug 282427
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-29 11:47 EDT by Volker Wegert CLA
Modified: 2009-07-06 00:34 EDT (History)
2 users (show)

See Also:


Attachments
Error log from failed p2installer run (67.56 KB, text/plain)
2009-07-01 01:04 EDT, Patrick J. McNerthney CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Wegert CLA 2008-06-29 11:47:55 EDT
Build ID: I20080617-2000

I just tried the p2 installer from http://download.eclipse.org/eclipse/equinox/drops/R-3.4-200806172000/index.php to download Ganymede. While the overall installation worked quite well, I encountered two issues.

1. Somewhere along the way, the installer just stopped with a generic error message. It didn't say what went wrong, it just stopped installing. There was no way to re-start the process, I had to exit the program, dig into the log files find "!MESSAGE An error occurred while collecting items to be installed" and hundreds of !MESSAGE No repository found containing: org.foo.bar/osgi.bundle/". Not knowing what to do with these messages, I restarted the installer, pointed it to the same location, executed it with the same settings and this time it worked. 

2. The installer is apparently configured to not only write a log file, but also to dump all its messages into the system log of OS X (-consoleLog is set in Info.plist). This can be quite annoying and IMHO should not be activated by default.
Comment 1 Pascal Rapicault CLA 2008-07-07 10:23:11 EDT
I confirm that I have seen this too. I fail to understand why the download would fail the first time and then work. 
Comment 2 Patrick J. McNerthney CLA 2009-07-01 01:04:25 EDT
Created attachment 140560 [details]
Error log from failed p2installer run
Comment 3 Patrick J. McNerthney CLA 2009-07-01 01:23:17 EDT
I just encountered this very issue using the 3.5 installer from here: http://download.eclipse.org/equinox/drops/R-3.5-200906111540/equinox.p2.installer-3.5-linux.gtk.x86.tar.gz

Every time I ran it to install the default Eclipse SDK, the dialog box would tell me that, "An error occurred while collecting items to be installed".  I have attached a log from one such run.

When debugging this issue under a Java debugger, it would sometimes work correctly.  This lead me to suspect some kind of threading issue.  Upon further investigation, I determined that the issue is in the org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager class.

AbstractRepositoryManager listens to IProvisioningEventBus events.  When a RepositoryEvent of type DISCOVERED occurs, that URI is added to the collections of known repositories, using the enabled setting in the event.  What I found happening was such an event for the http://download.eclipse.org/eclipse/updates/3.5 repository, with the enabled flag set to false.  If this location has not yet been added, this causes a RepositoryInfo entry to be added for this location with isEnabled set to false.

Then, when the http://download.eclipse.org/eclipse/updates/3.5 repository is added using the

  void addRepository(IRepository repository, boolean signalAdd, String suffix)

method, the version of RepositoryInfo added from the IProvisioningEventBus event is used, rather than creating a new RepositoryInfo with isEnabled set to true.

So this is very dependent on thread scheduling.  If the IProvisioningEventBus RepositoryEvent DISCOVERED event is scheduled after the normal adding of this repository, then the problem does not occur.  But if the IProvisioningEventBus event is scheduled before, then this repository is left in a state where isEnabled is set to false.
Comment 4 John Arthorne CLA 2009-07-06 00:34:08 EDT
Thanks Patrick. Someone else recently came to the same conclusion and provided a patch, so I'll mark this as a duplicate.

*** This bug has been marked as a duplicate of bug 282427 ***