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

0.18.0-rc1: panic in webtransport.(*transport).Dial #9516

Closed
lidel opened this issue Dec 20, 2022 · 3 comments · Fixed by libp2p/go-libp2p#1962 or #9522
Closed

0.18.0-rc1: panic in webtransport.(*transport).Dial #9516

lidel opened this issue Dec 20, 2022 · 3 comments · Fixed by libp2p/go-libp2p#1962 or #9522
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@lidel
Copy link
Member

lidel commented Dec 20, 2022

Version

0.18.0-rc1

Config

default

Description

Problem with kubo 0.18.0-rc1. At some point it crashes:

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

goroutine 284534 [running]:
github.com/libp2p/go-libp2p/p2p/transport/webtransport.(*transport).Dial(0xc000736580, {0x2ba5508, 0xc00a8a5ec0}, {0x2bbcac0?, 0xc00a8d6390}, {0xc005fcce10, 0x26})
	github.com/libp2p/go-libp2p@v0.24.1/p2p/transport/webtransport/transport.go:135 +0x167
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).dialAddr(0xc0019521a0, {0x2ba5508, 0xc00a8a5ec0}, {0xc005fcce10, 0x26}, {0x2bbcac0?, 0xc00a8d6390})
	github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/swarm_dial.go:493 +0x1f1
github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).executeDial(0xc00071dc70, 0xc00a8a7a80)
	github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/limiter.go:219 +0xf0
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).addCheckFdLimit
	github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/limiter.go:169 +0x4bb

The same issue appeared 5 times in two days (running in Docker with --restart unless-stopped)

This seems to be different from #9515, as i always get the above trace around limiter/transport – filling as a separate issue.

cc libp2p/go-libp2p#1958

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Dec 20, 2022
@lidel lidel moved this to 🥞 Todo in IPFS Shipyard Team Dec 20, 2022
@marten-seemann
Copy link
Member

I assume you're not using the resource manager? That would explain the nil pointer dereference, as we're not properly initializing the NullResourceManager for WebTransport.

@lidel
Copy link
Member Author

lidel commented Jan 2, 2023

@marten-seemann no, RC1 has this error WITH resource manager enabled:

ipfs version 0.18.0-rc1
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
Kubo version: 0.18.0-rc1-ae774a3
Repo version: 13
System version: amd64/linux
Golang version: go1.19.1

Computing default go-libp2p Resource Manager limits based on:
    - 'Swarm.ResourceMgr.MaxMemory': "8.3 GB"
    - 'Swarm.ResourceMgr.MaxFileDescriptors': 524288

Applying any user-supplied overrides on top.
Run 'ipfs swarm limit all' to see the resulting limits.

Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/udp/4001/quic
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1
....
Daemon is ready
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1b589c7]

goroutine 284534 [running]:
github.com/libp2p/go-libp2p/p2p/transport/webtransport.(*transport).Dial(0xc000736580, {0x2ba5508, 0xc00a8a5ec0}, {0x2bbcac0?, 0xc00a8d6390}, {0xc005fcce10, 0x26})
	github.com/libp2p/go-libp2p@v0.24.1/p2p/transport/webtransport/transport.go:135 +0x167
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).dialAddr(0xc0019521a0, {0x2ba5508, 0xc00a8a5ec0}, {0xc005fcce10, 0x26}, {0x2bbcac0?, 0xc00a8d6390})
	github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/swarm_dial.go:493 +0x1f1
github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).executeDial(0xc00071dc70, 0xc00a8a7a80)
	github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/limiter.go:219 +0xf0
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).addCheckFdLimit
	github.com/libp2p/go-libp2p@v0.24.1/p2p/net/swarm/limiter.go:169 +0x4bb

I'll see if #9522 helps and report back.

@lidel
Copy link
Member Author

lidel commented Jan 2, 2023

Was unable to trigger panic so far, assuming #9522 fixed Dial one.
Will observe logs this week and reopen if it happens again.

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) need/triage Needs initial labeling and prioritization
Projects
No open projects
Archived in project
2 participants