diff options
| author | Ian Lance Taylor <iant@golang.org> | 2016-06-28 17:06:59 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2016-06-29 01:37:19 +0000 |
| commit | c7ae41e5770b2258074eee68a6a3c4d0d71a251f (patch) | |
| tree | e45eaa1de22e70f69c64e4eaad62484fdcf7fdfa /src/runtime/os_linux.go | |
| parent | 8641e6fe2131ac342647fa34398a727f96d15fb5 (diff) | |
| download | go-c7ae41e5770b2258074eee68a6a3c4d0d71a251f.tar.xz | |
runtime: better error message for newosproc failure
If creating a new thread fails with EAGAIN, point the user at ulimit.
Fixes #15476.
Change-Id: Ib36519614b5c72776ea7f218a0c62df1dd91a8ea
Reviewed-on: https://go-review.googlesource.com/24570
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/os_linux.go')
| -rw-r--r-- | src/runtime/os_linux.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index 35b57d8a23..542f214a42 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -154,6 +154,9 @@ func newosproc(mp *m, stk unsafe.Pointer) { if ret < 0 { print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", -ret, ")\n") + if ret == -_EAGAIN { + println("runtime: may need to increase max user processes (ulimit -u)") + } throw("newosproc") } } |
