flannel: fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7f67d0cca0f1]

CentOS Stream release 8
4.18.0-277.el8.x86_64
flannel-v0.13

`[root@stream8-30 Software_package]# /usr/local/bin/flanneld --ip-masq --etcd-endpoints=http://192.168.3.30:2379 -etcd-cafile=/etc/etcd/ssl/ca.pem -etcd-certfile=/etc/etcd/ssl/server.pem -etcd-keyfile=/etc/etcd/ssl/server-key.pem fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7f67d0cca0f1]

runtime stack: runtime.throw(0x20c058e, 0x2a) /usr/local/go/src/runtime/panic.go:1116 +0x72 runtime.sigpanic() /usr/local/go/src/runtime/signal_unix.go:726 +0x4ac

goroutine 1 [syscall, locked to thread]: runtime.cgocall(0x1a4d360, 0xc000068bd0, 0xc000130020) /usr/local/go/src/runtime/cgocall.go:133 +0x5b fp=0xc000068ba0 sp=0xc000068b68 pc=0x40571b os/user._Cfunc_mygetpwuid_r(0x0, 0xc000114db0, 0x45fe0b0, 0x400, 0xc000130020, 0x7f6700000000) _cgo_gotypes.go:175 +0x4d fp=0xc000068bd0 sp=0xc000068ba0 pc=0x7a456d os/user.lookupUnixUid.func1.1(0x0, 0xc000114db0, 0xc000112c50, 0xc000130020, 0xc000068c70) /usr/local/go/src/os/user/cgo_lookup_unix.go:103 +0xd0 fp=0xc000068c20 sp=0xc000068bd0 pc=0x7a5ad0 os/user.lookupUnixUid.func1(0x1e049a0) /usr/local/go/src/os/user/cgo_lookup_unix.go:103 +0x45 fp=0xc000068c58 sp=0xc000068c20 pc=0x7a5b45 os/user.retryWithBuffer(0xc000112c50, 0xc000068d30, 0x0, 0x0) /usr/local/go/src/os/user/cgo_lookup_unix.go:247 +0x3e fp=0xc000068cb0 sp=0xc000068c58 pc=0x7a509e os/user.lookupUnixUid(0x0, 0x0, 0x0, 0x0) /usr/local/go/src/os/user/cgo_lookup_unix.go:96 +0x132 fp=0xc000068d78 sp=0xc000068cb0 pc=0x7a49b2 os/user.current(0x0, 0x0, 0x0) /usr/local/go/src/os/user/cgo_lookup_unix.go:49 +0x49 fp=0xc000068db8 sp=0xc000068d78 pc=0x7a4849 os/user.Current.func1() /usr/local/go/src/os/user/lookup.go:15 +0x25 fp=0xc000068de0 sp=0xc000068db8 pc=0x7a5985 sync.(*Once).doSlow(0x2f9ed80, 0x214c128) /usr/local/go/src/sync/once.go:66 +0xec fp=0xc000068e30 sp=0xc000068de0 pc=0x4863cc sync.(*Once).Do(…) /usr/local/go/src/sync/once.go:57 os/user.Current(0xc00012c2d0, 0xa, 0x20874b5) /usr/local/go/src/os/user/lookup.go:15 +0x105 fp=0xc000068e60 sp=0xc000068e30 pc=0x7a4265 k8s.io/klog.init.1() /go/src/github.com/coreos/flannel/vendor/k8s.io/klog/klog_file.go:58 +0x45 fp=0xc000068ec8 sp=0xc000068e60 pc=0x7aa585 runtime.doInit(0x2f40280) /usr/local/go/src/runtime/proc.go:5646 +0x8a fp=0xc000068ef8 sp=0xc000068ec8 pc=0x44760a runtime.doInit(0x2f3a760) /usr/local/go/src/runtime/proc.go:5641 +0x57 fp=0xc000068f28 sp=0xc000068ef8 pc=0x4475d7 runtime.doInit(0x2f36f40) /usr/local/go/src/runtime/proc.go:5641 +0x57 fp=0xc000068f58 sp=0xc000068f28 pc=0x4475d7 runtime.doInit(0x2f44220) /usr/local/go/src/runtime/proc.go:5641 +0x57 fp=0xc000068f88 sp=0xc000068f58 pc=0x4475d7 runtime.main() /usr/local/go/src/runtime/proc.go:191 +0x1c5 fp=0xc000068fe0 sp=0xc000068f88 pc=0x43a405 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000068fe8 sp=0xc000068fe0 pc=0x46d481

goroutine 19 [chan receive]: k8s.io/klog.(*loggingT).flushDaemon(0x2f9fbe0) /go/src/github.com/coreos/flannel/vendor/k8s.io/klog/klog.go:1010 +0x8b created by k8s.io/klog.init.0 /go/src/github.com/coreos/flannel/vendor/k8s.io/klog/klog.go:411 +0xd8 `

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I am getting the same panic with flannel versions v0.11, v0.13 and v0.14-rc1.

$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.3 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.3"

I noticed that downgrading glibc fixes the issue. It works on glibc-2.28-127.el8_3.2, but doesn’t work on the latest glibc-2.28-151.el8. Also the following issues have similar panics for a static golang build: https://github.com/golang/go/issues/24787, https://github.com/golang/go/issues/13470, https://sourceware.org/bugzilla/show_bug.cgi?id=19341, and https://github.com/containerd/ttrpc/pull/13

The problematic user.Current() call comes from klog: https://github.com/kubernetes/klog/blob/02ca14bed863fe45aa7544bbb0febef5db51163c/klog_file.go#L82

Rebuild flannel on CentOS 8

I have build a docker image for build flannel.

How to use this image

  1. clone flannel repository.

  2. pull cucker/golang image and tag this image to the ./Makefile require.
    The v1.14.0 tag Makefile define golang:1.15.5 image for build environment to run.

  3. make flanneld

  • For example

    git clone --branch v0.14.0 https://github.com/flannel-io/flannel.git
    cd flannel
    docker pull cucker/golang
    docker tag cucker/golang golang:$(grep "^GO_VERSION=" Makefile |awk -F "=" '{print $2}')
    make dist/flanneld  # It will running a container to build with golang image
    
    $ ./dist/flanneld -version
    v0.14.0
    
    $cat /etc/redhat-release 
    CentOS Linux release 8.4.2105
    
    $ cat /etc/os-release 
    NAME="CentOS Linux"
    VERSION="8"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="8"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="CentOS Linux 8"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:8"
    HOME_URL="https://centos.org/"
    BUG_REPORT_URL="https://bugs.centos.org/"
    CENTOS_MANTISBT_PROJECT="CentOS-8"
    CENTOS_MANTISBT_PROJECT_VERSION="8"
    

There are binary files

The release v0.9.1 running OK on CentOS 8