IllegalAccessError: class jdk.test.lib.Utils cannot access class jdk.internal.misc.Unsafe

David Holmes david.holmes at oracle.com
Fri Aug 26 02:46:05 UTC 2016


Hi Gustavo,

I'm at a loss to understand how the same test, with the same jtreg and 
JDK version can fail due to a module access error on some systems but 
not others. Makes no sense to me at all.

Even if you file a bug we can't investigate it as it doesn't happen here.

That said a change has just been pushed (jdk9/hs ) think) that moves the 
Unsafe access out of Utils so that tests using Utils no longer need to 
access the jdk.internal module. So that might fix your problem.

David

On 25/08/2016 7:43 AM, Gustavo Romero wrote:
> Hi David,
>
> On 18-08-2016 21:52, David Holmes wrote:
>> Hi Gustavo,
>>
>> On 19/08/2016 6:48 AM, Gustavo Romero wrote:
>>> Hi,
>>>
>>> On jdk9/hs-comp 37de4195dd18 tip, jdk9/hs-comp/hostpot f932a58df902 tip
>>> all jtreg tests found under compiler/rtm/locking (https://goo.gl/VuGX1L)
>>> are failing with a message similar like:
>>>
>>> Exception in thread "main" java.lang.IllegalAccessError: class jdk.test.lib.Utils (in unnamed module @0x5c7fa833) cannot access class jdk.internal.misc.Unsafe (in module java.base) because module
>>> java.base does not export jdk.internal.misc to unnamed module @0x5c7fa833
>>>
>>> Please, find a full log example here: https://goo.gl/1PkJ6x
>>
>> I also note this:
>>
>> OpenJDK 64-Bit Server VM warning: UseRTMLocking is only available as experimental option on this platform.
>>
>> Does the failure mode change if that warning is fixed?
>
> No. On non-experimental platforms, like x64, the tests in question fail
> the same way. For instance, that log shows that on x64 with RTM support
> tests fail just like on POWER8: https://paste.fedoraproject.org/413588/raw/
>
>
>>> I understand this failure is related to
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8164323
>>> https://bugs.openjdk.java.net/browse/JDK-8164324
>>>
>>> which are duplicates of
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8163871
>>>
>>> that, by its turn, is not publicly available.
>>>
>>> If it's correct, is this issue understood and expected to be fixed
>>> before the rampdown start, on 2016/09/01?
>>
>> The above issues pertain to specific non-open tests that were failing in specific ways, so they have been fixed.
>
> Thanks for clarifying that.
>
>
>>
>> I do not see any such failures of the compiler/rtm/locking tests in our nightly testing, nor any open bugs. If this is not being caused by the "experimental" warning then a new bug will need to be
>> filed. If it is caused by the experiment warning a different new bug would need to be filed.
>
> If the platform has no support for RTM it's expected all test runs will
> not be treated as a failure, so I guess the nightly build run on a system
> without RTM? For example, on x64 without RTM support all tests passed:
> https://paste.fedoraproject.org/413597/raw/
>
> Thank you for checking any open bugs that could be related to this issue.
>
> I'll file a bug for that issue if you agree.
>
> Thank you and best regards,
> Gustavo
>


More information about the hotspot-dev mailing list