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

panic: stack overflow when printing machine state with type conversion, embedded structs and loops #1291

Closed
moul opened this issue Oct 25, 2023 · 0 comments · Fixed by #1315
Assignees
Labels
🐞 bug Something isn't working

Comments

@moul
Copy link
Member

moul commented Oct 25, 2023

The provided Go code leads to runtime errors, specifically a stack overflow, and in some cases, type conversion issues when certain lines are uncommented. This behavior is unexpected and may indicate underlying problems in the code.

package bugdemo

func main() {
	A := BaseDAO{name: "A"}
	B := BaseDAO{name: "B", parent: A}
	// C := EngineeringDAO{BaseDAO{name: "C"}}
	// C := EngineeringDAO{BaseDAO{name: "C", parent: B}}
	// D := ProjectDAO{BaseDAO{name: "A", parent: C}}
	C := EngineeringDAO{BaseDAO{name: "C", parent: B}}
	D := BaseDAO{name: "A", parent: C}
	A.children = []DAO{D}
	println(A.Directory(""))
}

type DAO interface {
	Directory(prefix string) string
	Parent() DAO
}

type BaseDAO struct {
	name     string
	children []DAO
	parent   DAO
}

type EngineeringDAO struct {
	BaseDAO
}

type ProjectDAO struct {
	BaseDAO
}

func (d BaseDAO) Directory(prefix string) string {
	output := ""
	for _, child := range d.children {
		parent := child.Parent()
		_ = parent != d
		// if parent != d {
		output += child.Directory("")
	}
	return output
}

func (d BaseDAO) Parent() DAO {
	return d.parent
}

Produces the following result:

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0x140207f0360 stack=[0x140207f0000, 0x140407f0000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x104de72bb?, 0x10564e540?})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/panic.go:1047 +0x40 fp=0x16bb42d20 sp=0x16bb42cf0 pc=0x10474d600
runtime.newstack()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/stack.go:1105 +0x468 fp=0x16bb42ed0 sp=0x16bb42d20 pc=0x1047681c8
runtime.morestack()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:316 +0x70 fp=0x16bb42ed0 sp=0x16bb42ed0 pc=0x1047808d0

