Re: [Ikvm-developers] Endless loop in ResourceBundle (LocalObjectCache) due to SoftReference ?
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2012-02-20 11:44:08
|
Hi Christian,
Sorry for the late reply, I was on vacation. I think your analysis is correct. The LocaleObjectCache code assumes that the SoftReference will get enqueued "immediately" when the SoftReference is cleared (by my reading of the spec this is not a valid assumption), but IKVM's implementation only "eventually" enqueues the SoftReference (it can take severals GCs for this to happen).
I will look into how to best fix this. Thanks for reporting it.
Regards,
Jeroen
> -----Original Message-----
> From: Christian Prochnow [mailto:pro...@op...]
> Sent: Thursday, February 16, 2012 16:50
> To: ikv...@li...
> Subject: [Ikvm-developers] Endless loop in ResourceBundle
> (LocalObjectCache) due to SoftReference ?
>
> Hi,
>
>
>
> we encounter an endless loop with IKVM when using
> ResourceBundle.getBundle(string).
>
>
>
> Reading the OpenJDK sources for LocalObjectCache shows that there is a
> "while(value != null)" that seems to loop forever.
>
> The value retrieved from the CacheEntry is stored using a SoftReference.
>
>
>
> Can the IKVM SoftReference implementation cause this to happen?
>
> Sadly, as of now, we could not write a testcase that reproduces the bug.
> But it happens from time to time in our project.
>
>
>
> Here is the StackTrace where the application gets stuck:
>
>
>
> IKVM.OpenJDK.Core.dll!sun.util.locale.LocaleObjectCache.get(object key =
> {sun.util.locale.BaseLocale}) + 0xb3 Bytes
>
> IKVM.OpenJDK.Core.dll!java.util.ResourceBundle.Control.getCandidateLocal
> es(string baseName, java.util.Locale locale) + 0x2b Bytes
>
> IKVM.OpenJDK.Core.dll!java.util.ResourceBundle.getBundleImpl() + 0x137
> Bytes
>
> IKVM.OpenJDK.Core.dll!java.util.ResourceBundle.getBundle(string
> baseName) + 0x31 Bytes
>
>
>
>
>
>
> Any ideas?
>
>
>
>
>
> Best regards,
>
>
>
> Christian
>
>
>
>
>
>
>
>
>
>
>
> i.A. Christian Prochnow
>
> Software Developer
>
> Software Development
>
>
>
> flexible software | for your way of working
>
>
>
> OPTIMAL SYSTEMS GmbH
>
> Cicerostraße 26, 10709 Berlin
>
> Tel.: 030 - 8 95 70 80
>
> Fax: 030 - 8 95 70 88 88
>
> E-Mail: pro...@op... <mailto:beutnagel@optimal-
> systems.de>
>
> Web: www.optimal-systems.de <http://www.optimal-systems.de/>
>
>
>
> Treffen Sie OPTIMAL SYSTEMS live!
>
> Die nächsten Termine finden Sie hier. <http://www.optimal-
> systems.de/ecm/www/info-center/termine>
>
>
>
> Lesen Sie den aktuellen OPTIMAL SYSTEMS Newsletter:
>
> http://www.optimal-systems.de/news <http://www.optimal-systems.de/news>
>
> ______________________________________________________
>
> Sitz der Gesellschaft: Berlin
>
> HRB 38 560 Amtsgericht Charlottenburg - USt-IdNr.: DE 136 722 551
>
> Geschäftsführer: Karsten Renz
>
>
|