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

bug: segfault in webtransport stream #1958

Closed
p-shahi opened this issue Dec 16, 2022 · 1 comment
Closed

bug: segfault in webtransport stream #1958

p-shahi opened this issue Dec 16, 2022 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP

Comments

@p-shahi
Copy link
Member

p-shahi commented Dec 16, 2022

Version: 0.24.1
Seen in kubo0.18-rc1

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1b1b0a0]

goroutine 1359646 [running]:
github.com/libp2p/go-libp2p/p2p/transport/webtransport.(*stream).Reset(0xc00fcd23c0)
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p@v0.24.1/p2p/transport/webtransport/stream.go:54 +0x20
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Stream).Reset(0xc02b010a00)
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/swarm_stream.go:86 +0x2a
github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).NewStream(0xc0008fc780, {0x2b5a0e0, 0xc01e869170}, {0xc00550a420, 0x26}, {0xc00037a860, 0x1, 0x0?})
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p@v0.24.1/p2p/host/basic/basic_host.go:636 +0x2bb
github.com/libp2p/go-libp2p-kad-dht/internal/net.(*peerMessageSender).prep(0xc01f123c20, {0x2b5a0e0?, 0xc01e869170?})
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/internal/net/message_manager.go:216 +0x6a
github.com/libp2p/go-libp2p-kad-dht/internal/net.(*peerMessageSender).SendRequest(0xc01f123c20, {0x2b5a0e0, 0xc01e869170}, 0xc01d88d830?)
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/internal/net/message_manager.go:277 +0x12c
github.com/libp2p/go-libp2p-kad-dht/internal/net.(*messageSenderImpl).SendRequest(0xc0014ea800, {0x2b5a038, 0xc01bc02ec0}, {0xc01d88d830, 0x26}, 0xc01eaef000?)
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/internal/net/message_manager.go:88 +0x374
github.com/libp2p/go-libp2p-kad-dht/pb.(*ProtocolMessenger).GetClosestPeers(0xc00037a930, {0x2b5a038, 0xc01bc02ec0}, {0xc01d88d830, 0x26}, {0xc01dfd4b70?, 0x0?})
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/pb/protocol_messenger.go:108 +0xd4
github.com/libp2p/go-libp2p-kad-dht.(*IpfsDHT).FindPeer.func1({0x2b5a038, 0xc01bc02ec0}, {0xc01d88d830, 0x26})
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/routing.go:604 +0xfb
github.com/libp2p/go-libp2p-kad-dht.(*query).queryPeer(0xc02b47bef0, {0x2b5a038, 0xc01bc02ec0}, 0xc000a03530?, {0xc01d88d830, 0x26})
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/query.go:408 +0x26e
created by github.com/libp2p/go-libp2p-kad-dht.(*query).spawnQuery
	/home/hugo/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.20.0/query.go:325 +0x44a
@marten-seemann
Copy link
Contributor

Fixed by #1968.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP
Projects
None yet
Development

No branches or pull requests

2 participants