SUGGESTED FIX
6705524 OOPP/General: Concurency issues (properties r/w, JREInfo r/w, CleanupThread, removeDuplicateEntries) [ Kenneth Russel, Thomas Ng ]
Thomas.Ng's approval is pending.
- com/sun/deploy/cache/Cache.removeDuplicateEntries()
- removed busy==false criteria for selection,
since it is always true per default
and lead to no removal at all
- Adding test of MemoryCache.contains(urlString),
to avoid removing entries already in use within this JVM
- com/sun/deploy/cache/CleanupThread.java
A cleanup trigger as in startCleanup() shall not block the caller at all,
but trigger the cleanup only.
If a cleanup is already running, nothing has to be done
and we can return immediatly as well.
Idea: No blocking at all in the call of startCleanup().
Hence the synchronized(this) {} block in the run body
was just too wide, and shall only encapsulate the this.wait() state.
Fixed.
Removed 'Cache.removeDuplicateEntries()' from cleanup task,
since there is currently no reliable way to tell if a duplicate ressource
in in use by this JVM or another JVM.
- com/sun/deploy/util/SyncAccess.java
New utility to have shared read and exclusive write locking
for any purpose in the Java realm only.
This implements a 2-way mutex using sychronized and a volatile
bitfield for the desired operation, currently read and write.
- com/sun/deploy/util/SyncFileAccess.java
New utility utilizing SyncAccess and FileLock to
achieve JVM and system wide file access synchronization.
- com/sun/deploy/config/JREInfo
Using SyncAccess for synchronized read/write operations
on the local and global data.
- com/sun/deploy/config/Config
Using SyncFileAccess for synchronized read/write operations
on deployment.properties
+++
testcase: http://j2se.east.sun.com/deployment/www/tests/1.6.0_10/6705524/
webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6705524.2/
workspace: deploy
engineer: sven.gothel
|