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

1.0.0-beta1: runtime error on db-tunnel #93

Closed
mweirauch opened this Issue Mar 8, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@mweirauch
  • Windows7-64bit
  • tried 32bit and 64bit precompiled binaries
  • tried ZOC, mobaXterm and ssh CLI
  • as soon as the password is entered "scalingo db-tunnel" (running in a git-bash terminal) crashes

Here's the full stack trace:

Building tunnel to
You can access your database on '127.0.0.1:50888'
Connect to [1]
Connect to [2]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x14 pc=0x474d0f]

goroutine 27 [running]:
io.Copy(0x314548, 0x1258d270, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Go/src/io/io.go:362 +0x17f
net.genericReadFrom(0x313658, 0x1258c3d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Go/src/net/net.go:404 +0x92
net.(*TCPConn).ReadFrom(0x1258c3d0, 0x0, 0x0, 0x314530, 0x1258c3d0, 0x0, 0x0)
C:/Go/src/net/tcpsock_posix.go:72 +0xbc
io.Copy(0x313658, 0x1258c3d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Go/src/io/io.go:358 +0xf4
github.com/Scalingo/cli/db.func┬À001()
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:127 +0x8c
created by github.com/Scalingo/cli/db.handleConnToTunnel
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:130 +0x2e2

goroutine 1 [semacquire]:
sync.(_WaitGroup).Wait(0x908630)
C:/Go/src/sync/waitgroup.go:132 +0x13e
github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar.Wait()
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar/rollbar.go:161 +0x2a
github.com/Scalingo/cli/cmd.errorQuit(0x314478, 0x1260c060)
C:/Gopath/src/github.com/Scalingo/cli/cmd/error.go:71 +0x1cf
github.com/Scalingo/cli/cmd.func┬À009(0x12596460)
C:/Gopath/src/github.com/Scalingo/cli/cmd/db-tunnel.go:66 +0x1b8
github.com/Scalingo/cli/Godeps/_workspace/src/github.com/Scalingo/codegangsta-cli.Command.Run(0x7513f8, 0x9, 0x0, 0x0, 0x7b9388, 0x36, 0x7f8168, 0x533, 0x75b658, 0xe, ...)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/github.com/Scalingo/codegangsta-cli/command.go:105 +0xb4f
github.com/Scalingo/cli/Godeps/_workspace/src/github.com/Scalingo/codegangsta-cli.(_App).Run(0x12596000, 0x125742d0, 0x5, 0x5, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/github.com/Scalingo/codegangsta-cli/app.go:165 +0xbb1
main.main()
C:/Gopath/src/github.com/Scalingo/cli/scalingo/main.go:93 +0x75f

goroutine 5 [select]:
net/http.(_Transport).getConn(0x125961c0, 0x125f2930, 0x0, 0x79da88, 0x5, 0x125dec40, 0x13, 0x0, 0x0, 0x0)
C:/Go/src/net/http/transport.go:525 +0x4d2
net/http.(_Transport).RoundTrip(0x125961c0, 0x125f2930, 0x1260c780, 0x0, 0x0)
C:/Go/src/net/http/transport.go:228 +0x3bb
net/http.send(0x125f2930, 0x3120f0, 0x125961c0, 0x23, 0x0, 0x0)
C:/Go/src/net/http/client.go:219 +0x3b8
net/http.(_Client).send(0x908790, 0x125f2930, 0x23, 0x0, 0x0)
C:/Go/src/net/http/client.go:142 +0xf8
net/http.(_Client).doFollowingRedirects(0x908790, 0x125f2930, 0x7f11e0, 0x0, 0x0, 0x0)
C:/Go/src/net/http/client.go:367 +0x91f
net/http.(*Client).Post(0x908790, 0x79da88, 0x23, 0x76c598, 0x10, 0x3144f8, 0x125de2c0, 0x708f00, 0x0, 0x0)
C:/Go/src/net/http/client.go:441 +0xcb
net/http.Post(0x79da88, 0x23, 0x76c598, 0x10, 0x3144f8, 0x125de2c0, 0x0, 0x0, 0x0)
C:/Go/src/net/http/client.go:426 +0x6a
github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar.post(0x125ec880)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar/rollbar.go:296 +0x212
github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar.func┬À001()
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar/rollbar.go:75 +0x63
created by github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar.init┬À1
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/github.com/stvp/rollbar/rollbar.go:78 +0x59

goroutine 26 [chan send]:
github.com/Scalingo/cli/db.handleConnToTunnel(0x1260c030, 0x125be080, 0x3125b8, 0x1258c2c8, 0x125be440)
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:120 +0x1fe
created by github.com/Scalingo/cli/db.Tunnel
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:99 +0xcf0

goroutine 7 [syscall, 2 minutes]:
os/signal.loop()
C:/Go/src/os/signal/signal_unix.go:21 +0x21
created by os/signal.init┬À1
C:/Go/src/os/signal/signal_unix.go:27 +0x34

goroutine 8 [chan receive, 2 minutes]:
github.com/Scalingo/cli/signals.Handle()
C:/Gopath/src/github.com/Scalingo/cli/signals/handler.go:17 +0x1c3
created by main.main
C:/Gopath/src/github.com/Scalingo/cli/scalingo/main.go:81 +0x65a

goroutine 18 [IO wait]:
net.(_pollDesc).Wait(0x125a21b0, 0x72, 0x0, 0x0)
C:/Go/src/net/fd_poll_runtime.go:84 +0x42
net.(_ioSrv).ExecIO(0x1258c788, 0x125a2118, 0x742cf8, 0x7, 0x7f1164, 0x0, 0x0, 0x0)
C:/Go/src/net/fd_windows.go:188 +0x265
net.(_netFD).Read(0x125a20e0, 0x12608000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
C:/Go/src/net/fd_windows.go:470 +0x11a
net.(_conn).Read(0x1258c3a8, 0x12608000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
C:/Go/src/net/net.go:121 +0xba
bufio.(_Reader).fill(0x1260d410)
C:/Go/src/bufio/bufio.go:97 +0x15c
bufio.(_Reader).Read(0x1260d410, 0x12610490, 0x5, 0x5, 0x0, 0x0, 0x0)
C:/Go/src/bufio/bufio.go:174 +0x1c0
io.ReadAtLeast(0x3136f0, 0x1260d410, 0x12610490, 0x5, 0x5, 0x5, 0x0, 0x0, 0x0)
C:/Go/src/io/io.go:298 +0xb2
io.ReadFull(0x3136f0, 0x1260d410, 0x12610490, 0x5, 0x5, 0x300008, 0x0, 0x0)
C:/Go/src/io/io.go:316 +0x5c
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_streamPacketCipher).readPacket(0x12610480, 0x7, 0x3136f0, 0x1260d410, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/cipher.go:137 +0xbb
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_connectionState).readPacket(0x125926c0, 0x1260d410, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/transport.go:110 +0xbc
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_transport).readPacket(0x125926c0, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/transport.go:106 +0x5d
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_handshakeTransport).readOnePacket(0x12592750, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/handshake.go:153 +0xcc
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(*handshakeTransport).readLoop(0x12592750)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/handshake.go:133 +0x28
created by github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.newClientTransport
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/handshake.go:101 +0xfb

goroutine 29 [runnable]:
net/http.func┬À019()
C:/Go/src/net/http/transport.go:519
created by net/http.(*Transport).getConn
C:/Go/src/net/http/transport.go:522 +0x298

goroutine 28 [runnable]:
github.com/Scalingo/cli/db.func┬À002()
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:132
created by github.com/Scalingo/cli/db.handleConnToTunnel
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:136 +0x36c

goroutine 19 [chan receive]:
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_handshakeTransport).readPacket(0x12592750, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/handshake.go:124 +0x7b
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_mux).onePacket(0x125be340, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/mux.go:224 +0x51
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(*mux).loop(0x125be340)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/mux.go:199 +0x3b
created by github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.newMux
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/mux.go:128 +0x173

goroutine 20 [chan receive]:
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(*Client).handleGlobalRequests(0x1260c030, 0x125be240)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:137 +0x48
created by github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.NewClient
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:54 +0xef

goroutine 21 [chan receive]:
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(*Client).handleChannelOpens(0x1260c030, 0x125be140)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:146 +0x5a
created by github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.NewClient
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:55 +0x10e

goroutine 22 [semacquire]:
sync.(_Cond).Wait(0x125ec1c0)
C:/Go/src/sync/cond.go:62 +0x88
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(_mux).Wait(0x125be340, 0x0, 0x0)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/mux.go:110 +0x9a
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.func┬À003()
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:57 +0x3f
created by github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.NewClient
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:59 +0x150

goroutine 23 [chan receive]:
github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.(*forwardList).handleChannels(0x1260c038, 0x125be380)
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/tcpip.go:178 +0x5a
created by github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh.NewClient
C:/Gopath/src/github.com/Scalingo/cli/Godeps/_workspace/src/golang.org/x/crypto/ssh/client.go:60 +0x194

goroutine 24 [chan send]:
github.com/Scalingo/cli/db.startIDGenerator()
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:145 +0x47
created by github.com/Scalingo/cli/db.Tunnel
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:86 +0xb69

goroutine 25 [semacquire]:
sync.(*WaitGroup).Wait(0x125ec940)
C:/Go/src/sync/waitgroup.go:132 +0x13e
github.com/Scalingo/cli/db.handleConnToTunnel(0x1260c030, 0x125be080, 0x3125b8, 0x1258c3d0, 0x125be440)
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:138 +0x37c
created by github.com/Scalingo/cli/db.Tunnel
C:/Gopath/src/github.com/Scalingo/cli/db/tunnel.go:99 +0xcf0

@Soulou

This comment has been minimized.

Show comment
Hide comment
@Soulou

Soulou Mar 8, 2015

Member

Thank you for the trace, could you tell me what is the command line you've tried ?

scalingo --app app_name db-tunnel name_of_the_environment_variable_containing_the_url
Member

Soulou commented Mar 8, 2015

Thank you for the trace, could you tell me what is the command line you've tried ?

scalingo --app app_name db-tunnel name_of_the_environment_variable_containing_the_url
@mweirauch

This comment has been minimized.

Show comment
Hide comment
@mweirauch

mweirauch Mar 8, 2015

scalingo -a (myappname) db-tunnel MONGO_URL

Or do you need the real app name? (I wouldn't yet wanna make it public as it's still in early development...)

scalingo -a (myappname) db-tunnel MONGO_URL

Or do you need the real app name? (I wouldn't yet wanna make it public as it's still in early development...)

@Soulou

This comment has been minimized.

Show comment
Hide comment
@Soulou

Soulou Mar 8, 2015

Member

No no, I don't need it, thank you, I'll come back to you soon.

Member

Soulou commented Mar 8, 2015

No no, I don't need it, thank you, I'll come back to you soon.

@Soulou

This comment has been minimized.

Show comment
Hide comment
@Soulou

Soulou Mar 8, 2015

Member

Hi again @mweirauch I got the bug. It is linked to variables aliases. (As you may have seen MONGO_URL is an alias to SCALINGO_MONGO_URL)

A fixed has been released in master and will be publish with the next beta. As a workaround, just run scalingo -a <yourapp> db-tunnel SCALINGO_MONGO_URL

Member

Soulou commented Mar 8, 2015

Hi again @mweirauch I got the bug. It is linked to variables aliases. (As you may have seen MONGO_URL is an alias to SCALINGO_MONGO_URL)

A fixed has been released in master and will be publish with the next beta. As a workaround, just run scalingo -a <yourapp> db-tunnel SCALINGO_MONGO_URL

@Soulou Soulou closed this in 0ec05a0 Mar 8, 2015

Soulou added a commit that referenced this issue Mar 8, 2015

Merge pull request #94 from Scalingo/db-tunnel-env-alias
Fix bug when building db-tunnel with an alias - Fixes #93
@mweirauch

This comment has been minimized.

Show comment
Hide comment

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment