[External] : Re: Proposal: Add overwrite heapdump flag to java

Kevin Walls kevin.walls at oracle.com
Tue Nov 21 09:12:33 UTC 2023


Hi,

Just going back to a technical point, did you manage to capture a stacktrace from the hang when running with -XX:OnError="jcmd %p GC.heap_dump -overwrite filename.dmp"

It would be great to know if that is a reliable hang, and what it looks like.  Maybe gclocker should not be blocking us at the point OnError commands are run.  We should understand that before making the change, as it seems like a reasonable alternative..

Do you still suggest HeapDumpOverwrite?  Maybe we can think about if that suggests it applies to all heap dumps…  Or, should we be handling FIFOs specifically, and not need the overwrite flag?

Thanks!
Kevin



From: Elon Azoulay <elon.azoulay at gmail.com>
Sent: 18 November 2023 05:20
To: Kevin Walls <kevin.walls at oracle.com>
Cc: serviceability-dev at openjdk.org; jdk-dev at openjdk.org
Subject: Re: [External] : Re: Proposal: Add overwrite heapdump flag to java

Hi,
I wanted to know what I can do to move https://github.com/openjdk/jdk/pull/13276<https://urldefense.com/v3/__https:/github.com/openjdk/jdk/pull/13276__;!!ACWV5N9M2RV99hQ!MFC1RxlQIbT9S_VS7myYAin2-PCtJagecw_MNFTE6iYHgLvomoZzLN1mlqEe7LSifTKCzkIM2liNzyuTKBZuC68$> along.
There was advice to create a CSR request, in order to do that there needs to be a jira
but I don't think I have permissions to create one.

Thanks for all the reviews, let me know what I can do, happy to follow your advice!


On Thu, May 25, 2023 at 11:39 PM Kevin Walls <kevin.walls at oracle.com<mailto:kevin.walls at oracle.com>> wrote:
Hi,
(I put this in the PR, but maybe drafts don’t get updates put on the mailing list?)

HeapDumpOverwrite sounds quite general, there are different ways of heap dumping and this doesn't affect all of them. This could be HeapDumpOnOutOfMemoryErrorOverwrite, which is a long option even for us 8-) so could be abbreviated perhaps, BUT that option might not be the way to do it…

Is it really that all heap dumps should be permitted to an existing file, IF that file is a FIFO? From the email I think that's the problem? ..and if so, we have:

8267666: Add option to jcmd GC.heap_dump to use existing file
https://bugs.openjdk.org/browse/JDK-8267666

So if jcmd to create a dump can use an existing file, -XX:OnError= can trigger such a jcmd?

i.e. Maybe there is a way of doing what you want.  A code change could still be required to make this easier for heap dumps on out of memory.  Writing a JBS bug first is useful to define the problem.

Thanks
Kevin



From: jdk-dev <jdk-dev-retn at openjdk.org<mailto:jdk-dev-retn at openjdk.org>> On Behalf Of Elon Azoulay
Sent: 25 May 2023 21:21
To: Daniel Daugherty <daniel.daugherty at oracle.com<mailto:daniel.daugherty at oracle.com>>
Cc: serviceability-dev at openjdk.org<mailto:serviceability-dev at openjdk.org>; jdk-dev at openjdk.org<mailto:jdk-dev at openjdk.org>
Subject: Re: [External] : Re: Proposal: Add overwrite heapdump flag to java

Sounds good, thanks so much!

On Thu, May 25, 2023 at 12:13 PM <daniel.daugherty at oracle.com<mailto:daniel.daugherty at oracle.com>> wrote:
Pointing the older thread to this newer incarnation would be a good idea.

Dan
On 5/25/23 3:11 PM, Elon Azoulay wrote:
Hi Dan,
That's great! Should I follow up in that thread as well?


On Thu, May 25, 2023 at 12:04 PM <daniel.daugherty at oracle.com<mailto:daniel.daugherty at oracle.com>> wrote:
Greetings,

A similar request came up on the hotspot-dev alias back in 2022.11:

https://mail.openjdk.org/pipermail/hotspot-dev/2022-November/066956.html

Dan


On 5/25/23 1:48 AM, David Holmes wrote:
> Hi Elon,
>
> I would suggest taking this up on serviceability-dev - cc'd.
>
> On 25/05/2023 3:46 am, Elon Azoulay wrote:
>> Hi,
>> I submitted a pull request
>> <https://github.com/openjdk/jdk/pull/13276<https://urldefense.com/v3/__https:/github.com/openjdk/jdk/pull/13276__;!!ACWV5N9M2RV99hQ!P4XNOUSVFXTWEIX8H89o1hhVY4MkuYC-SezupmhJPMkq4ytSpJqLz-jQjNkp906DjKBK_EuRIoL1MtBM2AGEbVqkI0M$>> to expose the overwrite
>> flag to HeapDumpOnOutOfMemoryError.
>> The flag is already exposed to jcmd as -overwrite.This is to
>> facilitate creating a heapdump within a container native environment.
>> We use this internally to dump the heap dump to a fifo so that we
>> could read it in a separate container.Let me know what needs to be
>> done in terms of creating an issue and getting my pr merged.
>
> Have you gone through the guide:
>
> https://openjdk.org/guide/
>
> ?
>
> You will need a JBS issue and also a CSR request as this proposes to
> add a new manageable product flag.
>
> Cheers,
> David
>
>> I am a new contributor and would be happy to contribute more!
>>
>> Cheers,
>>
>> Elon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20231121/8b5ace4c/attachment-0001.htm>


More information about the jdk-dev mailing list