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

[arm64/mips64el]TestSelect: panic: runtime error: invalid memory address or nil pointer dereference #612

Closed
zhsj opened this issue Mar 1, 2018 · 5 comments
Labels

Comments

@zhsj
Copy link
Contributor

zhsj commented Mar 1, 2018

--- FAIL: TestSelect (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x68a30]

goroutine 20 [running]:
testing.tRunner.func1(0x44200bc1e0)
	/usr/lib/go-1.10/src/testing/testing.go:742 +0x22c
panic(0x1120e0, 0x1dfed0)
	/usr/lib/go-1.10/src/runtime/panic.go:505 +0x1f0
syscall.Select(0x7, 0x4420098280, 0x0, 0x0, 0x0, 0x442003d6f0, 0x442003d6f8, 0x10)
	/usr/lib/go-1.10/src/syscall/syscall_linux_arm64.go:77 +0x20
github.com/elves/elvish/sys.Select(0x7, 0x4420098280, 0x0, 0x0, 0x0, 0x4420072600, 0x4420084680)
	/<<BUILDDIR>>/elvish-0.11+ds1/obj-aarch64-linux-gnu/src/github.com/elves/elvish/sys/select_linux.go:8 +0x40
github.com/elves/elvish/sys.TestSelect(0x44200bc1e0)
	/<<BUILDDIR>>/elvish-0.11+ds1/obj-aarch64-linux-gnu/src/github.com/elves/elvish/sys/select_test.go:48 +0x140
testing.tRunner(0x44200bc1e0, 0x13f750)
	/usr/lib/go-1.10/src/testing/testing.go:777 +0xb0
created by testing.(*T).Run
	/usr/lib/go-1.10/src/testing/testing.go:824 +0x25c
FAIL	github.com/elves/elvish/sys	0.007s
@xiaq xiaq added the bug label Mar 1, 2018
@xiaq
Copy link
Member

xiaq commented Mar 1, 2018

Ugh, Select on those two platforms are emulated, and they will actually deference the timeout struct. This sounds more like Go's bug, but we can work around it.

@zhsj
Copy link
Contributor Author

zhsj commented Mar 1, 2018

On Go 1.9 it's fine, 1.10 failed. So it's a regression in Go. When I can access to arm64/mipsel64, I may find a small test to open issue on Go.

@xiaq
Copy link
Member

xiaq commented Mar 1, 2018

The smallest reproduction is simply:

syscall.Select(0, nil, nil, nil, nil)

@xiaq
Copy link
Member

xiaq commented Mar 1, 2018

The culprit commit is golang/go@bf237f5

@zhsj
Copy link
Contributor Author

zhsj commented Mar 1, 2018

Here goes the issue on Go golang/go#24189

However we should have workaround too, otherwise we need wait a new release of Go.

@xiaq xiaq closed this as completed in 9865e3c Mar 1, 2018
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

2 participants