rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 402 forks source link

Add code to increase mlocks (ulimit -l) #714

Closed jamessewell closed 3 years ago

jamessewell commented 3 years ago

This avoid a Go bug which crashes some go processes in Containers

The crashes look like:

I0601 05:18:25.815579 1 main.go:288] Listening securely on :9443 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

Discussion at: https://github.com/golang/go/wiki/LinuxKernelSignalVectorBug

ulimit -l is changed from 64 to 65536