Would anyone be opposed to a new option to redirect hs-err files to stderr/out?
thomas.stuefe at gmail.com
Mon Mar 18 16:16:19 UTC 2019
On Mon, Mar 18, 2019 at 4:38 PM Remi Forax <forax at univ-mlv.fr> wrote:
> Hi Thomas,
> ----- Mail original -----
> > De: "Thomas Stüfe" <thomas.stuefe at gmail.com>
> > À: "Aleksey Shipilev" <shade at redhat.com>
> > Cc: "hotspot-runtime-dev" <hotspot-runtime-dev at openjdk.java.net>
> > Envoyé: Lundi 18 Mars 2019 15:39:00
> > Objet: Re: Would anyone be opposed to a new option to redirect hs-err
> files to stderr/out?
> > On Mon, Mar 18, 2019 at 2:50 PM Aleksey Shipilev <shade at redhat.com>
> >> On 3/18/19 2:43 PM, Thomas Stüfe wrote:
> >> > We have the -XX:ErrorFile option to overwrite the default path and
> >> > 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.
> yes, i've the same issue when using TravisCI
> >> 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?
> -XX:ErrorFileRedirect=stderr is better IMO
Thanks. I like this better.
I opened a CSR for this. https://bugs.openjdk.java.net/browse/JDK-8220787
Lets see how this is received.
> > It fails now with EEXISTS, since we open the file as new. Changing that
> > 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
> > 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
> > ..Thomas
> >> -Aleksey
More information about the hotspot-runtime-dev