coreos/fleet — pull request #546 by jonboulle (2014-06-17 23:41:08+00:00)
Title: fleetctl v0.3.2: panic: runtime error: index out of range

```console
$ fleetctl --strict-host-key-checking=false load builder/systemd/*.service
panic: runtime error: index out of range

goroutine 1 [running]:
runtime.panic(0x30b180, 0x770b57)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/runtime/panic.c:266 +0xb6
github.com/coreos/fleet/unit.deserializeUnitLine(0xc210064c89, 0xc, 0xc210064c89, 0xc, 0x0, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/unit/file.go:92 +0x4cd
github.com/coreos/fleet/unit.deserializeUnitFile(0xc210064b00, 0x51b, 0x1)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/unit/file.go:80 +0x533
github.com/coreos/fleet/unit.NewUnit(0xc210064b00, 0x51b, 0x71b)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/unit/file.go:19 +0x31
main.getUnitFromFile(0x7fff5fbffb47, 0x24, 0x14, 0x0, 0x0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/fleetctl/fleetctl.go:259 +0x1de
main.lazyCreateJobs(0xc21000a030, 0x1, 0x1, 0xc210044a00, 0xc210044db0, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/fleetctl/fleetctl.go:378 +0x3d5
main.runLoadUnits(0xc21000a030, 0x1, 0x1, 0x0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/fleetctl/load.go:26 +0x68
main.main()
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/fleetctl/fleetctl.go:177 +0x772

goroutine 3 [chan receive]:
github.com/coreos/fleet/third_party/github.com/golang/glog.(*loggingT).flushDaemon(0x775ee0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/golang/glog/glog.go:839 +0x50
created by github.com/coreos/fleet/third_party/github.com/golang/glog.init·1
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/golang/glog/glog.go:406 +0x276

goroutine 5 [syscall]:
runtime.goexit()
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/runtime/proc.c:1394

goroutine 9 [IO wait]:
net.runtime_pollWait(0x8d0910, 0x72, 0x0)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc210047530, 0x72, 0x8cf2a8, 0x23)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc210047530, 0x23, 0x8cf2a8)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc2100474d0, 0xc21007f000, 0x1000, 0x1000, 0x0, ...)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210000570, 0xc21007f000, 0x1000, 0x1000, 0xb8bba0, ...)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/net.go:122 +0xc5
bufio.(*Reader).fill(0xc2100383c0)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Read(0xc2100383c0, 0xc2100c7120, 0x5, 0x5, 0x5, ...)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/bufio/bufio.go:159 +0x1a4
io.ReadAtLeast(0x8d0f08, 0xc2100383c0, 0xc2100c7120, 0x5, 0x5, ...)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/io/io.go:288 +0xf6
io.ReadFull(0x8d0f08, 0xc2100383c0, 0xc2100c7120, 0x5, 0x5, ...)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/io/io.go:306 +0x71
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*streamPacketCipher).readPacket(0xc2100c7100, 0xc20000000e, 0x8d0f08, 0xc2100383c0, 0x107, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/cipher.go:143 +0xa4
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*connectionState).readPacket(0xc2100767e0, 0xc2100383c0, 0x14ea0, 0xc2100bd240, 0xc210081130, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/transport.go:110 +0x74
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*transport).readPacket(0xc2100767e0, 0xc2100f4b40, 0x107, 0x0, 0x0, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/transport.go:106 +0x3a
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*handshakeTransport).readOnePacket(0xc21006d0f0, 0xc210081000, 0xc2100f4b40, 0x107, 0x107, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/handshake.go:158 +0x97
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*handshakeTransport).readLoop(0xc21006d0f0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/handshake.go:138 +0x27
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.newClientTransport
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/handshake.go:101 +0xee

goroutine 15 [chan receive]:
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/agent.func·002()
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/agent/forward.go:38 +0x45
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/agent.ForwardToAgent
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/agent/forward.go:49 +0x150

goroutine 10 [chan receive]:
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*handshakeTransport).readPacket(0xc21006d0f0, 0xc2100f4b40, 0x107, 0x107, 0x0, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/handshake.go:129 +0x34
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*mux).onePacket(0xc210047e00, 0x0, 0x0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/mux.go:220 +0x3a
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*mux).loop(0xc210047e00)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/mux.go:195 +0x3e
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.newMux
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/mux.go:124 +0x118

goroutine 11 [chan receive]:
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*Client).handleGlobalRequests(0xc21007c6c0, 0xc2100467e0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:130 +0x3a
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.NewClient
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:53 +0xbb

goroutine 12 [chan receive]:
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*Client).handleChannelOpens(0xc21007c6c0, 0xc2100619a0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:139 +0x45
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.NewClient
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:54 +0xdf

goroutine 13 [semacquire]:
sync.runtime_Syncsemacquire(0xc21007c690)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/runtime/sema.goc:257 +0xca
sync.(*Cond).Wait(0xc21007c680)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/sync/cond.go:62 +0x89
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*mux).Wait(0xc210047e00, 0x0, 0x0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/mux.go:109 +0x8d
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.func·003()
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:56 +0x37
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.NewClient
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:58 +0x10c

goroutine 14 [chan receive]:
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*forwardList).handleChannels(0xc21007c6d0, 0xc210061b00)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/tcpip.go:157 +0x45
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.NewClient
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/client.go:59 +0x15e

goroutine 19 [chan receive]:
github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.DiscardRequests(0xc2100468c0)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/connection.go:81 +0x3a
created by github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh.(*Client).dial
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/third_party/code.google.com/p/gosshnew/ssh/tcpip.go:328 +0x162

goroutine 20 [runnable]:
net/http.(*persistConn).readLoop(0xc2100c7200)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/http/transport.go:778 +0x68f
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/http/transport.go:528 +0x607

goroutine 21 [select]:
net/http.(*persistConn).writeLoop(0xc2100c7200)
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/http/transport.go:791 +0x271
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.2.1/libexec/src/pkg/net/http/transport.go:529 +0x61e
```

This may be a manifestation of #394, but it appears that commit made it into 0.3.0, so I'm wondering if the issue isn't fixed.

```console
$ fleetctl -version
fleetctl version 0.3.2
```

```console
$ git tag --contains 397b8675ba79f9f9c7191233a67bdb163c728a70
v0.3.0
v0.3.0-rc.1
v0.3.0-rc.2
v0.3.0-rc.3
v0.3.1
v0.3.1-rc.1
v0.3.1-rc.2
v0.3.2
v0.3.3
v0.4.0
v0.5.0
```