flannel
flannel copied to clipboard
flanneld fails when run manually
Expected Behavior
Trying to make this work
Current Behavior
[root@rl85master ~]# ./flanneld-amd64
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7f3c4ef2dbd0]
runtime stack:
runtime.throw(0x2252ee1, 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(0x1b5d7c0, 0xc000171bd0, 0xc000130028)
/usr/local/go/src/runtime/cgocall.go:133 +0x5b fp=0xc000171ba0 sp=0xc000171b68 pc=0x40571b
os/user._Cfunc_mygetpwuid_r(0x0, 0xc000114e40, 0x35120b0, 0x400, 0xc000130028, 0x7f3c00000000)
_cgo_gotypes.go:175 +0x4d fp=0xc000171bd0 sp=0xc000171ba0 pc=0x793ecd
os/user.lookupUnixUid.func1.1(0x0, 0xc000114e40, 0xc000112c90, 0xc000130028, 0xc000171c70)
/usr/local/go/src/os/user/cgo_lookup_unix.go:103 +0xd0 fp=0xc000171c20 sp=0xc000171bd0 pc=0x795430
os/user.lookupUnixUid.func1(0x1f4c620)
/usr/local/go/src/os/user/cgo_lookup_unix.go:103 +0x45 fp=0xc000171c58 sp=0xc000171c20 pc=0x7954a5
os/user.retryWithBuffer(0xc000112c90, 0xc000171d30, 0x0, 0x0)
/usr/local/go/src/os/user/cgo_lookup_unix.go:247 +0x3e fp=0xc000171cb0 sp=0xc000171c58 pc=0x7949fe
os/user.lookupUnixUid(0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/os/user/cgo_lookup_unix.go:96 +0x132 fp=0xc000171d78 sp=0xc000171cb0 pc=0x794312
os/user.current(0x0, 0x0, 0x0)
/usr/local/go/src/os/user/cgo_lookup_unix.go:49 +0x49 fp=0xc000171db8 sp=0xc000171d78 pc=0x7941a9
os/user.Current.func1()
/usr/local/go/src/os/user/lookup.go:15 +0x25 fp=0xc000171de0 sp=0xc000171db8 pc=0x7952e5
sync.(*Once).doSlow(0x3337060, 0x22df228)
/usr/local/go/src/sync/once.go:66 +0xec fp=0xc000171e30 sp=0xc000171de0 pc=0x4863cc
sync.(*Once).Do(...)
/usr/local/go/src/sync/once.go:57
os/user.Current(0xc00012c2b0, 0xa, 0x2218675)
/usr/local/go/src/os/user/lookup.go:15 +0x105 fp=0xc000171e60 sp=0xc000171e30 pc=0x793bc5
k8s.io/klog.init.1()
/go/src/github.com/flannel-io/flannel/vendor/k8s.io/klog/klog_file.go:58 +0x45 fp=0xc000171ec8 sp=0xc000171e60 pc=0x79a005
runtime.doInit(0x32d8540)
/usr/local/go/src/runtime/proc.go:5646 +0x8a fp=0xc000171ef8 sp=0xc000171ec8 pc=0x44760a
runtime.doInit(0x32d27a0)
/usr/local/go/src/runtime/proc.go:5641 +0x57 fp=0xc000171f28 sp=0xc000171ef8 pc=0x4475d7
runtime.doInit(0x32cf040)
/usr/local/go/src/runtime/proc.go:5641 +0x57 fp=0xc000171f58 sp=0xc000171f28 pc=0x4475d7
runtime.doInit(0x32dc640)
/usr/local/go/src/runtime/proc.go:5641 +0x57 fp=0xc000171f88 sp=0xc000171f58 pc=0x4475d7
runtime.main()
/usr/local/go/src/runtime/proc.go:191 +0x1c5 fp=0xc000171fe0 sp=0xc000171f88 pc=0x43a405
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000171fe8 sp=0xc000171fe0 pc=0x46d481
goroutine 19 [chan receive]:
k8s.io/klog.(*loggingT).flushDaemon(0x3337ec0)
/go/src/github.com/flannel-io/flannel/vendor/k8s.io/klog/klog.go:1010 +0x8b
created by k8s.io/klog.init.0
/go/src/github.com/flannel-io/flannel/vendor/k8s.io/klog/klog.go:411 +0xd8
[root@rl85master ~]#
Possible Solution
Steps to Reproduce (for bugs)
- Install Rocky Linux
- download flanned
- chmod 700 flanneld
- ./flanneld
Context
I'm was attempting to run flanneld manually
Your Environment
- Flannel version: v0.15.1
- Backend used (e.g. vxlan or udp): ? Do I need to specify this to make this work?
- Etcd version: DID NOT GET THIS FAR
- Kubernetes version (if used): N/A
- Operating System and version:
NAME="Rocky Linux"
VERSION="8.5 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.5 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8.5:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
- Link to your project (optional):
It works for me:
I1210 10:59:09.524872 474 main.go:217] CLI flags config: {etcdEndpoints:http://127.0.0.1:4001,http://127.0.0.1:2379 etcdPrefix:/coreos.com/network etcdKeyfile: etcdCertfile: etcdCAFile: etcdUsername: etcdPassword: help:false version:false autoDetectIPv4:false autoDetectIPv6:false kubeSubnetMgr:false kubeApiUrl: kubeAnnotationPrefix:flannel.alpha.coreos.com kubeConfigFile: iface:[] ifaceRegex:[] ipMasq:false subnetFile:/run/flannel/subnet.env subnetDir: publicIP: publicIPv6: subnetLeaseRenewMargin:60 healthzIP:0.0.0.0 healthzPort:0 charonExecutablePath: charonViciUri: iptablesResyncSeconds:5 iptablesForwardRules:true netConfPath:/etc/kube-flannel/net-conf.json setNodeNetworkUnavailable:true}
I1210 10:59:09.525125 474 main.go:237] Created subnet manager: Etcd Local Manager with Previous Subnet: None
I1210 10:59:09.525164 474 main.go:240] Installing signal handlers
E1210 10:59:09.525770 474 main.go:455] Couldn't fetch network config: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: dial tcp 127.0.0.1:2379: connect: connection refused
timed out
E1210 10:59:10.526583 474 main.go:455] Couldn't fetch network config: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: dial tcp 127.0.0.1:2379: connect: connection refused
timed out
E1210 10:59:11.527680 474 main.go:455] Couldn't fetch network config: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: dial tcp 127.0.0.1:2379: connect: connection refused
timed out
E1210 10:59:12.528432 474 main.go:455] Couldn't fetch network config: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: dial tcp 127.0.0.1:2379: connect: connection refused
timed out
E1210 10:59:13.529515 474 main.go:455] Couldn't fetch network config: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: dial tcp 127.0.0.1:2379: connect: connection refused
Not sure if it is supposed to work in rocky linux though :/
Flannel also doesn't work on my computer, which runs Centos 8 and Vmware。
This is a Google Cloud Drive connection with a VMware image that contains all the information needed。(https://drive.google.com/file/d/1sFY-3TJZKCv8yCH5KLg1ynsjsPvbg516/view?usp=sharing)
I had the same problem on a fresh Ubuntu 22.04 VM. Downgrading to 20.04 fixed it for me.
Same with Ubuntu 22.04 https://paste.ubuntu.com/p/vhw5HSQzsY/
I've tried versions v0.11.1, v0.14.1, and v0.19.1 all to the same quick failure when running
./flannelld -version
I ran into this today on Rocky Linux 8.6. What am observing is that if flanneld is run as root, or through sudo, the program crashes with this stack, however it runs fine when not a superuser! Any pointers on how to go about this? We want it to run as a systemd service.
[rocky@ip-10-21-0-122 flannel_related]$ ./flanneld-amd64 --version
v0.19.2
[rocky@ip-10-21-0-122 flannel_related]$ sudo ./flanneld-amd64 --version
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7f3d869f0bd0]
Workaround: TL;DR - Run nscd
There is a long history around this - statically linked applications like flanneld that are dependent on glibc (tied to nested calls to dlopen()) can crash. I ran into this yesterday and doing some research lead me to a way around this which is to have nscd (name service cache daemon) running on the system. This eliminated the crash. Hope this helps.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.