-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
invalid memory address or nil pointer dereference in go-libp2p/p2p/transport/websocket #1769
Comments
Thanks for the bug report. This is my fault. I didn't expect the websocket client to have a nil tls client config. Fix coming right up! |
It happened again. I don't know why but it mostly happens when my ipfs node connects to over 900 peers. panic: runtime error: invalid memory address or nil pointer dereference goroutine 220345 [running]: |
Yeah, this will happen whenever you dial to a node that advertises a websocket address. You could try using the branch with the fix in it |
Sorry, I thought you guys had already merged it. |
No problem! I’ll leave this open until we actually merge it :) |
okok |
After a bit of pain, I was finally able to compile ipfs using the most up-to-date version of go-libp2p. I literally cloned this repository and redirected the ipfs github.com/libp2p to it.
I had all this work just to add a new protocol to libp2p and run it on ipfs. But after a few times running ipfs I got this. I don't believe the protocol I added made this bug so I'm reporting it. I hope you fix it as soon as possible :)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0x1805475]
goroutine 1287614 [running]:
github.com/libp2p/go-libp2p/p2p/transport/websocket.(*WebsocketTransport).maDial(0xc001938540, {0x2a442c8, 0xc012642420}, {0x2a58cc0, 0xc00de0c720})
github.com/libp2p/go-libp2p@v0.22.0/p2p/transport/websocket/websocket.go:186 +0x155
github.com/libp2p/go-libp2p/p2p/transport/websocket.(*WebsocketTransport).Dial(0xc001938540, {0x2a442c8, 0xc012642420}, {0x2a58cc0, 0xc00de0c720}, {0xc00c4e61e0, 0x26})
github.com/libp2p/go-libp2p@v0.22.0/p2p/transport/websocket/websocket.go:162 +0xc5
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).dialAddr(0xc000c31ba0, {0x2a442c8, 0xc012642420}, {0xc00c4e61e0, 0x26}, {0x2a58cc0?, 0xc00de0c720})
github.com/libp2p/go-libp2p@v0.22.0/p2p/net/swarm/swarm_dial.go:483 +0x1f1
github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).executeDial(0xc000c1d590, 0xc012d74740)
github.com/libp2p/go-libp2p@v0.22.0/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.22.0/p2p/net/swarm/limiter.go:169 +0x4aa
The text was updated successfully, but these errors were encountered: