RFR: JDK-8319784: VM crash during heap dump after JDK-8287061

Tobias Hartmann thartmann at openjdk.org
Wed Nov 15 08:03:35 UTC 2023


On Tue, 14 Nov 2023 19:38:45 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> This fixes an incorrect assert in `debugInfo.hpp`. The assert is incorrect because this method may be called before rematerialization of the ObjectValue takes place, and therefore, `_selected` will be nullptr. This pull request patches the method to just return `Handle() => nullptr` if the rematerialization of the object hasn't taken place yet. This is the same behavior used by scalar-replaced objects not participating in merges.
>> 
>> I added a test to reproduce a scenario where the assert was causing a problem.
>> 
>> Tested on Ubuntu/MacOS/Windows x86_64 tier1-4.
>
> test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java line 32:
> 
>> 30:  * @run main/othervm -server
>> 31:  *                   -XX:CompileThresholdScaling=0.01
>> 32:  *                   -XX:+HeapDumpAfterFullGC
> 
> I am concerned this test case would deplete the disk space with heap dumps. I think the test should explicitly trigger the heap dump and manage (remove) the resulting .hprofs.

I agree, especially if the test is executed with stress options like `FullGCALot`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16622#discussion_r1393794998


More information about the hotspot-compiler-dev mailing list