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

Linux: panic: runtime error: invalid memory address or nil pointer dereference #38

Closed
moul opened this issue Oct 6, 2015 · 0 comments
Closed
Labels

Comments

@moul
Copy link
Owner

moul commented Oct 6, 2015

root@ssh:~# ssh2docker
INFO[0000] Listening on ":2222"
INFO[0014] NewClient (0): User="armbuild/alpine", ClientVersion="5353482d322e302d4f70656e5353485f362e377031205562756e74752d357562756e747531"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0xc6438]

goroutine 7 [running]:
github.com/moul/ssh2docker.(*Client).HandleChannelRequests.func1(0x10752000, 0xb64fc858, 0x10728b80, 0x10739fc0)
        /go/src/github.com/moul/ssh2docker/client.go:136 +0x658
created by github.com/moul/ssh2docker.(*Client).HandleChannelRequests
        /go/src/github.com/moul/ssh2docker/client.go:228 +0x44

goroutine 1 [IO wait]:
net.runtime_pollWait(0xb64fc458, 0x72, 0x106100b0)
        /usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0x106ab9f8, 0x72, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:73 +0x34
net.(*pollDesc).WaitRead(0x106ab9f8, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:78 +0x30
net.(*netFD).accept(0x106ab9c0, 0x0, 0xb64fc518, 0x106a7a20)
        /usr/local/go/src/net/fd_unix.go:408 +0x21c
net.(*TCPListener).AcceptTCP(0x1060a488, 0x10645b4c, 0x0, 0x0)
        /usr/local/go/src/net/tcpsock_posix.go:254 +0x4c
net.(*TCPListener).Accept(0x1060a488, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/tcpsock_posix.go:264 +0x34
main.Action(0x1067a100)
        /go/src/github.com/moul/ssh2docker/cmd/ssh2docker/main.go:162 +0x75c
github.com/moul/ssh2docker/vendor/github.com/codegangsta/cli.(*App).Run(0x106663f0, 0x1060a0e0, 0x1, 0x1, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/github.com/codegangsta/cli/app.go:164 +0xac8
main.main()
        /go/src/github.com/moul/ssh2docker/cmd/ssh2docker/main.go:104 +0x784

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/local/go/src/runtime/asm_arm.s:1036 +0x4

goroutine 5 [chan receive]:
github.com/moul/ssh2docker.(*Client).HandleChannels(0x10752000, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/client.go:82 +0x50
github.com/moul/ssh2docker.(*Server).Handle(0x10650480, 0xb64fc530, 0x1060a4b0, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/server.go:77 +0x238
created by main.Action
        /go/src/github.com/moul/ssh2docker/cmd/ssh2docker/main.go:167 +0x920

goroutine 6 [IO wait]:
net.runtime_pollWait(0xb64fc3e0, 0x72, 0x106100b0)
        /usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0x106abb38, 0x72, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:73 +0x34
net.(*pollDesc).WaitRead(0x106abb38, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:78 +0x30
net.(*netFD).Read(0x106abb00, 0x1068b000, 0x1000, 0x1000, 0x0, 0xb64f7030, 0x106100b0)
        /usr/local/go/src/net/fd_unix.go:232 +0x1c4
net.(*conn).Read(0x1060a4b0, 0x1068b000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/net.go:172 +0xc8
bufio.(*Reader).fill(0x106af3b0)
        /usr/local/go/src/bufio/bufio.go:97 +0x1c4
bufio.(*Reader).Read(0x106af3b0, 0x10733b70, 0x5, 0x5, 0x20, 0x0, 0x0)
        /usr/local/go/src/bufio/bufio.go:207 +0x22c
io.ReadAtLeast(0xb54b7000, 0x106af3b0, 0x10733b70, 0x5, 0x5, 0x5, 0x0, 0x0, 0x0)
        /usr/local/go/src/io/io.go:298 +0xdc
io.ReadFull(0xb54b7000, 0x106af3b0, 0x10733b70, 0x5, 0x5, 0x1074a1a0, 0x0, 0x0)
        /usr/local/go/src/io/io.go:316 +0x5c
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*streamPacketCipher).readPacket(0x10733b60, 0xa, 0xb54b7000, 0x106af3b0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/cipher.go:142 +0x88
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*connectionState).readPacket(0x10698ab0, 0x106af3b0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/transport.go:111 +0xb8
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*transport).readPacket(0x10698ab0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/transport.go:107 +0x4c
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*handshakeTransport).readOnePacket(0x10698b40, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/handshake.go:165 +0xcc
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*handshakeTransport).readLoop(0x10698b40)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/handshake.go:145 +0x1c
created by github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.newServerTransport
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/handshake.go:120 +0x294

goroutine 18 [chan receive]:
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*handshakeTransport).readPacket(0x10698b40, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/handshake.go:136 +0x5c
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*mux).onePacket(0x10748140, 0x0, 0x0)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/mux.go:224 +0x48
github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.(*mux).loop(0x10748140)
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/mux.go:199 +0x30
created by github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh.newMux
        /go/src/github.com/moul/ssh2docker/vendor/golang.org/x/crypto/ssh/mux.go:128 +0x224

goroutine 19 [chan receive]:
github.com/moul/ssh2docker.(*Client).HandleRequests.func1(0x107480c0)
        /go/src/github.com/moul/ssh2docker/client.go:70 +0x48
created by github.com/moul/ssh2docker.(*Client).HandleRequests
        /go/src/github.com/moul/ssh2docker/client.go:76 +0x3c
root@ssh:~#
@moul moul added the bug label Oct 6, 2015
@moul moul closed this as completed in f32315c Oct 7, 2015
moul added a commit that referenced this issue Oct 7, 2015
Fix runtime error on Linux (fix #38)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant