Bug 47861 - Infinite loop after installing using nightly build 1130
Summary: Infinite loop after installing using nightly build 1130
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 blocker (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-01 23:49 EST by Dorian Birsan CLA
Modified: 2005-09-27 09:12 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dorian Birsan CLA 2003-12-01 23:49:09 EST
After I installed the com.example.root feature and restart the workbench, the 
startup sequence loops infinitely.
Comment 1 Dorian Birsan CLA 2003-12-02 00:08:57 EST
The test update site is:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-update-
home/optionalSite/ 

It appears that on every restart the application to run is the reconciler and 
this is caused by changes in the feature timestamps:
PlatformConfiguration.getApplicationIdentifier() line 1111
Comment 2 Dorian Birsan CLA 2003-12-02 10:28:56 EST
The platform startup has some fairly intricate paths, and this could also be 
related to bug 47458
Comment 3 Dorian Birsan CLA 2003-12-02 23:52:10 EST
I think I tracked down the problem to the ConfiguratorAdaptor, and I have 
probably uncovered a bug in the update code as well:
- after we install a new feature, a new metadata file is saved in the 
platform.cfg.metadata folder.
- At the same time, the timestamps on the PlatformConfiguration are 
invalidated (a refresh() is called at some point)
- it looks like update mgr writes the platform.cfg but before doing the above 
timestamp invalidation, so old timestamps are used
- so far, I think this is a bug in the old code as well, because we should 
probably rewrite the platform.cfg correctly
- now, what is missing, compared to pre-equinox is: we used to call 
PlatformConfiguration.shutdown, but this code is now moved to 
ConfiguratorAdaptor.
- however, the code in the configurator adaptor that calls 
PlatformConfig.shutdown is never called.

Pascal/Jeff, do you have a better understanding of why the shutdown is now 
called ?
Comment 4 Dorian Birsan CLA 2003-12-02 23:54:28 EST
Last sentence should read "not called?"

Basically, the PlatformConfiguration.shutdown code ensure the platform.cfg 
file is written with correct timestamps and the code is not called now.
Comment 5 Pascal Rapicault CLA 2003-12-03 08:45:58 EST
It is probably a mistake on our side.
Comment 6 Dorian Birsan CLA 2003-12-03 10:54:22 EST
Pascal, I added the code to call PlatformConfiguration.shutdown() at the 
begining of ConfiguratorAdaptor.stop() method.
This seems to fix the problem.
I tested a couple of simple scenarios and things look fine, so I released the 
code in HEAD.
Comment 7 Rafael Chaves CLA 2003-12-03 19:09:17 EST
I am not saying that this is a valid scenario, but one way to make this happen
is to delete the platform.cfg file (but not the platform.cfg.metadata directory).

Next time you start, a directory (!) called platform.cfg is created in the
.config directory, and it keeps restarting forever. I would guess that mkdirs()
is being called on the platform.cfg location file object. When we restart, we
still don't have a file platform.cfg, then we restart again, and so on... I am
not familiar with that code, so this is just a wild guess.
Comment 8 Dorian Birsan CLA 2003-12-03 20:23:36 EST
Rafael, with the latest fix (comment #6) you can remove platform.cfg and 
restart, things should work fine. Try tonight's build and see if this is still 
a problem.
Comment 9 Pascal Rapicault CLA 2003-12-08 10:50:10 EST
The bug is still in N20031208. Dorian, is your fix still in?
Comment 10 Dorian Birsan CLA 2003-12-08 11:47:50 EST
Pascal, it works for me. Can you provide the steps to the problem you are 
seeing?
Comment 11 Pascal Rapicault CLA 2003-12-08 11:52:50 EST
Never mind, I was using the wrong drop :-(
Sorry for the confusion.
It works for me too.