Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flannel crash when using a ppp0 modem interface #1454

Closed
jswantek opened this issue Jun 29, 2021 · 2 comments
Closed

flannel crash when using a ppp0 modem interface #1454

jswantek opened this issue Jun 29, 2021 · 2 comments
Labels

Comments

@jswantek
Copy link

Expected Behavior

When having a ppp0 modem interface on my Linux system flannel should not crash when parsing address on startup.

Current Behavior

When starting flannel if a ppp0 modem interface exists in my Linux system, flannel crashes with the following panic when parsing addresses:

I0624 23:06:59.293981   24938 flannel.go:92] Determining IP address of default interface
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1a31f90]

goroutine 20887 [running]:
github.com/rancher/k3s/vendor/github.com/vishvananda/netlink.parseAddr(0x400648bdec, 0x40, 0x40, 0x0, 0x400867a0a8, 0x4, 0x280, 0x0, 0x0, 0x400648be00, ...)
        /go/src/github.com/rancher/k3s/vendor/github.com/vishvananda/netlink/addr_linux.go:274 +0x170
github.com/rancher/k3s/vendor/github.com/vishvananda/netlink.(*Handle).AddrList(0x6721590, 0x43eff40, 0x400f0859e0, 0x2, 0x0, 0x4, 0x2bc, 0xfe, 0x1)
        /go/src/github.com/rancher/k3s/vendor/github.com/vishvananda/netlink/addr_linux.go:199 +0x180
github.com/rancher/k3s/vendor/github.com/vishvananda/netlink.AddrList(...)
        /go/src/github.com/rancher/k3s/vendor/github.com/vishvananda/netlink/addr_linux.go:174
github.com/rancher/k3s/vendor/github.com/coreos/flannel/pkg/ip.getIfaceAddrs(0x400e1e22c0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/rancher/k3s/vendor/github.com/coreos/flannel/pkg/ip/iface.go:36 +0x68
github.com/rancher/k3s/vendor/github.com/coreos/flannel/pkg/ip.GetIfaceIP4Addr(0x400e1e22c0, 0x0, 0x0, 0x400775ee08, 0x1, 0x1)
        /go/src/github.com/rancher/k3s/vendor/github.com/coreos/flannel/pkg/ip/iface.go:40 +0x30
github.com/rancher/k3s/pkg/agent/flannel.LookupExtIface(0x400e1e22c0, 0x75ff34, 0x400cd82f08, 0x75f90c)
        /go/src/github.com/rancher/k3s/pkg/agent/flannel/flannel.go:100 +0xa8
github.com/rancher/k3s/pkg/agent/flannel.flannel(0x444d740, 0x4000e58c00, 0x0, 0x4006a5dd40, 0x34, 0x400b2e43f0, 0x2d, 0x1, 0x0)
        /go/src/github.com/rancher/k3s/pkg/agent/flannel/flannel.go:43 +0x28
github.com/rancher/k3s/pkg/agent/flannel.Run.func1(0x444d740, 0x4000e58c00, 0x4005df4380)
        /go/src/github.com/rancher/k3s/pkg/agent/flannel/setup.go:98 +0x5c
created by github.com/rancher/k3s/pkg/agent/flannel.Run
        /go/src/github.com/rancher/k3s/pkg/agent/flannel/setup.go:97 +0x290

Possible Solution

vishvananda/netlink#665

Steps to Reproduce (for bugs)

  1. Attach modem to USB port and wait for it to enumerate (have no other internet uplink interfaces) (Note: must enumerates as a ppp0 device.)
  2. start flannel (potentially through a service such as k3s)

Context

Your Environment

  • Flannel version: flannel version within k3s version: v1.20.2+k3s1 (1d4adb0)
  • Backend used (e.g. vxlan or udp): vxlan
  • Etcd version:
  • Kubernetes version (if used): k3s version: v1.20.2+k3s1 (1d4adb0)
  • Operating System and version:
Linux ws-nxcore-000048B02D0766CD 4.9.140-tegra #1 SMP PREEMPT Thu Jun 17 21:46:37 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.5 LTS
Release:	18.04
Codename:	bionic
  • Link to your project (optional):
@jswantek
Copy link
Author

jswantek commented Jul 2, 2021

The proposed solution vishvananda/netlink#665 does address the immediate panic but it was later discovered that lacking an IFA_ADDRESS (which can be easily seen using https://github.com/Yourens/rtnetlinkexample/blob/master/if_show.c) results in other downstream problems.

Jun 29 21:16:36 ws-nxcore-000048B02D0766CD bash[4543]: E0629 21:16:36.736218    4543 remote_runtime.go:116] RunPodSandbox from runtime service failed: rpc error: code = Unknown desc = failed to setup network for sandbox "c246d0f2899b3a6c0e83c2e03fafcebbd5ada9eb54f349c970142127624fb83a": netplugin failed with no error message
Jun 29 21:16:36 ws-nxcore-000048B02D0766CD bash[4543]: E0629 21:16:36.739284    4543 kuberuntime_sandbox.go:70] CreatePodSandbox for pod "coredns-854c77959c-8p7nv_kube-system(0295c50f-8c65-42ef-964e-b97cee322658)" failed: rpc error: code = Unknown desc = failed to setup network for sandbox "c246d0f2899b3a6c0e83c2e03fafcebbd5ada9eb54f349c970142127624fb83a": netplugin failed with no error message
Jun 29 21:16:36 ws-nxcore-000048B02D0766CD bash[4543]: E0629 21:16:36.739356    4543 kuberuntime_manager.go:755] createPodSandbox for pod "coredns-854c77959c-8p7nv_kube-system(0295c50f-8c65-42ef-964e-b97cee322658)" failed: rpc error: code = Unknown desc = failed to setup network for sandbox "c246d0f2899b3a6c0e83c2e03fafcebbd5ada9eb54f349c970142127624fb83a": netplugin failed with no error message
Jun 29 21:16:36 ws-nxcore-000048B02D0766CD bash[4543]: E0629 21:16:36.739554    4543 pod_workers.go:191] Error syncing pod 0295c50f-8c65-42ef-964e-b97cee322658 ("coredns-854c77959c-8p7nv_kube-system(0295c50f-8c65-42ef-964e-b97cee322658)"), skipping: failed to "CreatePodSandbox" for "coredns-854c77959c-8p7nv_kube-system(0295c50f-8c65-42ef-964e-b97cee322658)" with CreatePodSandboxError: "CreatePodSandbox for pod \"coredns-854c77959c-8p7nv_kube-system(0295c50f-8c65-42ef-964e-b97cee322658)\" failed: rpc error: code = Unknown desc = failed to setup network for sandbox \"c246d0f2899b3a6c0e83c2e03fafcebbd5ada9eb54f349c970142127624fb83a\": netplugin failed with no error message"

@stale
Copy link

stale bot commented Jan 25, 2023

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.

@stale stale bot added the wontfix label Jan 25, 2023
@stale stale bot closed this as completed Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant