[8u] RFR: fix inconsistency of backport of 8219677: "-XX:OnOutOfMemoryError" uses fork instead of vfork
Volker Simonis
volker.simonis at gmail.com
Sun Nov 17 12:41:44 UTC 2019
Hohensee, Paul <hohensee at amazon.com> schrieb am Fr., 15. Nov. 2019, 21:09:
> May I have another review please?
>
> Webrev: http://cr.openjdk.java.net/~phh/8234264/webrev.8u.00/
>
>
The fix is trivial and the change looks good. Thumbs up from me.
As a side note, I don't understand why the call to fork_and_exec() in void
VMError::report_and_die (which was wrongly patched by the downport) hasn't
been lifted by the initial change 8047434 to use vfork() as well? But
that's a question not relevant for this fix of the downport and should
probably be addressed in the head revision.
Best regards,
Volker
Thanks,
>
> Paul
>
> On 11/15/19, 8:49 AM, "jdk8u-dev on behalf of Hohensee, Paul" <
> jdk8u-dev-bounces at openjdk.java.net on behalf of hohensee at amazon.com>
> wrote:
>
> https://bugs.openjdk.java.net/browse/JDK-8234264
>
> On 11/15/19, 8:33 AM, "jdk8u-dev on behalf of Hohensee, Paul" <
> jdk8u-dev-bounces at openjdk.java.net on behalf of hohensee at amazon.com>
> wrote:
>
> You are correct. I'll file an issue to fix it.
>
> Thanks,
>
> Paul
>
> On 11/14/19, 11:05 PM, "jdk8u-dev on behalf of Yangfei (Felix)" <
> jdk8u-dev-bounces at openjdk.java.net on behalf of felix.yang at huawei.com>
> wrote:
>
> Hi,
>
> We found one inconsistency of backport of 8219677.
> The upstream patch set parameter use_vfork_if_available to
> true when call os::fork_and_exec in VM_ReportJavaOutOfMemory::doit().
> But looks like the 8u backport did something inconsistent:
> the change was not made in the correct place.
> The 8u backport patch:
> http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/97d605522fcb
>
> Patch for jdk8u-dev:
>
> diff -r 775e2bf92114 src/share/vm/utilities/vmError.cpp
> --- a/src/share/vm/utilities/vmError.cpp Wed Aug 07
> 17:00:19 2019 +0800
> +++ b/src/share/vm/utilities/vmError.cpp Fri Nov 15
> 14:23:50 2019 +0800
> @@ -1060,7 +1060,7 @@
> out.print_raw (cmd);
> out.print_raw_cr("\" ...");
>
> - if (os::fork_and_exec(cmd, true) < 0) {
> + if (os::fork_and_exec(cmd) < 0) {
> out.print_cr("os::fork_and_exec failed: %s (%d)",
> strerror(errno), errno);
> }
> }
> @@ -1147,7 +1147,7 @@
> #endif
> tty->print_cr("\"%s\"...", cmd);
>
> - if (os::fork_and_exec(cmd) < 0) {
> + if (os::fork_and_exec(cmd, true) < 0) {
> tty->print_cr("os::fork_and_exec failed: %s (%d)",
> strerror(errno), errno);
> }
> }
>
> Please confirm.
>
> Thanks,
> Felix
>
>
>
>
>
>
>
More information about the jdk8u-dev
mailing list