]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] runtime: don't crash on mlock failure
authorIan Lance Taylor <iant@golang.org>
Thu, 12 Mar 2020 04:51:09 +0000 (21:51 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 16 Mar 2020 19:55:30 +0000 (19:55 +0000)
commitc5125098b23067a274a49aaa0c39a12abcc45704
tree26e20504ca108609378bff8afdbfb7655c1c21d4
parentadba22a9ae10fa58704ee75bd6d7c8086df35350
[release-branch.go1.14] runtime: don't crash on mlock failure

Instead, note that mlock has failed, start trying the mitigation of
touching the signal stack before sending a preemption signal, and,
if the program crashes, mention the possible problem and a wiki page
describing the issue (https://golang.org/wiki/LinuxKernelSignalVectorBug).

Tested on a kernel in the buggy version range, but with the patch,
by using `ulimit -l 0`.

For #37436
Fixes #37807

Change-Id: I072aadb2101496dffd655e442fa5c367dad46ce8
Reviewed-on: https://go-review.googlesource.com/c/go/+/223121
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit b851e51160bc8ed412e229152b430b75e7ce56f9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/223417
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/os_linux.go
src/runtime/os_linux_x86.go
src/runtime/panic.go