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

Provider engine panic on explore recursive edge with no parent #144

Closed
masih opened this issue Jan 18, 2022 · 1 comment
Closed

Provider engine panic on explore recursive edge with no parent #144

masih opened this issue Jan 18, 2022 · 1 comment

Comments

@masih
Copy link
Member

masih commented Jan 18, 2022

2022-01-18T14:04:13.499+0200	INFO	provider/engine	engine/linksystem.go:45	Retrieved advertisement from datastore	{"cid": "baguqeeqqj2huagbnkzkxipqqi2j2vce7ya", "size": 958}
panic: Traversed Explore Recursive Edge Node With No Parent

goroutine 153112616 [running]:
github.com/ipld/go-ipld-prime/traversal/selector.ExploreRecursiveEdge.Decide(...)
	/root/code/pkg/mod/github.com/ipld/[email protected]/traversal/selector/exploreRecursiveEdge.go:31
github.com/ipld/go-ipld-prime/traversal/selector.ExploreRecursive.Decide(...)
	/root/code/pkg/mod/github.com/ipld/[email protected]/traversal/selector/exploreRecursive.go:165
github.com/ipld/go-ipld-prime/traversal.Progress.walkAdv(0xc038df92c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00cfc0310, ...)
	/root/code/pkg/mod/github.com/ipld/[email protected]/traversal/walk.go:159 +0x83
github.com/ipld/go-ipld-prime/traversal.Progress.WalkAdv(0xc038df92c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00cfc0310, ...)
	/root/code/pkg/mod/github.com/ipld/[email protected]/traversal/walk.go:147 +0xd9
github.com/ipfs/go-graphsync/ipldutil.(*traverser).start.func1(0xc011069900)
	/root/code/pkg/mod/github.com/ipfs/[email protected]/ipldutil/traverser.go:230 +0x3d1
created by github.com/ipfs/go-graphsync/ipldutil.(*traverser).start
	/root/code/pkg/mod/github.com/ipfs/[email protected]/ipldutil/traverser.go:198 +0x55
@masih
Copy link
Member Author

masih commented Jan 18, 2022

This is an issue in IPLD where a parsed selector can still cause a panic. graphsync does parse the selector before traversal. Until it is guaranteed by IPLD that a parsed selector will not panic consider wrapping provider code with recover to catch any potential panics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant