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/debug: SIGSEGV in dumpgoroutine #35172

Closed
bcmills opened this issue Oct 26, 2019 · 5 comments
Closed

runtime/debug: SIGSEGV in dumpgoroutine #35172

bcmills opened this issue Oct 26, 2019 · 5 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

@bcmills
Copy link
Contributor

bcmills commented Oct 26, 2019

From linux-ppc64le-buildlet in https://build.golang.org/log/e905b629a5a27c512d13fcbeffe416796327bba3:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x18cbc]

runtime stack:
runtime.throw(0x15c4a9, 0x2a)
	/workdir/go/src/runtime/panic.go:1045 +0x5c
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:573 +0x474
runtime.dumpgoroutine(0xc000001680)
	/workdir/go/src/runtime/heapdump.go:374 +0x23c
runtime.dumpgs()
	/workdir/go/src/runtime/heapdump.go:403 +0xa8
runtime.mdump()
	/workdir/go/src/runtime/heapdump.go:649 +0xc0
runtime.writeheapdump_m(0x7)
	/workdir/go/src/runtime/heapdump.go:672 +0x6c
runtime.runtime_debug_WriteHeapDump.func1()
	/workdir/go/src/runtime/heapdump.go:24 +0x2c
runtime.systemstack(0x0)
	/workdir/go/src/runtime/asm_ppc64x.s:269 +0x94
runtime.mstart()
	/workdir/go/src/runtime/proc.go:1069

goroutine 21 [waiting]:
runtime.systemstack_switch()
	/workdir/go/src/runtime/asm_ppc64x.s:216 +0x10 fp=0xc0001c4e50 sp=0xc0001c4e30 pc=0x6de00
runtime/debug.WriteHeapDump(0x7)
	/workdir/go/src/runtime/heapdump.go:23 +0x60 fp=0xc0001c4e90 sp=0xc0001c4e50 pc=0x17dd0
runtime/debug_test.TestWriteHeapDumpNonempty(0xc0000aa100)
	/workdir/go/src/runtime/debug/heapdump_test.go:25 +0x124 fp=0xc0001c4f60 sp=0xc0001c4e90 pc=0x103b54
testing.tRunner(0xc0000aa100, 0x15e690)
	/workdir/go/src/testing/testing.go:916 +0xc0 fp=0xc0001c4fb0 sp=0xc0001c4f60 pc=0xca1a0
runtime.goexit()
	/workdir/go/src/runtime/asm_ppc64x.s:884 +0x4 fp=0xc0001c4fb0 sp=0xc0001c4fb0 pc=0x703c4
created by testing.(*T).Run
	/workdir/go/src/testing/testing.go:967 +0x2ec

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0000aa100, 0x158713, 0x19, 0x15e690, 0x301)
	/workdir/go/src/testing/testing.go:968 +0x308
testing.runTests.func1(0xc00008c000)
	/workdir/go/src/testing/testing.go:1209 +0x78
testing.tRunner(0xc00008c000, 0xc000054d88)
	/workdir/go/src/testing/testing.go:916 +0xc0
testing.runTests(0xc00000c060, 0x2455e0, 0x7, 0x7, 0x0)
	/workdir/go/src/testing/testing.go:1207 +0x27c
testing.(*M).Run(0xc00000a080, 0x0)
	/workdir/go/src/testing/testing.go:1124 +0x150
main.main()
	_testmain.go:58 +0x130

goroutine 9 [runnable]:
runtime.Goexit()
	/workdir/go/src/runtime/panic.go:608 +0x16c
testing.(*common).SkipNow(0xc00008c200)
	/workdir/go/src/testing/testing.go:749 +0x3c
testing.(*common).Skipf(0xc00008c200, 0x15def2, 0x4a, 0xc000078020, 0x1, 0x1)
	/workdir/go/src/testing/testing.go:735 +0x7c
internal/testenv.SkipFlaky(0x182500, 0xc00008c200, 0x4e6c)
	/workdir/go/src/internal/testenv/testenv.go:241 +0xe4
runtime/debug_test.TestSetGCPercent(0xc00008c200)
	/workdir/go/src/runtime/debug/garbage_test.go:114 +0x5c
testing.tRunner(0xc00008c200, 0x15e670)
	/workdir/go/src/testing/testing.go:916 +0xc0
created by testing.(*T).Run
	/workdir/go/src/testing/testing.go:967 +0x2ec
FAIL	runtime/debug	0.052s

CC @cuonglm @aclements @cherrymui

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 26, 2019
@bcmills bcmills added this to the Go1.14 milestone Oct 26, 2019
@cuonglm
Copy link
Member

cuonglm commented Oct 26, 2019

Seems a flaky for me, another fail https://build.golang.org/log/ac9672a53d4ece77dcb8acca1cf4a468c719cceb

@bcmills bcmills changed the title runtime/debug: SIGSEGV in dumpgoroutine on linux-ppc64le-buildlet runtime/debug: SIGSEGV in dumpgoroutine Oct 26, 2019
@bcmills
Copy link
Contributor Author

bcmills commented Oct 26, 2019

Here's one on freebsd-arm-paulzhol: https://build.golang.org/log/47a67881527b85bd923b75d9aa910a7f62598790

@aclements
Copy link
Member

This is on the line

		dumpint(uint64(uintptr(unsafe.Pointer(d.fn.fn))))

where d is a defer.

@danscales, didn't open-coded defers make it possible for there to be a defer object on the chain with _defer.fn set to nil?

Probably we should just emit nil in the heap dump in that case. To the extent that the heap dump is meaningful at all at this point, I think the defer records are only used to find roots the way the GC does, and the GC just ignores d.fn if it's nil.

@danscales danscales self-assigned this Oct 26, 2019
@gopherbot
Copy link

Change https://golang.org/cl/203697 mentions this issue: runtime: fix dumpgoroutine() to deal with open-coded defers

@laboger
Copy link
Contributor

laboger commented Oct 29, 2019 via email

@golang golang locked and limited conversation to collaborators Oct 28, 2020
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

6 participants