RFR(XS): 8148747 - [TESTBUG] runtime/Unsafe/AllocateMemory.java fails with OOM during compilation

David Holmes david.holmes at oracle.com
Thu Feb 4 03:52:34 UTC 2016


On 4/02/2016 8:25 AM, Vladimir Kozlov wrote:
> On 2/3/16 2:01 PM, Coleen Phillimore wrote:
>>
>> Doesn't there exist a bug for the compiler ungracefully crashing when it
>> runs out of memory for arenas during compilation?
>
> It is different issue. In current case we concern about JIT compilation
> of unsafe.allocateMemory() calls.

Okay but ...

>>
>> This test could be used as a test for that problem which still exists.
>> We would like to have this one be a test for the runtime code though,
>> which Christians change accomplishes.
>
> I think not running tests in compiler nightlies is not acceptable. We're
> using other compiler related flags which other groups are not using.
>
> You can get the same result by adding -Xmixed to @run command as Igor
> suggested. It will overwrite flags specified by testing environment.

... without the -Xcomp there is no guarantee the JIT compilation will 
occur so you still might not be testing compilation of the 
unsafe.allocateMemory() calls. And as these tests seem to be simple 
inline code with no looping I can't see the JIT getting involved.

Do hs-comp tests only run in Xcomp mode? Or is it that hs-comp nightlies 
run non-compiler tests in Xcomp mode to increase the coverage?

And maybe we need to see why memory usage is continually increasing.

Thanks,



> Thanks,
> Vladimir
>
>>
>> Coleen
>>
>>
>> On 2/3/16 4:30 PM, Vladimir Kozlov wrote:
>>> On 2/3/16 1:03 PM, Christian Tornqvist wrote:
>>>> Hi Vladimir,
>>>>
>>>>> This means these tests will not be run in Compiler nightlies - we use
>>>> -Xcomp. Are you sure you want that?
>>>>> On other hand these tests are not designed to use compilers (no
>>>>> loops, no
>>>> hot methods). May be you should run them with -Xint then?
>>>>
>>>> The purpose of this test is to ensure that the unsafe.allocateMemory()
>>>> method works correctly, running this with -Xcomp is waste of time and
>>>> doesn't give us any additional information. If this means that it's not
>>>> running in the compiler repo, then I'm fine with that.
>>>> Our tests should as much as possible be run as any normal Java user
>>>> would
>>>> run their programs, that means not specifying -Xint or -Xcomp.
>>>
>>> This way you only test one component of JVM (runtime). Which is
>>> reasonable since it is runtime test.
>>> But java users can easily have unsafe.allocateMemory() in a hot code
>>> which will be JIT compiled. And if JIT produces an incorrect code then
>>> we will fail to catch the problem since we don't have test for it.
>>>
>>> -Xcomp is simple short cut to invoke and test JIT compilers for tests
>>> which are not written to trigger JIT compilation.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>>>
>>>> Thanks,
>>>> Christian
>>>>
>>>> -----Original Message-----
>>>> From: hotspot-runtime-dev
>>>> [mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of
>>>> Vladimir
>>>> Kozlov
>>>> Sent: Monday, February 1, 2016 4:26 PM
>>>> To: hotspot-runtime-dev at openjdk.java.net
>>>> Subject: Re: RFR(XS): 8148747 - [TESTBUG]
>>>> runtime/Unsafe/AllocateMemory.java
>>>> fails with OOM during compilation
>>>>
>>>> This means these tests will not be run in Compiler nightlies - we use
>>>> -Xcomp. Are you sure you want that?
>>>>
>>>> On other hand these tests are not designed to use compilers (no
>>>> loops, no
>>>> hot methods). May be you should run them with -Xint then?
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> On 2/1/16 12:55 PM, Christian Tornqvist wrote:
>>>>> Hi everyone,
>>>>>
>>>>>
>>>>>
>>>>> When running with -Xcomp, the compiler consumes more memory than it
>>>>> used too. The value for MallocMaxTestWords passed to this test has
>>>>> already been increased once and will most likely continue to be a
>>>>> problem in the future when running with -Xcomp.
>>>>>
>>>>>
>>>>>
>>>>> Running with -Xcomp doesn't add any value to these tests, so the easy
>>>>> fix that is also future proof is to not run the tests when the JVM is
>>>>> launched with -Xcomp.
>>>>>
>>>>>
>>>>>
>>>>> Webrev:
>>>>>
>>>>> http://cr.openjdk.java.net/~ctornqvi/webrev/8148747/webrev.00/
>>>>>
>>>>>
>>>>>
>>>>> Bug:
>>>>>
>>>>> https://bugs.openjdk.java.net/browse/JDK-8148747
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Christian
>>>>>
>>>>
>>


More information about the hotspot-runtime-dev mailing list