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

ipfs swarm connect → press enter → panic #6354

Closed
tmcw opened this issue May 20, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@tmcw
Copy link

commented May 20, 2019

Version information:

go-ipfs version: 0.4.20-
Repo version: 7
System version: amd64/darwin
Golang version: go1.12.4

Description:

Steps to replicate:

  1. Run ipfs swarm connect
  2. Press enter

This produces the following panic:

$ ipfs swarm connect
ipfs: Reading from /dev/stdin; send Ctrl-d to stop.

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

goroutine 1 [running]:
github.com/ipfs/go-ipfs/core/commands.resolveAddresses(0x209e400, 0xc0002fc400, 0xc0002af950, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
	src/github.com/ipfs/go-ipfs/core/commands/swarm.go:520 +0x48c
github.com/ipfs/go-ipfs/core/commands.peersWithAddresses(0x209e400, 0xc0002fc400, 0xc0002af950, 0x1, 0x1, 0x0, 0x0, 0xc0002fc3c0, 0xc0000cb300, 0xc00022fbe0)
	src/github.com/ipfs/go-ipfs/core/commands/swarm.go:472 +0x77
github.com/ipfs/go-ipfs/core/commands.glob..func153(0xc0002c7e30, 0x209e800, 0xc0000b0cc0, 0x207cda0, 0xc0000b0c60, 0xc00022fd28, 0x1b00b5e)
	src/github.com/ipfs/go-ipfs/core/commands/swarm.go:373 +0xbf
github.com/ipfs/go-ipfs-cmds.(*executor).Execute(0xc0000ae0f8, 0xc0002c7e30, 0x209e800, 0xc0000b0cc0, 0x207cda0, 0xc0000b0c60, 0xc0000b0cc0, 0x0)
	pkg/mod/github.com/ipfs/go-ipfs-cmds@v0.0.5/executor.go:81 +0x171
github.com/ipfs/go-ipfs-cmds/cli.Run(0x209e400, 0xc0002fc380, 0x2a5c060, 0xc0000bc000, 0x3, 0x3, 0xc00000e010, 0xc0000ae000, 0xc0000ae008, 0x1f36430, ...)
	pkg/mod/github.com/ipfs/go-ipfs-cmds@v0.0.5/cli/run.go:138 +0xa63
main.mainRet(0x0)
	src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:177 +0x421
main.main()
	src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:83 +0x22

@Stebalien Stebalien added the bug label May 20, 2019

Stebalien added a commit that referenced this issue May 20, 2019

commands/swarm(fix): handle empty multiaddrs
These are technically valid at the moment so they aren't caught when calling
`NewMultiaddr`. See multiformats/go-multiaddr#104.

fixes #6354

Stebalien added a commit that referenced this issue May 20, 2019

dep: update go-multiaddr
Forbids empty multiaddr, fixes #6354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.