Bug 353880 - Numerous outdated bundledata/configuration files created in equinox stack
Summary: Numerous outdated bundledata/configuration files created in equinox stack
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on: 259981
Blocks:
  Show dependency tree
 
Reported: 2011-08-04 08:59 EDT by Thomas Watson CLA
Modified: 2012-02-13 14:07 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2011-08-04 08:59:58 EDT
Cloning bug to consider for 3.7.1.  We must also consider bug353879 with this fix to add the cleanupOnSave option.

+++ This bug was initially created as a clone of Bug #259981 +++

Hi..
We've found there will be numerous bundledata created to occupy storage memory.
It's a critical problem in platforms with small storage . For example : handheld device.
Those files look like get created if we are constantly installing new bundles 
or if we make other persistent changes to the framework, such as start/stop bundles.
There are some properties(osgi.embedded.cleanupOnOpen=true and osgi.clean=true) to clean it in stack restarting. 
However, restarting runtime is required and not good for long running equniox stack. The files should be cleaned up during long running stack in which start and shutdown are rare occurrence. Could equinox provide a solution against it?
Thanks a lot.
Comment 2 Thomas Watson CLA 2011-08-05 11:53:37 EDT
Actually there were two commits to fix this.  The original fix which was using the old cleanupOnOpen was made with this commit:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?h=R3_7_maintenance&id=be645b485ea5d3de1cb3a2c41b5704f2edcc5665

The fix to start using the new cleanupOnSave was made with this commit:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?h=R3_7_maintenance&id=b3075dd5c8ce66d53143bb6faab4866a4aedff2a
Comment 3 Vik Vis CLA 2012-02-07 16:44:27 EST
Hi,
 I tried this fix in the latest eclipse download (3.7.1) and I still see this issue. I tried this on windows 32bit. 

 We have OSGI runtime as part of our server and many bundles( around 500) are installed in it. After every 30 seconds( I think ), if there is a install or uninstall of a bundle,  a temporary file is created which is 2MB size.

 Can you please let us know if this fix actually went to 3.7.1 ?
Comment 4 Thomas Watson CLA 2012-02-07 17:12:16 EST
(In reply to comment #3)
>  Can you please let us know if this fix actually went to 3.7.1 ?

Yes it should be fixed in 3.7.1.  Can you confirm that you are setting the configuration option osgi.embedded.cleanupOnSave=true
Comment 5 Vik Vis CLA 2012-02-07 17:56:34 EST
I thought "osgi.embedded.cleanupOnSave" option was meant for cleanup  during shutdown of osgi runtime. 

We would like to have a solution that does not create these temp files during the time the servers are up and running. These servers would be running for months without shutdown. 

Anyway, I tried with the option you had specified and I still see this issue. The temporary files keeps on getting generated when the osgi runtime is up and running.

Thanks very much for looking into this.

-Vikram
Comment 6 Vik Vis CLA 2012-02-07 18:07:50 EST
I thought "osgi.embedded.cleanupOnSave" option was meant for cleanup  during shutdown of osgi runtime. 

We would like to have a solution that does not create these temp files during the time the servers are up and running. These servers would be running for months without shutdown. 

Anyway, I tried with the option you had specified and I still see this issue. The temporary files keeps on getting generated when the osgi runtime is up and running.

Thanks very much for looking into this.

-Vikram
Comment 7 Thomas Watson CLA 2012-02-09 15:56:12 EST
(In reply to comment #6)
> I thought "osgi.embedded.cleanupOnSave" option was meant for cleanup  during
> shutdown of osgi runtime. 
> 

No it is used to clean up when saving the latest state while the framework is running.

I tested this again on 3.7.1.  I used the following command to test:

java -Declipse.stateSaveDelayInterval=1000 -Dosgi.embedded.cleanupOnSave=true -jar org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar -console

Then I install and uninstall the same bundle using the osgi> console.  I see new .state, .lazy and .bundledata files get created and the old ones get deleted each time I install and uninstall the bundle.

(In reply to comment #3)
>  We have OSGI runtime as part of our server and many bundles( around 500) are
> installed in it. After every 30 seconds( I think ), if there is a install or
> uninstall of a bundle,  a temporary file is created which is 2MB size.
> 
Which temporary file are we talking about.  Perhaps this is a different file, not covered by this bug fix.
Comment 8 Vik Vis CLA 2012-02-13 14:07:40 EST
I had used "osgi.embedded.cleanupOnOpen" instead of "osgi.embedded.cleanupOnSave" before. 

With the correct option I see it working now. All the temporary files are properly deleted.

Thanks