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 crashes when run as a node subprocess #1260

Closed
krl opened this issue May 20, 2015 · 2 comments
Closed

Ipfs crashes when run as a node subprocess #1260

krl opened this issue May 20, 2015 · 2 comments

Comments

@krl
Copy link
Contributor

krl commented May 20, 2015

Stacktrace:

[Error: non-zero exit code 2
  while running: ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/44582

  panic: runtime error: index out of range

goroutine 1 [running]:
github.com/ipfs/go-ipfs/commands/cli.parseArgs(0xc20811f160, 0x0, 0x1, 0xc20804e000, 0x11c3cc0, 0x2, 0x2, 0x0, 0x0, 0x0, ...)
    /home/krl/gopkg/src/github.com/ipfs/go-ipfs/commands/cli/parse.go:262 +0xd64
github.com/ipfs/go-ipfs/commands/cli.Parse(0xc20800a010, 0x3, 0x3, 0xc20804e000, 0x11c42c0, 0x0, 0x0, 0x421599, 0x0, 0x0, ...)
    /home/krl/gopkg/src/github.com/ipfs/go-ipfs/commands/cli/parse.go:44 +0x545
main.(*cmdInvocation).Parse(0xc20800b800, 0x7f6226e4dfd0, 0xc20811f0e0, 0xc20800a010, 0x3, 0x3, 0x0, 0x0)
    /home/krl/gopkg/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:224 +0x98
main.main()
    /home/krl/gopkg/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:103 +0x437

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 10 [chan receive]:
github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics.func·004()
    /home/krl/gopkg/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics/metrics.go:321 +0x80
created by github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics.init·1
    /home/krl/gopkg/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics/metrics.go:328 +0x76
]
@chriscool
Copy link
Contributor

Yeah, this is also a stdin related bug in the parser, as it can be reproduced with:

echo stuff | while read line; do ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080; done

or:

echo ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080 | bash

@chriscool
Copy link
Contributor

Closing this as it is fixed by #1263.

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

2 participants