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: netpoll failed on android/386 #29423

Closed
eliasnaur opened this issue Dec 26, 2018 · 9 comments

Comments

Projects
None yet
4 participants
@eliasnaur
Copy link
Contributor

commented Dec 26, 2018

From the android/386 builder:

https://build.golang.org/log/e11446723639eb0b41a7268c1f19c0de5f8da7cc

runtime: epollwait on fd 6 failed with 22
fatal error: runtime: netpoll failed

runtime stack:
runtime.throw(0xea8e5d96, 0x17)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/runtime/panic.go:617 +0x69
runtime.netpoll(0xeab24a00, 0x1a5c7cf0)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/runtime/netpoll_epoll.go:75 +0x1f9
runtime.findrunnable(0xb9c23300, 0x0)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/runtime/proc.go:2226 +0x8bb
runtime.schedule()
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/runtime/proc.go:2525 +0x207
runtime.park_m(0xb9cc0000)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/runtime/proc.go:2605 +0x84
runtime.mcall(0xea78ab32)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/runtime/asm_386.s:345 +0x49

goroutine 1 [chan receive]:
testing.tRunner.func1(0xb9c98000)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:838 +0x1a2
testing.tRunner(0xb9c98000, 0xb9c3ff1c)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:866 +0xac
testing.runTests(0xb9c0e0a0, 0xeab10180, 0x23, 0x23, 0x0)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:1152 +0x286
testing.(*M).Run(0xb9c52380, 0x0)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:1069 +0x141
main.main()
	_testmain.go:112 +0x14d

goroutine 41 [runnable]:
testing.tRunner.func1(0xb9cd2dc0)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:857 +0x1fa
testing.tRunner(0xb9cd2dc0, 0xea9c93d8)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:866 +0xac
created by testing.(*T).Run
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:913 +0x2d1

goroutine 58 [runnable]:
testing.runTests.func1.1(0xb9c98000)
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:1159
created by testing.runTests.func1
	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-android/go/src/testing/testing.go:1159 +0x84
exitcode=2go_android_exec: adb -e shell rm -rf /data/local/tmp/unix.test-17686
FAIL	cmd/vendor/golang.org/x/sys/unix	0.532s
@odeke-em

This comment has been minimized.

Copy link
Member

commented Dec 27, 2018

Thank you for this report @eliasnaur!

Kindly paging @ianlancetaylor.

@ianlancetaylor ianlancetaylor added this to the Go1.13 milestone Dec 27, 2018

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Dec 27, 2018

That is the only instance I can find in the builder logs. It should be impossible.

@eliasnaur

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2019

@eliasnaur

This comment has been minimized.

Copy link
Contributor Author

commented Feb 10, 2019

@eliasnaur

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2019

FWIW, I can reproduce this crash locally by running the cmd/vendor/golang.org/x/sys/unix tests in a loop. I don't know how to debug it though.

@eliasnaur

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2019

It could be a coincidence, but I once got the crash just as I was ctrl-C'ing the test loop that had run for minutes. If so, there might be a racy interaction between epoll_pwait and signals or during process exit.

@eliasnaur

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2019

Edit: deleted confused analysis. runtime.netpollclose only deregisters a filedescriptor, it doesn't close the poll fd itself.

@gopherbot

This comment has been minimized.

Copy link

commented Feb 24, 2019

Change https://golang.org/cl/163638 mentions this issue: unix: don't overwrite unrelated file descriptors in TestDup

gopherbot pushed a commit to golang/sys that referenced this issue Feb 25, 2019

unix: don't overwrite unrelated file descriptors in TestDup
TestDup used a file descriptor without ensuring it was free,
leading to rare crashes in the runtime netpoller when the victim fd
was the polling descriptor.

Updates golang/go#29423

Change-Id: Idc8b6b47f7e966e045f57f2028e7b6b79e0fb3f3
Reviewed-on: https://go-review.googlesource.com/c/163638
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot

This comment has been minimized.

Copy link

commented Feb 25, 2019

Change https://golang.org/cl/163623 mentions this issue: cmd/vendor/golang.org/x/sys: re-vendor

@gopherbot gopherbot closed this in 3ef7e3d Feb 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.