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

[VPNKit] panic: tap2vif: read: read /dev/net/tun: not pollable #130

Closed
AkihiroSuda opened this issue Mar 16, 2020 · 5 comments · Fixed by #263
Closed

[VPNKit] panic: tap2vif: read: read /dev/net/tun: not pollable #130

AkihiroSuda opened this issue Mar 16, 2020 · 5 comments · Fixed by #263
Labels
bug Something isn't working priority/low

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Mar 16, 2020

panic: tap2vif: read: read /dev/net/tun: not pollable

goroutine 19 [running]:
github.com/rootless-containers/rootlesskit/pkg/network/vpnkit.tap2vif(0xc0001700a0, 0x7eff64137198, 0xc00000c200)
        /tmp/tmp.wZbjFCTJTg/src/github.com/rootless-containers/rootlesskit/pkg/network/vpnkit/vpnkit.go:195 +0x16f
created by github.com/rootless-containers/rootlesskit/pkg/network/vpnkit.startVPNKitRoutines
        /tmp/tmp.wZbjFCTJTg/src/github.com/rootless-containers/rootlesskit/pkg/network/vpnkit/vpnkit.go:185 +0x516

RootlessKit v0.9.2, dockerd-rootless.sh on moby/moby@37defbf .
Happened during early startup phase.

@AkihiroSuda AkihiroSuda added the bug Something isn't working label Mar 16, 2020
@iHiD
Copy link

iHiD commented Jul 13, 2021

I also just hit the same issue. @AkihiroSuda Did you find a solution?

@AkihiroSuda
Copy link
Member Author

This seems a solution, but haven't tested

golang/go#38618 (comment)

... using unix.Open instead of os.OpenFile and setting the fd to NonBlocking seems to solve the problem, ...

@AkihiroSuda
Copy link
Member Author

A workaround is to use slirp4netns
/~https://github.com/rootless-containers/slirp4netns

Rootless Docker automatically switches from VPNKit to slirp4netns if slirp4netns (v0.4.0 or later) is installed.

@iHiD
Copy link

iHiD commented Jul 13, 2021

OK, great. Thanks. I'll try slirp4netns later.

AkihiroSuda added a commit to AkihiroSuda/rootlesskit that referenced this issue Aug 3, 2021
Fix rootless-containers#130 `panic: tap2vif: read: read /dev/net/tun: not pollable`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda
Copy link
Member Author

Should be fixed in RootlessKit v0.14.3

youmeim pushed a commit to youmeim/rootlesskit that referenced this issue Dec 20, 2024
Fix rootless-containers#130 `panic: tap2vif: read: read /dev/net/tun: not pollable`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/low
Projects
None yet
2 participants