goroutine 1 [running]:
runtime.writeHeapBits.write({0x140067f4000?, 0x0?, 0x30?, 0x30?}, 0x55?, 0x7?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mbitmap.go:791 +0x13c fp=0x140207f0360 sp=0x140207f0360 pc=0x10472c33c
runtime.heapBitsSetType(0x140067f4180, 0x40, 0x40, 0x10509c040)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mbitmap.go:1062 +0x498 fp=0x140207f0420 sp=0x140207f0360 pc=0x10472caa8
runtime.mallocgc(0x40, 0x10509c040, 0x1)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/malloc.go:1074 +0x5a4 fp=0x140207f0490 sp=0x140207f0420 pc=0x104724774
runtime.makeslice(0x0?, 0x0?, 0x140207f0528?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/slice.go:103 +0x50 fp=0x140207f04c0 sp=0x140207f0490 pc=0x104765ee0
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310b40)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:72 +0x38 fp=0x140207f0560 sp=0x140207f04c0 pc=0x104cf2d28
fmt.(*pp).handleMethods(0x140067f60d0, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f07c0 sp=0x140207f0560 pc=0x10480607c
fmt.(*pp).printArg(0x140067f60d0, {0x10518ca40?, 0x14000310b40}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f0860 sp=0x140207f07c0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f60d0, {0x104de04f3, 0x2}, {0x140207f0a38?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f0970 sp=0x140207f0860 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f0a38, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f09d0 sp=0x140207f0970 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x14000310b40}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f0a70 sp=0x140207f09d0 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310dc0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f0b10 sp=0x140207f0a70 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f6000, 0x47300ec?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f0d70 sp=0x140207f0b10 pc=0x10480607c
fmt.(*pp).printArg(0x140067f6000, {0x10518ca40?, 0x14000310dc0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f0e10 sp=0x140207f0d70 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f6000, {0x104de04f3, 0x2}, {0x140207f0fe8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f0f20 sp=0x140207f0e10 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f0fe8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f0f80 sp=0x140207f0f20 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360a20}, {0x1051adf78, 0x14000310dc0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f1020 sp=0x140207f0f80 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*SliceValue).String(0x140003756b0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:54 +0x30c fp=0x140207f1190 sp=0x140207f1020 pc=0x104cf2b3c
fmt.(*pp).handleMethods(0x140067f3ee0, 0x4de2109?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f13f0 sp=0x140207f1190 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3ee0, {0x105117800?, 0x140003756b0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f1490 sp=0x140207f13f0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3ee0, {0x104de04f3, 0x2}, {0x140207f1668?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f15a0 sp=0x140207f1490 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f1668, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f1600 sp=0x140207f15a0 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2ed0, 0x14000375620}, {0x1051adf50, 0x140003756b0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f16a0 sp=0x140207f1600 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310f00)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f1740 sp=0x140207f16a0 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3e10, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f19a0 sp=0x140207f1740 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3e10, {0x10518ca40?, 0x14000310f00}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f1a40 sp=0x140207f19a0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3e10, {0x104de04f3, 0x2}, {0x140207f1c18?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f1b50 sp=0x140207f1a40 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f1c18, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f1bb0 sp=0x140207f1b50 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x14000310f00}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f1c50 sp=0x140207f1bb0 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000311400)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f1cf0 sp=0x140207f1c50 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3d40, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f1f50 sp=0x140207f1cf0 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3d40, {0x10518ca40?, 0x14000311400}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f1ff0 sp=0x140207f1f50 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3d40, {0x104de04f3, 0x2}, {0x140207f21c8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f2100 sp=0x140207f1ff0 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f21c8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f2160 sp=0x140207f2100 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360a20}, {0x1051adf78, 0x14000311400}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f2200 sp=0x140207f2160 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*SliceValue).String(0x140003755f0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:54 +0x30c fp=0x140207f2370 sp=0x140207f2200 pc=0x104cf2b3c
fmt.(*pp).handleMethods(0x140067f3c70, 0x4de2109?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f25d0 sp=0x140207f2370 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3c70, {0x105117800?, 0x140003755f0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f2670 sp=0x140207f25d0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3c70, {0x104de04f3, 0x2}, {0x140207f2848?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f2780 sp=0x140207f2670 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f2848, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f27e0 sp=0x140207f2780 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2ed0, 0x14000375590}, {0x1051adf50, 0x140003755f0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f2880 sp=0x140207f27e0 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x140003100a0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f2920 sp=0x140207f2880 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3ba0, 0x67e5cb0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f2b80 sp=0x140207f2920 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3ba0, {0x10518ca40?, 0x140003100a0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f2c20 sp=0x140207f2b80 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3ba0, {0x104de04f3, 0x2}, {0x140207f2df8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f2d30 sp=0x140207f2c20 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f2df8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f2d90 sp=0x140207f2d30 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x140003100a0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f2e30 sp=0x140207f2d90 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310b40)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f2ed0 sp=0x140207f2e30 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3ad0, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f3130 sp=0x140207f2ed0 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3ad0, {0x10518ca40?, 0x14000310b40}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f31d0 sp=0x140207f3130 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3ad0, {0x104de04f3, 0x2}, {0x140207f33a8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f32e0 sp=0x140207f31d0 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f33a8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f3340 sp=0x140207f32e0 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x14000310b40}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f33e0 sp=0x140207f3340 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310dc0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f3480 sp=0x140207f33e0 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3a00, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f36e0 sp=0x140207f3480 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3a00, {0x10518ca40?, 0x14000310dc0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f3780 sp=0x140207f36e0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3a00, {0x104de04f3, 0x2}, {0x140207f3958?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f3890 sp=0x140207f3780 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f3958, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f38f0 sp=0x140207f3890 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360a20}, {0x1051adf78, 0x14000310dc0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f3990 sp=0x140207f38f0 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*SliceValue).String(0x140003756b0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:54 +0x30c fp=0x140207f3b00 sp=0x140207f3990 pc=0x104cf2b3c
fmt.(*pp).handleMethods(0x140067f3930, 0x4de2109?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f3d60 sp=0x140207f3b00 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3930, {0x105117800?, 0x140003756b0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f3e00 sp=0x140207f3d60 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3930, {0x104de04f3, 0x2}, {0x140207f3fd8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f3f10 sp=0x140207f3e00 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f3fd8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f3f70 sp=0x140207f3f10 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2ed0, 0x14000375620}, {0x1051adf50, 0x140003756b0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f4010 sp=0x140207f3f70 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310f00)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f40b0 sp=0x140207f4010 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3860, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f4310 sp=0x140207f40b0 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3860, {0x10518ca40?, 0x14000310f00}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f43b0 sp=0x140207f4310 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3860, {0x104de04f3, 0x2}, {0x140207f4588?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f44c0 sp=0x140207f43b0 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f4588, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f4520 sp=0x140207f44c0 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x14000310f00}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f45c0 sp=0x140207f4520 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000311400)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f4660 sp=0x140207f45c0 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3790, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f48c0 sp=0x140207f4660 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3790, {0x10518ca40?, 0x14000311400}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f4960 sp=0x140207f48c0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3790, {0x104de04f3, 0x2}, {0x140207f4b38?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f4a70 sp=0x140207f4960 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f4b38, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f4ad0 sp=0x140207f4a70 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360a20}, {0x1051adf78, 0x14000311400}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f4b70 sp=0x140207f4ad0 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*SliceValue).String(0x140003755f0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:54 +0x30c fp=0x140207f4ce0 sp=0x140207f4b70 pc=0x104cf2b3c
fmt.(*pp).handleMethods(0x140067f36c0, 0x4de2109?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f4f40 sp=0x140207f4ce0 pc=0x10480607c
fmt.(*pp).printArg(0x140067f36c0, {0x105117800?, 0x140003755f0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f4fe0 sp=0x140207f4f40 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f36c0, {0x104de04f3, 0x2}, {0x140207f51b8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f50f0 sp=0x140207f4fe0 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f51b8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f5150 sp=0x140207f50f0 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2ed0, 0x14000375590}, {0x1051adf50, 0x140003755f0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f51f0 sp=0x140207f5150 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x140003100a0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f5290 sp=0x140207f51f0 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f35f0, 0x67e5bd0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f54f0 sp=0x140207f5290 pc=0x10480607c
fmt.(*pp).printArg(0x140067f35f0, {0x10518ca40?, 0x140003100a0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f5590 sp=0x140207f54f0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f35f0, {0x104de04f3, 0x2}, {0x140207f5768?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f56a0 sp=0x140207f5590 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f5768, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f5700 sp=0x140207f56a0 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x140003100a0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f57a0 sp=0x140207f5700 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310b40)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f5840 sp=0x140207f57a0 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3520, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f5aa0 sp=0x140207f5840 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3520, {0x10518ca40?, 0x14000310b40}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f5b40 sp=0x140207f5aa0 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3520, {0x104de04f3, 0x2}, {0x140207f5d18?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f5c50 sp=0x140207f5b40 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f5d18, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f5cb0 sp=0x140207f5c50 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360840}, {0x1051adf78, 0x14000310b40}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f5d50 sp=0x140207f5cb0 pc=0x104cf4538
github.com/gnolang/gno/gnovm/pkg/gnolang.(*StructValue).String(0x14000310dc0)
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:74 +0xac fp=0x140207f5df0 sp=0x140207f5d50 pc=0x104cf2d9c
fmt.(*pp).handleMethods(0x140067f3450, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:673 +0x21c fp=0x140207f6050 sp=0x140207f5df0 pc=0x10480607c
fmt.(*pp).printArg(0x140067f3450, {0x10518ca40?, 0x14000310dc0}, 0x76)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:756 +0x688 fp=0x140207f60f0 sp=0x140207f6050 pc=0x104806b38
fmt.(*pp).doPrintf(0x140067f3450, {0x104de04f3, 0x2}, {0x140207f62c8?, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:1077 +0x2e4 fp=0x140207f6200 sp=0x140207f60f0 pc=0x1048095f4
fmt.Sprintf({0x104de04f3, 0x2}, {0x140207f62c8, 0x1, 0x1})
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/fmt/print.go:239 +0x4c fp=0x140207f6260 sp=0x140207f6200 pc=0x10480370c
github.com/gnolang/gno/gnovm/pkg/gnolang.TypedValue.String({{0x1051b2c90, 0x14000360a20}, {0x1051adf78, 0x14000310dc0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}})
	/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/values_string.go:324 +0x68 fp=0x140207f6300 sp=0x140207f6260 pc=0x104cf4538
...additional frames elided...

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000074fa0 sp=0x14000074f80 pc=0x104750074
runtime.goparkunlock(...)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:387
runtime.forcegchelper()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:305 +0xb8 fp=0x14000074fd0 sp=0x14000074fa0 pc=0x10474feb8
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14000074fd0 sp=0x14000074fd0 pc=0x104782c64
created by runtime.init.6
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:293 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000075760 sp=0x14000075740 pc=0x104750074
runtime.goparkunlock(...)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgcsweep.go:319 +0x110 fp=0x140000757b0 sp=0x14000075760 pc=0x10473b1a0
runtime.gcenable.func1()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:178 +0x28 fp=0x140000757d0 sp=0x140000757b0 pc=0x10472fc58
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000757d0 sp=0x140000757d0 pc=0x104782c64
created by runtime.gcenable
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:178 +0x74

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xef5be1?, 0x6553f100?, 0x0?, 0x0?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000075f50 sp=0x14000075f30 pc=0x104750074
runtime.goparkunlock(...)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:387
runtime.(*scavengerState).park(0x10568e340)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgcscavenge.go:400 +0x5c fp=0x14000075f80 sp=0x14000075f50 pc=0x104738fbc
runtime.bgscavenge(0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgcscavenge.go:633 +0xac fp=0x14000075fb0 sp=0x14000075f80 pc=0x10473959c
runtime.gcenable.func2()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:179 +0x28 fp=0x14000075fd0 sp=0x14000075fb0 pc=0x10472fbf8
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14000075fd0 sp=0x14000075fd0 pc=0x104782c64
created by runtime.gcenable
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:179 +0xb8

goroutine 17 [finalizer wait]:
runtime.gopark(0x0?, 0x1051a6820?, 0xc0?, 0xa2?, 0x2000000020?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000074580 sp=0x14000074560 pc=0x104750074
runtime.runfinq()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mfinal.go:193 +0x10c fp=0x140000747d0 sp=0x14000074580 pc=0x10472ecec
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000747d0 sp=0x140000747d0 pc=0x104782c64
created by runtime.createfing
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mfinal.go:163 +0x84

goroutine 18 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000070740 sp=0x14000070720 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140000707d0 sp=0x14000070740 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000707d0 sp=0x140000707d0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 5 [GC worker (idle)]:
runtime.gopark(0x461c3e20e221?, 0x3?, 0x57?, 0xb4?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000076740 sp=0x14000076720 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140000767d0 sp=0x14000076740 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000767d0 sp=0x140000767d0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x461c3e20e7fd?, 0x3?, 0x75?, 0x32?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000070f40 sp=0x14000070f20 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x14000070fd0 sp=0x14000070f40 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14000070fd0 sp=0x14000070fd0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 33 [GC worker (idle)]:
runtime.gopark(0x461c3e20e539?, 0x3?, 0x65?, 0x6e?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x140004ca740 sp=0x140004ca720 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140004ca7d0 sp=0x140004ca740 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140004ca7d0 sp=0x140004ca7d0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 6 [GC worker (idle)]:
runtime.gopark(0x461c3e2192ba?, 0x1?, 0xa9?, 0x5a?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000076f40 sp=0x14000076f20 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x14000076fd0 sp=0x14000076f40 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14000076fd0 sp=0x14000076fd0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x461c3e20e1a4?, 0x3?, 0x67?, 0x50?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x140004caf40 sp=0x140004caf20 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140004cafd0 sp=0x140004caf40 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140004cafd0 sp=0x140004cafd0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 20 [GC worker (idle)]:
runtime.gopark(0x461c3e20dd69?, 0x3?, 0x92?, 0xbf?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000071740 sp=0x14000071720 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140000717d0 sp=0x14000071740 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000717d0 sp=0x140000717d0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 21 [GC worker (idle)]:
runtime.gopark(0x1056d1d00?, 0x1?, 0x7d?, 0x84?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000071f40 sp=0x14000071f20 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x14000071fd0 sp=0x14000071f40 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14000071fd0 sp=0x14000071fd0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 7 [GC worker (idle)]:
runtime.gopark(0x461c3e2193dd?, 0x1?, 0x47?, 0xde?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000077740 sp=0x14000077720 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140000777d0 sp=0x14000077740 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000777d0 sp=0x140000777d0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28

goroutine 22 [GC worker (idle)]:
runtime.gopark(0x461c3e20e4bc?, 0x3?, 0x24?, 0xd4?, 0x0?)
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/proc.go:381 +0xe4 fp=0x14000072740 sp=0x14000072720 pc=0x104750074
runtime.gcBgMarkWorker()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1275 +0xec fp=0x140000727d0 sp=0x14000072740 pc=0x104731b9c
runtime.goexit()
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x140000727d0 sp=0x140000727d0 pc=0x104782c64
created by runtime.gcBgMarkStartWorkers
	/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/mgc.go:1199 +0x28
exit status 2

There are multiple ways to play around this bug and potentially find new ones, basically try replacing some uncommented lines by commented ones.

From my current understanding, this code is actually bad, because it tries putting structs as DAO interface object instead of giving the pointer to the struct.

This mistake is sometimes completely ignored, and the code can run smoothly (bug1?).


In some other cases, there isn't a stack overflow but we can see conversion problem:

panic running expression main(): interface conversion: gnolang.Value is gnolang.StringValue, not *gnolang.StructValue                                                                                
Machine:                                                                                                                                                                                             
    CheckTypes: false                                                                                                                                                                                
        Op: [OpHalt OpExec OpBody OpPopResults OpPrecall OpBody OpRangeIter OpAssign OpPrecall]                                                                                                      
        Values: (len: 6)                                                                                                                                                                             
          #5 (struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)                                             
          #4 (typeval{bool} type{})                                                                                                                                                                  
          #3 (slice[(struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)] []govdao.DAO)
          #2 (<govdao.BaseDAO>.Directory(d govdao.BaseDAO,prefix string)( string) func(prefix string)( string))                                                                                      
          #1 (println func(xs ...interface{})())                                                                                                                                                     
          #0 (main func()())                                                                                                                                                                         
        Exprs:                                                                                                                                                                                       
          #1 (const-type bool)(parent<VPBlock(1,1)> != d<VPBlock(2,0)>)                                                                                                                              
          #0 (const (println func(xs ...interface{})()))(A<VPBlock(1,0)>.Directory((const ("" string))))                                                                                             
        Stmts:                                                                                                                                                                                       
          #3 bodyStmt[1/0/2]=if (const-type bool)(parent<VPBlock(2,1)> != d<VPBlock(3,0)>) {  }*                                                                                                     
          #2 bodyStmt[0/0/2]=return output<VPBlock(1,3)>*                                                                                                                                            
          #1 bodyStmt[0/0/6]=(end)                                                                                                                                                                   
          #0 return                                                                                                                                                                                  
        Blocks:                                                                                                                                                                                      
          @(1) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140003434a0,Source:for _<VPBlock(0,0)>, child<VPBlo...,Parent:0x14000342b40)                                               
            child: (struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)
            parent: (struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)                                      
 (s vals) @(1) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140001d4620,Source:for _<VPBlock(0,0)>, child<VPBlo...,Parent:0x140001da820)                                               
            child: (undefined)                                                                                                                                                                       
            parent: (undefined)                                                                                                                                                                      
 (s typs) @(1) [govdao.DAO govdao.DAO]                                                                                                                                                               
          @(2) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000342b40,Source:func (d BaseDAO<VPBlock(2,1)>) D...,Parent:0x14000342000)                                               
            d: (struct{("A" string),(slice[(struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)] []govdao.DAO),(undefined)} go
vdao.BaseDAO)                                                                                                                                                                                        
            prefix: ("" string)                                                                                                                                                                      
            .res_0: ( string)                                                                                                                                                                        
            output: ("" string)                                                                                                                                                                      
 (s vals) @(2) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140001da820,Source:func (d BaseDAO<VPBlock(2,1)>) D...,Parent:0x140000eb0a0)                                               
            d: (nil govdao.BaseDAO)                                                                                                                                                                  
            prefix: ( string)                                                                                                                                                                        
            .res_0: ( string)                                                                                                                                                                        
            output: ( string)                                                                                                                                                                        
 (s typs) @(2) [govdao.BaseDAO string string string]
@(3) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000342000,Source:file{ package govdao; import std...,Parent:0x1400007e3c0)                                                                                                                                                    
            std: (package(std std) package{})                             
            strconv: (package(strconv strconv) package{})                                                                                            
 (s vals) @(3) Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140000eb0a0,Source:file{ package govdao; import std...,Parent:0x140000eb360)                                                                                                                                                    
            std: (package(std std) package{})                             
            strconv: (package(strconv strconv) package{})                                                                                            
 (s typs) @(3) [package{} package{}]                                      
          @(4) govdao                                                     
        Blocks (other):                                                   
          #2 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000342b40,Source:func (d BaseDAO<VPBlock(2,1)>) D...,Parent:0x14000342000)                                                                                                                                                      
            d: (struct{("A" string),(slice[(struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)] []govdao.DAO),(undefined)} go
vdao.BaseDAO)                                                             
            prefix: ("" string)                                           
            .res_0: ( string)                                             
            output: ("" string)                                           
 (static) #2 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140001da820,Source:func (d BaseDAO<VPBlock(2,1)>) D...,Parent:0x140000eb0a0)                                                                                                                                                      
            d: (nil govdao.BaseDAO)                                       
            prefix: ( string)                                             
            .res_0: ( string)                                             
            output: ( string)                                             
          #1 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x14000342780,Source:func main() { A<VPBlock(1,0)> :=...,Parent:0x14000342000)                                                                                                                                                      
            A: (struct{("A" string),(slice[(struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)] []govdao.DAO),(undefined)} go
vdao.BaseDAO)                                                             
            B: (struct{("B" string),(nil []govdao.DAO),(struct{("A" string),(slice[(struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.Pr
ojectDAO)] []govdao.DAO),(undefined)} govdao.BaseDAO)} govdao.BaseDAO)    
            C: (struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)                                                                                                                                                
            D: (struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)
 (static) #1 Block(ID:0000000000000000000000000000000000000000:0,Addr:0x140001da420,Source:func main() { A<VPBlock(1,0)> :=...,Parent:0x140000eb0a0)                                                                                                                                                      
            A: (nil govdao.BaseDAO)                                       
            B: (nil govdao.BaseDAO)                                       
            C: (nil govdao.EngineeringDAO)                                
            D: (nil govdao.ProjectDAO)                                    
        Frames:                                                           
          #2 [FRAME LABEL:  6/3/1/3/3]                                    
          #1 [FRAME FUNC:Directory RECV:(struct{("A" string),(slice[(struct{(struct{("A" string),(nil []govdao.DAO),(struct{(struct{("C" string),(nil []govdao.DAO),(&0x14000142c08.(*govdao.BaseDAO) *govdao.BaseDAO)} govdao.BaseDAO)} govdao.EngineeringDAO)} govdao.BaseDAO)} govdao.ProjectDAO)] []go
vdao.DAO),(undefined)} govdao.BaseDAO) (1 args) 5/2/1/2/2 LASTPKG:govdao LASTRLM:Realm(nil)]                                                         
          #0 [FRAME FUNC:main RECV:(undefined) (0 args) 1/0/0/0/1 LASTPKG:govdao LASTRLM:Realm(nil)]                                                                                                                                                                                                      
        Realm:                                                            
                                                                          
        Exceptions:                                                       
          []                                                              
                                                                          
panic: interface conversion: gnolang.Value is gnolang.StringValue, not *gnolang.StructValue [recovered]                                                                                                                                                                                                   
        panic: interface conversion: gnolang.Value is gnolang.StringValue, not *gnolang.StructValue                                                                                                                                                                                                       

goroutine 1 [running]:                                                    
main.runExpr.func1()                                                      
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/cmd/gno/run.go:158 +0xf8                                                                    
panic({0x102c3c520, 0x140006dd8c0})                                       
        /nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/src/runtime/panic.go:884 +0x204                                                                                                                                                                                                    
github.com/gnolang/gno/gnovm/pkg/gnolang.isEql({0x102d1fb78, 0x14000128120}, 0x140006dd860, 0x140006dd890)                                                                                                                                                                                                
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/op_binary.go:420 +0xd48                                                         
github.com/gnolang/gno/gnovm/pkg/gnolang.isEql({0x102d1fb78, 0x14000128120}, 0x140002d00c8, 0x140002d00f0)                                                                                                                                                                                                
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/op_binary.go:434 +0xcb8                                                         
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).doOpNeq(0x140000e3200)                                                                           
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/op_binary.go:101 +0xb8                                                          
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).Run(0x140000e3200)                                                                               
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/machine.go:1124 +0x544                                                          
github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).Eval(0x140000e3200, {0x102d17968, 0x140002a7680})
/Users/moul/go/src/github.com/gnolang/gno2/gnovm/pkg/gnolang/machine.go:636 +0x478                                                           
main.runExpr(0x140000e3200, {0x102941fad?, 0x1?})                         
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/cmd/gno/run.go:165 +0x7c                                                                    
main.execRun(0x140002ad650, {0x140000a7930, 0x1, 0x1}, 0x14000226780?)                                                                               
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/cmd/gno/run.go:107 +0x288                                                                   
main.newRunCmd.func1({0x0?, 0x0?}, {0x140000a7930?, 0x1400014eae8?, 0x0?})                                                                           
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/cmd/gno/run.go:34 +0x38                                                                     
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x0?, {0x102d11608?, 0x140000bc010?})                                                         
        /Users/moul/go/src/github.com/gnolang/gno2/tm2/pkg/commands/command.go:233 +0x17c                                                            
github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x1400014e630?, {0x102d11608?, 0x140000bc010?})                                                                                                                                                                                                    
        /Users/moul/go/src/github.com/gnolang/gno2/tm2/pkg/commands/command.go:237 +0x12c                                                            
github.com/gnolang/gno/tm2/pkg/commands.(*Command).ParseAndRun(0x140000ae000?, {0x102d11608, 0x140000bc010}, {0x140000ce050?, 0x60?, 0x0?})                                                                                                                                                               
        /Users/moul/go/src/github.com/gnolang/gno2/tm2/pkg/commands/command.go:118 +0x4c                                                             
main.main()                                                               
        /Users/moul/go/src/github.com/gnolang/gno2/gnovm/cmd/gno/main.go:14 +0x74                                                                    
exit status 2                                                             

(bug2?) I believe the stack overflow occurs when we print the state of the variable using println(m.String()). It seems to be caused by a combination of a loop and the use of embedded structures.

To prevent loops when printing a recursive object, we can utilize a map to keep track of already printed pointers. However, it appears that the use of embedding may be causing this check to fail.


And finally (bug3?):

We should avoid stack overflow at all costs by making sure that we have all the runtime limit options and that the debugging features are always safe to run.


Update 1: I believe the stack overflow is due to a panic-recover-print loop, which is recursive.

CleanShot 2023-10-25 at 10 41 00@2x

@moul moul added the 🐞 bug Something isn't working label Oct 25, 2023
@moul moul changed the title stack overflow Stack overflow when printing machine state with type conversion, embedded structs and loops Oct 25, 2023
@moul moul added this to the 🚀 main.gno.land (required) milestone Oct 25, 2023
@moul moul changed the title Stack overflow when printing machine state with type conversion, embedded structs and loops panic: stack overflow when printing machine state with type conversion, embedded structs and loops Oct 25, 2023
@deelawn deelawn self-assigned this Oct 27, 2023
@moul moul linked a pull request Oct 29, 2023 that will close this issue
thehowl added a commit that referenced this issue Dec 21, 2023
Addresses #1291. This is to fix the issue causing the entire interpreter
process to crash, not the underlying issue that is causing it to panic
in the first place.

---------

Co-authored-by: Morgan <[email protected]>
gfanton pushed a commit to moul/gno that referenced this issue Jan 18, 2024
…1315)

Addresses gnolang#1291. This is to fix the issue causing the entire interpreter
process to crash, not the underlying issue that is causing it to panic
in the first place.

---------

Co-authored-by: Morgan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
Status: 🚀 Needed for Launch
Development

Successfully merging a pull request may close this issue.

2 participants