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

runtime: epollwait on fd 4 failed with 38 w/ go1.10.3 #26856

Closed
neo-hu opened this issue Aug 8, 2018 · 2 comments
Closed

runtime: epollwait on fd 4 failed with 38 w/ go1.10.3 #26856

neo-hu opened this issue Aug 8, 2018 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Linux
Milestone

Comments

@neo-hu
Copy link

neo-hu commented Aug 8, 2018

Compiled:Linux localhost.localdomain 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
RUN: Linux YF-DGE2 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /tmp/watchping watchping.go

[root@YF-DGE2 update]# ./watchping
watch agent
watchping: comments to xxxx

The occasional mistake
[root@YF-DGE2 update]# ./watchping
runtime: epollwait on fd 4 failed with 38
fatal error: runtime: netpoll failed

runtime stack:
runtime.throw(0xc63ded, 0x17)
/usr/local/go_1.10/src/runtime/panic.go:616 +0x81
runtime.netpoll(0x1548caff3150ff00, 0x2b7400000000)
/usr/local/go_1.10/src/runtime/netpoll_epoll.go:75 +0x216
runtime.sysmon()
/usr/local/go_1.10/src/runtime/proc.go:4265 +0x424
runtime.mstart1(0x0)
/usr/local/go_1.10/src/runtime/proc.go:1227 +0xe7
runtime.mstart()
/usr/local/go_1.10/src/runtime/proc.go:1193 +0x76

goroutine 1 [runnable, locked to thread]:
vendor/golang_org/x/net/http2/hpack.newInternalNode(...)
/usr/local/go_1.10/src/vendor/golang_org/x/net/http2/hpack/huffman.go:117
vendor/golang_org/x/net/http2/hpack.addDecoderNode(0xfffffe200000002, 0x1c)
/usr/local/go_1.10/src/vendor/golang_org/x/net/http2/hpack/huffman.go:137 +0xdf
vendor/golang_org/x/net/http2/hpack.init.0()
/usr/local/go_1.10/src/vendor/golang_org/x/net/http2/hpack/huffman.go:127 +0x75

go1.9 It's OK.

@mikioh mikioh changed the title go1.10.3 runtime: epollwait on fd 4 failed with 38 runtime: epollwait on fd 4 failed with 38 w/ go1.10.3 Aug 8, 2018
@mikioh mikioh added the OS-Linux label Aug 8, 2018
@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 8, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Aug 8, 2018
@mikioh
Copy link
Contributor

mikioh commented Aug 8, 2018

What's watchping? Can you show us your snippet watchping.go? [end of handshake protocol]

Please take a look at https://github.com/golang/go/wiki/MinimumRequirements. You are using unsupported, a bit older Linux kernel: Linux YF-DGE2 2.6.18-164.el5. We can guess that the difference btw Go 1.10 and Go 1.9 on filesystem manipulation using runtime-integrated poller might be the root cause, unfortunately. Can you try your snippet on Linux kernel 2.6.23 or above?

@ianlancetaylor
Copy link
Contributor

Errno value 38 is ENOSYS. The change from 1.9 to 1.10 is that in 1.9 we call the epoll_wait system call but in 1.10 we call the epoll_pwait system call. epoll_pwait was added to the Linux kernel in version 2.6.19. You are running on version 2.6.18. So that is why the failure is happening.

According to https://golang.org/wiki/MinimumRequirements we require Linux kernel version 2.6.23 or later. If 1.9 has been working for you, you've been lucky. We have no plans to support kernel versions before 2.6.23, so I'm going to close this issue. That said, you could patch runtime/sys_linux_amd64.s to go back to calling epoll_wait instead of epoll_pwait.

@golang golang locked and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Linux
Projects
None yet
Development

No branches or pull requests

4 participants