Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 711884 - dev-lang/go-1.14: mlock of signal stack failed: 12
Summary: dev-lang/go-1.14: mlock of signal stack failed: 12
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-03-08 17:31 UTC by Robin Hallabro-Kokko
Modified: 2020-03-30 15:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (emerge-info.txt,5.72 KB, text/plain)
2020-03-08 17:33 UTC, Robin Hallabro-Kokko
Details
build.log (build.log,24.01 KB, text/plain)
2020-03-08 17:34 UTC, Robin Hallabro-Kokko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Hallabro-Kokko 2020-03-08 17:31:06 UTC
dev-lang/go-1.14 fails to emerge because, maybe because of a low ulimit:

runtime: mlock of signal stack failed: 12
runtime: increase the mlock limit (ulimit -l) or
runtime: update your kernel to 5.3.15+, 5.4.2+, or 5.5+

Reproducible: Always

Steps to Reproduce:
1. emerge =dev-lang/go-1.14
2. Wait for compilation to fail.
Actual Results:  
Calculating dependencies... done!
[ebuild     U  ] dev-lang/go-1.14:0/1.14::gentoo [1.13.8:0/1.13.8::gentoo] 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-lang/go-1.14::gentoo

[...]

>>> Compiling source in /var/tmp/portage/dev-lang/go-1.14/work/go ...
Building Go cmd/dist using /usr/lib/go. (go1.13.8 linux/amd64)
Building Go toolchain1 using /usr/lib/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
runtime: mlock of signal stack failed: 12
runtime: increase the mlock limit (ulimit -l) or
runtime: update your kernel to 5.3.15+, 5.4.2+, or 5.5+
fatal error: mlock failed


Expected Results:  
Succesful compilation.
Comment 1 Robin Hallabro-Kokko 2020-03-08 17:33:20 UTC
Created attachment 617526 [details]
emerge info
Comment 2 Robin Hallabro-Kokko 2020-03-08 17:34:03 UTC
Created attachment 617528 [details]
build.log
Comment 3 Robin Hallabro-Kokko 2020-03-08 18:56:41 UTC
Emerge works fine with FEATURES=-userpriv but it may cause problems as documented upstreams at https://github.com/golang/go/issues/37436

Opened a pull request to explicitly check for running kernel version before proceeding.
Comment 4 Larry the Git Cow gentoo-dev 2020-03-09 17:11:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e804a5ea4822b370bc0eb2fc33296ba4ec4cb7e

commit 7e804a5ea4822b370bc0eb2fc33296ba4ec4cb7e
Author:     William Hubbs <william.hubbs@sony.com>
AuthorDate: 2020-03-08 18:43:15 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-03-09 17:10:45 +0000

    dev-lang/go: 1.14: check running kernel version before compiling
    
    Compilation will fail if the host is running certain versions of the
    Linux kernel with the message: runtime: mlock of signal stack failed: 12
    
    Note from williamh:
    The original pr checked for kernel versions not listed in the upstream
    issue, so I reworked it. Also, it used pkg_setup instead of pkg_pretend
    for the checks.
    
    Closes: https://bugs.gentoo.org/711884
    Closes: https://github.com/gentoo/gentoo/pull/14868
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/go/go-1.14.ebuild | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
Comment 5 Marco Genasci 2020-03-30 15:29:46 UTC
In go-1.14.1 the commited message is removed but bug already exists (see [1]).

[1] https://forums.gentoo.org/viewtopic-p-8437762.html