Change thread dump location?
Staffan Larsen
staffan.larsen at oracle.com
Tue Apr 15 09:36:39 UTC 2014
I think this is a valid use-case and it would be good to fix it.
Having said that, there is currently work underway to revise the logging/output from the JVM in JDK 9 (see JEP-158). If that framework was used for the SIGQUIT threaddumps, then it would be possible to configure the output to go to a file instead of tty. Using that would be my preferred solution to this problem.
However, it is unlikely that this framework will be backported to JDK 8, so perhaps a different solution is needed there.
/Staffan
On 15 apr 2014, at 09:45, Jaromir Hamala <jaromir.hamala at gmail.com> wrote:
> Hi David,
>
> I mean a response to SIGQUIT. I'd like to add an ability to specify a
> file/directory where threaddumps will be written to even when stdout/err
> are not redirected. I believe having separated threadumps from rest of the
> logs might be useful when troubleshooting. It's actually not my idea -
> there was a user asking how to do it in other mailing-list.
>
> Cheers,
> Jaromir
>
>
> On Tue, Apr 15, 2014 at 7:21 AM, David Holmes <david.holmes at oracle.com>wrote:
>
>> Hi Jaromir,
>>
>>
>> On 11/04/2014 11:34 PM, Jaromir Hamala wrote:
>>
>>> I'd like to create a patch allowing to change a location of a threaddump
>>> when it's triggered by sending a signal. My understanding is that
>>> currently
>>> there is no option to specify a custom path.
>>>
>>
>> Do you mean the thread-dump in response to SIGQUIT (which goes to the VM's
>> output stream) or the hs-err log file produced when the VM crashes?
>>
>> The SIGQUIT thread-dump doesn't go to a file unless you happen to be
>> redirecting VM output to a file.
>>
>> David
>>
>>
>> Is this a feature you would consider to accept & eventually merge? I'm
>>> aware one could use eg. jstack to save the threaddump into an arbitrary
>>> location, but this tooling is not always available as it's part of JDK and
>>> not JRE.
>>>
>>> Cheers,
>>> Jaromir
>>>
>>>
>
>
> --
> “Perfection is achieved, not when there is nothing more to add, but when
> there is nothing left to take away.”
> Antoine de Saint Exupéry
More information about the hotspot-dev
mailing list