Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345266 - Without AccumulatingProgressMonitor P2 Operation API always results with nothing to update
Summary: Without AccumulatingProgressMonitor P2 Operation API always results with noth...
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows XP
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 09:16 EDT by Marcin Waldowski CLA
Modified: 2019-09-12 17:37 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Waldowski CLA 2011-05-10 09:16:33 EDT
Build Identifier: 20110218-0911

I use P2 Operation API to update application on startup. To write the code I looked at prestartup example and Ralf Ebert tutorial (http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36).

I think I faced with some kind of revival of bug 282333.

If I use Operational API with AccumulatingProgressMonitor (like in Ralf Ebert tutorial) everything works fine, regardles if I do it in WorkbenchWindowAdvisor#postWindowOpen or WorkbenchAdvisor#preStartup(). But without AccumulatingProgressMonitor (like in prestartup example) it always ends with 'nothing to update', even if I use P2 Operation API in WorkbenchWindowAdvisor#postWindowOpen.

I run my application with following debug options:
org.eclipse.equinox.p2.core/debug=true
org.eclipse.equinox.p2.core/events/client=true
org.eclipse.equinox.p2.core/generator/parsing=true
org.eclipse.equinox.p2.core/engine/installregistry=true
org.eclipse.equinox.p2.core/metadata/parsing=true
org.eclipse.equinox.p2.core/artifacts/mirrors=true
org.eclipse.equinox.p2.core/core/parseproblems=true
org.eclipse.equinox.p2.core/planner/operands=true
org.eclipse.equinox.p2.core/planner/projector=true
org.eclipse.equinox.p2.core/engine/profilepreferences=true
org.eclipse.equinox.p2.core/publisher=true
org.eclipse.equinox.p2.core/reconciler=true
org.eclipse.equinox.p2.core/core/removeRepo=true
org.eclipse.equinox.p2.core/updatechecker=true
org.eclipse.equinox.p2.core/verifier=true
org.eclipse.equinox.p2.engine/profileregistry/debug=true
org.eclipse.equinox.p2.engine/engine/debug=true
org.eclipse.equinox.p2.engine/enginesession/debug=true
org.eclipse.equinox.p2.garbagecollector/debug=true
org.eclipse.equinox.p2.repository/credentials/debug=true
org.eclipse.equinox.p2.repository/transport/debug=true
org.eclipse.ecf.filetransfer/debug=true
org.eclipse.ecf.filetransfer/debug/exceptions/throwing=true
org.eclipse.ecf.filetransfer/debug/exceptions/catching=true
org.eclipse.ecf.filetransfer/debug/methods/entering=true
org.eclipse.ecf.filetransfer/debug/methods/exiting=true
org.eclipse.ecf.identity/debug=true
org.eclipse.ecf.identity/debug/exceptions/catching=true
org.eclipse.ecf.identity/debug/exceptions/throwing=true
org.eclipse.ecf.identity/debug/methods/entering=true
org.eclipse.ecf.identity/debug/methods/exiting=true
org.eclipse.ecf.provider.filetransfer.httpclient/debug=true
org.eclipse.ecf.provider.filetransfer.httpclient/debug/exceptions/catching=true
org.eclipse.ecf.provider.filetransfer.httpclient/debug/exceptions/throwing=true
org.eclipse.ecf.provider.filetransfer.httpclient/debug/methods/entering=true
org.eclipse.ecf.provider.filetransfer.httpclient/debug/methods/exiting=true
org.eclipse.ecf.provider.filetransfer/debug=true
org.eclipse.ecf.provider.filetransfer/debug/exceptions/catching=true
org.eclipse.ecf.provider.filetransfer/debug/exceptions/throwing=true
org.eclipse.ecf.provider.filetransfer/debug/methods/entering=true
org.eclipse.ecf.provider.filetransfer/debug/methods/exiting=true
org.eclipse.ecf/debug=true
org.eclipse.ecf/debug/exceptions/catching=true
org.eclipse.ecf/debug/exceptions/throwing=true
org.eclipse.ecf/debug/methods/entering=true
org.eclipse.ecf/debug/methods/exiting=true

And while fetching artifacs.jar following error was saved:
(TRACE)[05/10/11;13:44:01:752]ENTERING org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransfer#fireTransferReceiveDataEvent len=8313;rcvd=4096() 
(TRACE)[05/10/11;13:44:01:752]EXITING org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransfer#openStreams 
(TRACE)[05/10/11;13:44:01:767]ENTERING org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransfer#fireTransferReceiveDoneEvent len=8313;rcvd=4096() 
[org.eclipse.equinox.p2.engine-engine] Tue May 10 13:44:01 CEST 2011 - [main] 
Rolling back engine operation for profile=DefaultProfile. Reason was: Status ERROR: org.eclipse.equinox.p2.engine code=4 An error occurred while collecting items to be installed.

It looks like something is crashed silently because in fireTransferReceiveDoneEvent len != rcvd. Unfortunately I don't know how to diagnose it better.

Reproducible: Always
Comment 1 Marcin Waldowski CLA 2011-05-17 08:56:19 EDT
When I wrote "prestartup example" I meant /org.eclipse.equinox.p2.examples.rcp.prestartupdate
Comment 2 Pascal Rapicault CLA 2011-05-17 19:15:32 EDT
Do you any more details in the log? I suspect that the execution of an action failed. 
Are you running this self hosted or is this on  a fully exported / built application.
Comment 3 Marcin Waldowski CLA 2011-05-18 04:14:04 EDT
I got 2MB debug log full of details ;) The problem is that I don't know what is important. Any hints about what should I look for will be very helpfull for me.

I'm runnning fully exported / built application with tycho.
Comment 4 Pascal Rapicault CLA 2011-05-18 11:00:09 EDT
Is this failing as part of the build or failing later on?
Comment 5 Marcin Waldowski CLA 2011-05-19 02:38:30 EDT
(In reply to comment #4)
> Is this failing as part of the build or failing later on?

It looks like my last response might mislead you. The build is fine. The problem occurs when I run fully exported application.

Please notice that it doesn't fail with error. It just gives wrong result. Every time I use P2 operation API the result is 'nothing to update', unless I use P2 operational API with AccumulatingProgressMonitor (like in Ralf Ebert tutorial). If I use P2 Operational API with AccumulatingProgressMonitor application updates without any problem. 

API does not show any error. But I found one in debug log. I copied it in my first post. But as I said I have 2MB of debug output. Meybe I should look for some other lines of debug output.
Comment 6 Eclipse Genie CLA 2019-09-12 17:37:23 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.