Would anyone be opposed to a new option to redirect hs-err files to stderr/out?

Thomas Stüfe thomas.stuefe at gmail.com
Mon Mar 18 14:39:00 UTC 2019


On Mon, Mar 18, 2019 at 2:50 PM Aleksey Shipilev <shade at redhat.com> wrote:

> On 3/18/19 2:43 PM, Thomas Stüfe wrote:
> > We have the -XX:ErrorFile option to overwrite the default path and file
> > name for the hs-err file. I would like to add the option of specifiying a
> > special value which would mean "stdout" or "stderr", respectivly.
> >
> > E.g. -XX:ErrorFile=STDERR or -XX:ErrorFile=STDOUT .
> >
> > Any objections? If not, I would draft a CSR and implement this.
>
> That would be very welcome.
>
> It would be the bikeshedding exercise to come up with the special name
> that would not clash with
> potential real user-specified path.


:( I was hoping... no, you are right.


> On Linux, I'd expect -XX:ErrorFile=/dev/stdout to work -- maybe
> start from making sure that works reliably?
>
>
It fails now with EEXISTS, since we open the file as new. Changing that to
accept O_APPEND opens a different can of worms: do you want people to
append post-mortems to existing files?

Also, /dev/stdout is not supported on all platforms, eg not on Windows and
our beloved AIX.

A pragmatic approach but not as elegant as reusing -XX:ErrorFile would
adding a new option, or options, -XX:RedirectHsErrFileTo(Stdout|Stderr).

In that case we would have to think about what to do if both are specified.

..Thomas



> -Aleksey
>
>


More information about the hotspot-runtime-dev mailing list