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: stray pointer read in cmd/compile/internal/ssa test #23402

Closed
rsc opened this issue Jan 10, 2018 · 4 comments
Closed

runtime: stray pointer read in cmd/compile/internal/ssa test #23402

rsc opened this issue Jan 10, 2018 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jan 10, 2018

Trybot run for https://go-review.googlesource.com/c/go/+/87155/3 produced this on darwin/amd64:

# cmd/compile/internal/ssa
unexpected fault address 0xb01dfacedebac1e
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x100178a]

goroutine 1 [running]:
runtime.throw(0x12c9a15, 0x5)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/panic.go:616 +0x81 fp=0xc4276ab828 sp=0xc4276ab808 pc=0x1028fa1
runtime.sigpanic()
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/signal_unix.go:389 +0x200 fp=0xc4276ab878 sp=0xc4276ab828 pc=0x103d2c0
runtime.interhash(0xc4276ab9f0, 0x93dbd612, 0xc4331190a0)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/alg.go:146 +0x3a fp=0xc4276ab8d0 sp=0xc4276ab878 pc=0x100178a
runtime.mapaccess2(0x127ac40, 0xc4250456b0, 0xc4276ab9f0, 0xc43453f788, 0xc424e9f001)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/hashmap.go:412 +0x73 fp=0xc4276ab918 sp=0xc4276ab8d0 pc=0x10072d3
main.(*Package).growSpan(...)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/cmd/vet/shadow.go:97
main.(*Package).check(0xc420445ce0, 0xc42005d0c0, 0xc424e9f000, 0x55, 0x80, 0x0, 0xc425053000, 0x0)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/cmd/vet/types.go:109 +0x5e6 fp=0xc4276abb28 sp=0xc4276ab918 pc=0x1231396
main.doPackage(0xc4200ec000, 0x55, 0x5e, 0x0, 0x1433240)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/cmd/vet/main.go:431 +0x7f1 fp=0xc4276abdd8 sp=0xc4276abb28 pc=0x1224cf1
main.doPackageCfg(0x7fff5fbff980, 0x4f)
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/cmd/vet/main.go:345 +0x221 fp=0xc4276abe88 sp=0xc4276abdd8 pc=0x1223c31
main.main()
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/cmd/vet/main.go:243 +0x243 fp=0xc4276abf88 sp=0xc4276abe88 pc=0x1223063
runtime.main()
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/proc.go:198 +0x212 fp=0xc4276abfe0 sp=0xc4276abf88 pc=0x102a5e2
runtime.goexit()
	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4276abfe8 sp=0xc4276abfe0 pc=0x1053121
FAIL	cmd/compile/internal/ssa [build failed]
2018/01/10 08:22:22 Failed: exit status 2

https://storage.googleapis.com/go-build-log/91a88879/darwin-amd64-10_11_dd529910.log

Seems bad and I don't see how my CL could have caused it. Earlier patch sets did not behave like that.

@rsc rsc added this to the Go1.10 milestone Jan 10, 2018
@rsc rsc added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jan 10, 2018
@bradfitz
Copy link
Contributor

Maybe related: #22988 (runtime/Darwin memory corruption?)

@ianlancetaylor
Copy link
Contributor

cc @aclements

@ianlancetaylor
Copy link
Contributor

Just so others don't have to look this up, the fault address 0xb01dfacedebac1e means that Darwin raised a SIGSEGV because of a malformed address: one for which the top 16 bits are not a copy of bit 47. So this certainly appears to be some form of memory corruption. The error occurs when trying to fetch the hash function to use for a map key type, on the line fn := t.alg.hash. The map key type is an interface type, and t is the type of the value passed as the map key. Either t or t.alg appears to be corrupt.

@aclements
Copy link
Member

Closing as a dup of #22988.

@golang golang locked and limited conversation to collaborators Jan 23, 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. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants