<Swing Dev> [12] JDK-8213516: jck test api/javax_accessibility/AccessibleState/fields.html fails intermittent
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Dec 20 22:51:57 UTC 2018
I have checked the test which uses AccessibleResourceBundle and I have two comments:
- This test should not be a part of jck since it is not a part of public specification.
- The bug is not directly related to this class, it can be reproduced using any
non-default resource bundle, which are passed to:
http://hg.openjdk.java.net/jdk/client/file/0434a6393b65/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java#l95
and then cached. Since this value is cached we will never load our own bundle.
The cache should take into account the bundle in addition to the locale.
On 20/12/2018 11:33, Phil Race wrote:
> My understanding is that there is a JCK test that explicitly calls
> AccessibleResourceBundle.getContents().
>
> And yet the class docs for AccessibleResourceBundle state
>
> * This is meant only for internal use by Java Accessibility and is not
> * meant to be used by assistive technologies or applications
>
> So arguably JCK should not have this test, but let's no go there yet.
>
> The interesting thing is that nothing in the JDK uses this class anymore,
> so JCK is the only thing that loads it.
>
> So can we follow the clue, to see if that explicit loading
> is somehow pre-empting the resources that should be used ?
>
> -phil.
>
>
> On 12/20/18 8:22 AM, Sergey Bylokhov wrote:
>> Hi, Shashi.
>>
>> Can you please provide more details, why this deprecated resource bundle is loaded by the test?
>> It is strange because it should not be used, and was replaced by
>> "com.sun.accessibility.internal.resources.accessibility".
>> The AccessibleBundle explicitly load it via ResourceBundle.getBundle();
>>
>> On 20/12/2018 00:40, Shashidhara Veerabhadraiah wrote:
>>> Hi All, Please find the updated Webrev for this problem:
>>> http://cr.openjdk.java.net/~sveerabhadra/8213516/webrev.01/
>>>
>>> Per the comments @ http://hg.openjdk.java.net/jdk/client/file/b5c564a1367c/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java#l49, we need to update the missing entry for key 'managesDescendants' in AccessibleResourceBundle class. Any AccessibleState changes needs to be added an entry in AccessibleResourceBundle. The same has been added under this fix. After this fix, I am unable to reproduce it on my local machine.
>>>
>>> Thanks and regards,
>>> Shashi
>>>
>>> -----Original Message-----
>>> From: Shashidhara Veerabhadraiah
>>> Sent: Thursday, December 20, 2018 9:49 AM
>>> To: Sergey Bylokhov <sergey.bylokhov at oracle.com>; swing-dev at openjdk.java.net; Philip Race <philip.race at oracle.com>; Dmitry Bessonov <dmitry.bessonov at oracle.com>
>>> Subject: Re: <Swing Dev> [12] JDK-8213516: jck test api/javax_accessibility/AccessibleState/fields.html fails intermittent
>>>
>>> Hi Sergey and Krishna, I was able to reproduce the problem on my machine yesterday evening. I will get back with another Webrev for this problem. So please wait for a day on this.
>>>
>>> Thanks and regards,
>>> Shashi
>>>
>>> -----Original Message-----
>>> From: Sergey Bylokhov
>>> Sent: Thursday, December 20, 2018 2:58 AM
>>> To: Shashidhara Veerabhadraiah <shashidhara.veerabhadraiah at oracle.com>; swing-dev at openjdk.java.net; Philip Race <philip.race at oracle.com>; Dmitry Bessonov <dmitry.bessonov at oracle.com>
>>> Subject: Re: [12] JDK-8213516: jck test api/javax_accessibility/AccessibleState/fields.html fails intermittent
>>>
>>> Hi, Shashi.
>>>
>>> Can you please describe the sequence of calls which might break the the static table?
>>>
>>> BTW did you tried the system where Dmitry was able to reproduce the bug?
>>>
>>> On 18/12/2018 22:24, Shashidhara Veerabhadraiah wrote:
>>>> Hi All, Please review a fix for the JDK 12 for the below bug:
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8213516
>>>>
>>>> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8213516/webrev.00/
>>>>
>>>> This issue is happening intermittently and am not able to reproduce it
>>>> on my local machine(corner case). As the bug reports issue is happening with jtreg running multiple tests on same VM mode. Upon analysis of the "AccessibleState" class and it's parent "AccessibleBundle" I think there may be a chance that class variable(static variable: table) present in AccessibleBundle can get into a corrupted state when multiple AccessibleState class variables are calling the method of parent class (loadResourceBundle() thro' toDisplayString() public functions) as it tries to load the same resource file into the same table(static variable) possibly from different threads(because of jtreg execution of multiple tests of the same bundle). Hence added a synchronized keyword to the function so that execution goes sequentially while loading the table(static hashtable). Since the problem is intermittent and not reproducible on local machine, test file is not required I think. Please suggest if you can find a different solution for this problem.
>>>
>>>
>>> --
>>> Best regards, Sergey.
>>>
>>
>>
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list