Concurrency issue in ICU4J ResourceBundleWrapper

16 views
Skip to first unread message

Bineet Singh

unread,
Mar 16, 2026, 3:16:33 AM (6 days ago) Mar 16
to icu-support
Hi all,

I would like your help to report a concurrency bug in ICU4J.  I am unable to raise a bug in ICU Jira even after signing up. It says I don't have permission.

ICU4J is used in eclipse BIRT. I faced a concurrency issue in BIRT which is being caused due to an issue in ICU4J in the class com.ibm.icu.impl.ResourceBundleWrapper.

I have raised an issue in BIRT (https://github.com/eclipse-birt/birt/issues/2394), but this bug should be raised in ICU as well. (stack trace at the end)

I analyzed the code in ResourceBundleWrapper. According to me, the issue is on line 282 where we set b as the parent itself in case nothing is found.

                                // if still could not find the bundle then return the parent
                                if (b == null && (!parentIsRoot || !disableFallback)) {
                                    b = parent;
                                }
and later on we make change to it

                       if (b != null) {
                            b.initKeysVector();
                        }


In case, ResourceBundleWrapper is hit parallelly, this code can be hit multiple times, and multiple can get the same b (the parent),  making concurrent modification in the keys, resulting in the given exception.

This is based on my analysis. You all would have better understanding to validate if my analysis is correct or if the cause is something else.

Can you please help me raise a bug for this?

SEVERE: Index 34 out of bounds for length 33
java.lang.ArrayIndexOutOfBoundsException: Index 34 out of bounds for length 33
at java.base/java.util.ArrayList.add(ArrayList.java:455)
at java.base/java.util.ArrayList.add(ArrayList.java:467)
at com.ibm.icu.impl.ResourceBundleWrapper.initKeysVector(ResourceBundleWrapper.java:87)
at com.ibm.icu.impl.ResourceBundleWrapper.access$900(ResourceBundleWrapper.java:29)
at com.ibm.icu.impl.ResourceBundleWrapper$2.load(ResourceBundleWrapper.java:238)
at com.ibm.icu.impl.ResourceBundleWrapper$1.createInstance(ResourceBundleWrapper.java:44)
at com.ibm.icu.impl.ResourceBundleWrapper$1.createInstance(ResourceBundleWrapper.java:41)
at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:69)
at com.ibm.icu.impl.ResourceBundleWrapper.instantiateBundle(ResourceBundleWrapper.java:149)
at com.ibm.icu.impl.ResourceBundleWrapper.access$100(ResourceBundleWrapper.java:29)
at com.ibm.icu.impl.ResourceBundleWrapper$2.load(ResourceBundleWrapper.java:159)
at com.ibm.icu.impl.ResourceBundleWrapper$1.createInstance(ResourceBundleWrapper.java:44)
at com.ibm.icu.impl.ResourceBundleWrapper$1.createInstance(ResourceBundleWrapper.java:41)
at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:69)
at com.ibm.icu.impl.ResourceBundleWrapper.instantiateBundle(ResourceBundleWrapper.java:149)
at com.ibm.icu.impl.ResourceBundleWrapper.getBundleInstance(ResourceBundleWrapper.java:126)
at com.ibm.icu.util.UResourceBundle.instantiateBundle(UResourceBundle.java:378)
at com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.java:149)
at com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.java:128)
at org.eclipse.birt.core.i18n.ResourceHandle.<init>(ResourceHandle.java:83)

Markus Scherer

unread,
Mar 16, 2026, 3:05:18 PM (6 days ago) Mar 16
to Bineet Singh, icu-support
Hello,

On Mon, Mar 16, 2026 at 12:16 AM Bineet Singh <bineet...@gmail.com> wrote:
I would like your help to report a concurrency bug in ICU4J.  I am unable to raise a bug in ICU Jira even after signing up. It says I don't have permission.

This is probably due to a known Atlassian Jira bug.
Try clicking this link: https://id.atlassian.com/invite/p/jira-software?id=Qh9FT7tsTYuZk94n2ZkPOw
Let us know if this works, or if the link is expired.

tnx
markus

Bineet Singh

unread,
Mar 17, 2026, 4:02:29 AM (5 days ago) Mar 17
to icu-support, Markus Scherer, icu-support, Bineet Singh
Thanks Markus. Using the link, I am able to raise bugs. 

Though jabagawee kindly added the fix for this bug as well as part of ICU-23321 and is part of his pull request for this.
Reply all
Reply to author
Forward
0 new messages