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: "traceback did not unwind completely" during preempt during strings_test init #69389

Open
gopherbot opened this issue Sep 11, 2024 · 6 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-NetBSD
Milestone

Comments

@gopherbot
Copy link
Contributor

#!watchflakes
default <- pkg == "strings" && test == ""

Issue created automatically to collect these failures.

Example (log):

runtime: g1: frame.sp=0x40001a7e10 top=0x40001c7fd0
	stack=[0x4000188000-0x40001c8000
fatal error: traceback did not unwind completely

runtime stack:
runtime.throw({0x1abac7?, 0x4000187d48?})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1069 +0x38 fp=0x4000187ba0 sp=0x4000187b70 pc=0x7d588
runtime.(*unwinder).finishInternal(0x4000187c08?)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:566 +0x110 fp=0x4000187be0 sp=0x4000187ba0 pc=0x6b3d0
runtime.(*unwinder).next(0x4000187cc0?)
...
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:435 +0xc8 fp=0x400004f710 sp=0x400004f6f0 pc=0x7d6a8
runtime.gcBgMarkWorker(0x400007e000)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1362 +0xdc fp=0x400004f7b0 sp=0x400004f710 pc=0x2713c
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1278 +0x28 fp=0x400004f7d0 sp=0x400004f7b0 pc=0x27028
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1223 +0x4 fp=0x400004f7d0 sp=0x400004f7d0 pc=0x84314
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1278 +0x140
FAIL	strings	1.150s

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 11, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "strings" && test == ""
2024-09-10 21:10 gotip-netbsd-arm64 go@3da4281d strings (log)
runtime: g1: frame.sp=0x40001a7e10 top=0x40001c7fd0
	stack=[0x4000188000-0x40001c8000
fatal error: traceback did not unwind completely

runtime stack:
runtime.throw({0x1abac7?, 0x4000187d48?})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1069 +0x38 fp=0x4000187ba0 sp=0x4000187b70 pc=0x7d588
runtime.(*unwinder).finishInternal(0x4000187c08?)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:566 +0x110 fp=0x4000187be0 sp=0x4000187ba0 pc=0x6b3d0
runtime.(*unwinder).next(0x4000187cc0?)
...
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:435 +0xc8 fp=0x400004f710 sp=0x400004f6f0 pc=0x7d6a8
runtime.gcBgMarkWorker(0x400007e000)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1362 +0xdc fp=0x400004f7b0 sp=0x400004f710 pc=0x2713c
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1278 +0x28 fp=0x400004f7d0 sp=0x400004f7b0 pc=0x27028
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1223 +0x4 fp=0x400004f7d0 sp=0x400004f7d0 pc=0x84314
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1278 +0x140
FAIL	strings	1.150s

watchflakes

@adonovan adonovan changed the title strings: unrecognized failures strings: "traceback did not unwind completely" during preempt during test init Sep 13, 2024
@adonovan adonovan changed the title strings: "traceback did not unwind completely" during preempt during test init runtime: "traceback did not unwind completely" during preempt during strings_test init Sep 13, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 13, 2024
@mknyszek mknyszek added this to the Backlog milestone Sep 18, 2024
@mknyszek
Copy link
Contributor

CC @golang/netbsd

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "strings" && test == ""
2024-10-18 23:13 gotip-netbsd-arm64 go@488e2d18 strings (log)
runtime: g1: frame.sp=0x400019fe10 top=0x40001bffd0
	stack=[0x4000180000-0x40001c0000
fatal error: traceback did not unwind completely

runtime stack:
runtime.throw({0x1abe5c?, 0x400006fd48?})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1074 +0x38 fp=0x400006fba0 sp=0x400006fb70 pc=0x7d948
runtime.(*unwinder).finishInternal(0x400006fc08?)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:566 +0x110 fp=0x400006fbe0 sp=0x400006fba0 pc=0x6b770
runtime.(*unwinder).next(0x400006fcc0?)
...
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:435 +0xc8 fp=0x400050cf10 sp=0x400050cef0 pc=0x7da68
runtime.gcBgMarkWorker(0x400010a0e0)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1363 +0xdc fp=0x400050cfb0 sp=0x400050cf10 pc=0x2713c
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1279 +0x28 fp=0x400050cfd0 sp=0x400050cfb0 pc=0x27028
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1223 +0x4 fp=0x400050cfd0 sp=0x400050cfd0 pc=0x846d4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1279 +0x140
FAIL	strings	0.382s

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "strings" && test == ""
2024-11-15 17:47 gotip-netbsd-arm64 go@09f9b5e3 strings (log)
runtime: g1: frame.sp=0x400019fe10 top=0x40001bffd0
	stack=[0x4000180000-0x40001c0000
fatal error: traceback did not unwind completely

runtime stack:
runtime.throw({0x1aea73?, 0x400006bd48?})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1084 +0x38 fp=0x400006bba0 sp=0x400006bb70 pc=0x77c78
runtime.(*unwinder).finishInternal(0x400006bc08?)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:566 +0x110 fp=0x400006bbe0 sp=0x400006bba0 pc=0x68e80
runtime.(*unwinder).next(0x400006bcc0?)
...
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:435 +0xc8 fp=0x400004df10 sp=0x400004def0 pc=0x77d98
runtime.gcBgMarkWorker(0x400007e0e0)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1412 +0xdc fp=0x400004dfb0 sp=0x400004df10 pc=0x2576c
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1328 +0x28 fp=0x400004dfd0 sp=0x400004dfb0 pc=0x25658
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1260 +0x4 fp=0x400004dfd0 sp=0x400004dfd0 pc=0x7ea04
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1328 +0x140
FAIL	strings	0.614s

watchflakes

@fr0xk
Copy link

fr0xk commented Nov 16, 2024

The error indicates stack corruption, likely caused by unsafe pointer operations, CGO issues, or concurrent stack modifications. The stack pointer mismatch (frame.sp=0x40001a7e10 top=0x40001c7fd0) and failed stack trace unwinding suggest the garbage collector couldn't clean up due to inconsistent state. Since this happens during goroutine preemption and test initialization (strings_test init), the issue is likely to involve with package-level variables or init() functions. Move initialization code to main(), ensuring synchronization. That should prevent early execution during test setup.

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "strings" && test == ""
2024-11-19 23:24 gotip-netbsd-arm64 go@fb7f4f97 strings (log)
runtime: g1: frame.sp=0x400011fe10 top=0x400013ffd0
	stack=[0x4000100000-0x4000140000
fatal error: traceback did not unwind completely

runtime stack:
runtime.throw({0x1b1b41?, 0x400006bd58?})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1099 +0x38 fp=0x400006bbc0 sp=0x400006bb90 pc=0x78d98
runtime.(*unwinder).finishInternal(0x400006bc28?)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:566 +0x110 fp=0x400006bc00 sp=0x400006bbc0 pc=0x69c40
runtime.(*unwinder).next(0x400006bcd0?)
...
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:435 +0xc8 fp=0x4000053710 sp=0x40000536f0 pc=0x78eb8
runtime.gcBgMarkWorker(0x4000392000)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1423 +0xdc fp=0x40000537b0 sp=0x4000053710 pc=0x25c7c
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1339 +0x28 fp=0x40000537d0 sp=0x40000537b0 pc=0x25b68
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1260 +0x4 fp=0x40000537d0 sp=0x40000537d0 pc=0x7fcd4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgc.go:1339 +0x140
FAIL	strings	2.089s

watchflakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-NetBSD
Projects
Status: No status
Development

No branches or pull requests

3 participants