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: "marked free object in span" crash in malloc (wasm) #69410

Closed
gopherbot opened this issue Sep 11, 2024 · 2 comments
Closed

runtime: "marked free object in span" crash in malloc (wasm) #69410

gopherbot opened this issue Sep 11, 2024 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link
Contributor

#!watchflakes
default <- pkg == "golang.org/x/tools/go/ssa" && test == "TestTypeparamTest/ifaceconv.go"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestTypeparamTest/ifaceconv.go
    builder_test.go:805: Input: /home/swarming/.swarming/w/ir/x/w/goroot/test/typeparam/ifaceconv.go
runtime: marked free object in span 0x1c808f8, elemsize=288 freeindex=0 (bad use of unsafe.Pointer? try -d=checkptr)
0x10b00000 free  marked   zombie
0x0000000010b00000:  0x0000000000000015  0x00000000004c1620 
0x0000000010b00010:  0x0000000000000001  0x0000000000000000 
0x0000000010b00020:  0x0000000000000000  0x0000000000000000 
0x0000000010b00030:  0x0000000000000000  0x0000000000000000 
0x0000000010b00040:  0x0000000000000000  0x0000000000000000 
0x0000000010b00050:  0x0000000000000000  0x0000000000000000 
...
fatal error: found pointer to free object

goroutine 737 gp=0x20b1880 m=0 mp=0x4d9a60 [running]:
runtime.throw({0xb8a4e, 0x1c})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1023 +0x3 fp=0x182d598 sp=0x182d570 pc=0x128a0003
runtime.(*mspan).reportZombies(0x1c808f8)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgcsweep.go:875 +0x61 fp=0x182d608 sp=0x182d598 pc=0x11b40061
runtime.(*sweepLocked).sweep(0x182d768, 0x1)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgcsweep.go:638 +0x7a fp=0x182d728 sp=0x182d608 pc=0x11af007a
runtime.(*mcentral).cacheSpan(0x4e4c78)
...
golang.org/x/tools/go/ssa_test.TestTypeparamTest.func1(0xf37f6c0)
	/home/swarming/.swarming/w/ir/x/w/targetrepo3091732262/go/ssa/builder_test.go:832 +0x4d fp=0x2349f60 sp=0x2349df0 pc=0x2a17004d
testing.tRunner(0xf37f6c0, 0x7168d98)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1689 +0xd fp=0x2349fc8 sp=0x2349f60 pc=0x1a2c000d
testing.(*T).Run.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1742 +0x2 fp=0x2349fe0 sp=0x2349fc8 pc=0x1a320002
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_wasm.s:434 +0x1 fp=0x2349fe8 sp=0x2349fe0 pc=0x153c0001
created by testing.(*T).Run in goroutine 567
	/home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1742 +0x43

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 == "golang.org/x/tools/go/ssa" && test == "TestTypeparamTest/ifaceconv.go"
2024-09-11 21:04 x_tools-go1.22-wasip1-wasm_wasmtime tools@94ac686d release-branch.go1.22@6fab4b9a x/tools/go/ssa.TestTypeparamTest/ifaceconv.go [ABORT] (log)
=== RUN   TestTypeparamTest/ifaceconv.go
    builder_test.go:805: Input: /home/swarming/.swarming/w/ir/x/w/goroot/test/typeparam/ifaceconv.go
runtime: marked free object in span 0x1c808f8, elemsize=288 freeindex=0 (bad use of unsafe.Pointer? try -d=checkptr)
0x10b00000 free  marked   zombie
0x0000000010b00000:  0x0000000000000015  0x00000000004c1620 
0x0000000010b00010:  0x0000000000000001  0x0000000000000000 
0x0000000010b00020:  0x0000000000000000  0x0000000000000000 
0x0000000010b00030:  0x0000000000000000  0x0000000000000000 
0x0000000010b00040:  0x0000000000000000  0x0000000000000000 
0x0000000010b00050:  0x0000000000000000  0x0000000000000000 
...
fatal error: found pointer to free object

goroutine 737 gp=0x20b1880 m=0 mp=0x4d9a60 [running]:
runtime.throw({0xb8a4e, 0x1c})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1023 +0x3 fp=0x182d598 sp=0x182d570 pc=0x128a0003
runtime.(*mspan).reportZombies(0x1c808f8)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgcsweep.go:875 +0x61 fp=0x182d608 sp=0x182d598 pc=0x11b40061
runtime.(*sweepLocked).sweep(0x182d768, 0x1)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mgcsweep.go:638 +0x7a fp=0x182d728 sp=0x182d608 pc=0x11af007a
runtime.(*mcentral).cacheSpan(0x4e4c78)
...
golang.org/x/tools/go/ssa_test.TestTypeparamTest.func1(0xf37f6c0)
	/home/swarming/.swarming/w/ir/x/w/targetrepo3091732262/go/ssa/builder_test.go:832 +0x4d fp=0x2349f60 sp=0x2349df0 pc=0x2a17004d
testing.tRunner(0xf37f6c0, 0x7168d98)
	/home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1689 +0xd fp=0x2349fc8 sp=0x2349f60 pc=0x1a2c000d
testing.(*T).Run.gowrap1()
	/home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1742 +0x2 fp=0x2349fe0 sp=0x2349fc8 pc=0x1a320002
runtime.goexit({})
	/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_wasm.s:434 +0x1 fp=0x2349fe8 sp=0x2349fe0 pc=0x153c0001
created by testing.(*T).Run in goroutine 567
	/home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1742 +0x43

watchflakes

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 11, 2024
@gopherbot gopherbot added this to the Unreleased milestone Sep 11, 2024
@adonovan adonovan changed the title x/tools/go/ssa: TestTypeparamTest/ifaceconv.go failures runtime: "marked free object in span" crash in malloc (wasm) Sep 12, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 12, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/612855 mentions this issue: go/ssa: go/ssa: disable TestTypeparamTest on wasm

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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Archived in project
Development

No branches or pull requests

1 participant