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/os3_solaris.go | |
parent | 8641e6fe2131ac342647fa34398a727f96d15fb5 (diff) | |
download | go-c7ae41e5770b2258074eee68a6a3c4d0d71a251f.tar.gz go-c7ae41e5770b2258074eee68a6a3c4d0d71a251f.zip |
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/os3_solaris.go')
-rw-r--r-- | src/runtime/os3_solaris.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/os3_solaris.go b/src/runtime/os3_solaris.go index 349f4abbcf..9368e0d5c6 100644 --- a/src/runtime/os3_solaris.go +++ b/src/runtime/os3_solaris.go @@ -165,6 +165,9 @@ func newosproc(mp *m, _ unsafe.Pointer) { sigprocmask(_SIG_SETMASK, &oset, nil) 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") } } |