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

session ls crashes server #50

Closed
cnf opened this issue Mar 4, 2018 · 7 comments
Closed

session ls crashes server #50

cnf opened this issue Mar 4, 2018 · 7 comments
Labels

Comments

@cnf
Copy link

cnf commented Mar 4, 2018

What happened:
typed session ls on the config> prompt, and the server crashed.

What you expected to happen:
to get a list of sessions.

How to reproduce it (as minimally and precisely as possible):
Run v1.7.1 in docker, create an admin user, type session ls

Anything else we need to know?:

config> info
Debug mode (server): false
Hostname: remote-access-sshportal-1
CPUs: 1
Demo mode: false
DB Driver: sqlite3
DB Conn: ./sshportal.db
Bind Address: :2222
System Time: 2018-03-04T16:01:29.11994402Z
OS Type: linux
OS Architecture: amd64
Go routines: 11
Go version (build): go1.9.2
Uptime: 2m34.699442174s
User ID: 1
User email: admin@sshportal
Version: 1.7.1
GIT SHA: 2555c478b484c6b420c586c2c2a53b22445e3f7f
GIT Branch: HEAD
GIT Tag: v1.7.1

installed in docker

** Tracebacks**:

2018/03/04 16:02:15 info: shell session  {"args":["ls"],"interactive":true}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x7975fb]

goroutine 140 [running]:
main.shell.func41(0xc420547760, 0x0, 0xc420547760)
	/go/src/github.com/moul/sshportal/shell.go:1886 +0x61b
github.com/moul/sshportal/vendor/github.com/urfave/cli.HandleAction(0x91de20, 0xc4202291d0, 0xc420547760, 0xc42004d600, 0x0)
	/go/src/github.com/moul/sshportal/vendor/github.com/urfave/cli/app.go:502 +0xd2
github.com/moul/sshportal/vendor/github.com/urfave/cli.Command.Run(0x99b2ca, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9a36cf, 0xe, 0x0, ...)
	/go/src/github.com/moul/sshportal/vendor/github.com/urfave/cli/command.go:210 +0xaad
github.com/moul/sshportal/vendor/github.com/urfave/cli.(*App).RunAsSubcommand(0xc4200f0a80, 0xc4205474a0, 0x0, 0x0)
	/go/src/github.com/moul/sshportal/vendor/github.com/urfave/cli/app.go:383 +0xad7
github.com/moul/sshportal/vendor/github.com/urfave/cli.Command.startApp(0x99f15b, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9a4b23, 0x10, 0x0, ...)
	/go/src/github.com/moul/sshportal/vendor/github.com/urfave/cli/command.go:298 +0x944
github.com/moul/sshportal/vendor/github.com/urfave/cli.Command.Run(0x99f15b, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9a4b23, 0x10, 0x0, ...)
	/go/src/github.com/moul/sshportal/vendor/github.com/urfave/cli/command.go:98 +0x136a
github.com/moul/sshportal/vendor/github.com/urfave/cli.(*App).Run(0xc4200f0700, 0xc4202fb320, 0x3, 0x3, 0x0, 0x0)
	/go/src/github.com/moul/sshportal/vendor/github.com/urfave/cli/app.go:259 +0x740
main.shell(0xe14280, 0xc420265d90, 0xc4200ecbb8, 0x5)
	/go/src/github.com/moul/sshportal/shell.go:1935 +0x59d7
main.shellHandler(0xe14280, 0xc420265d90)
	/go/src/github.com/moul/sshportal/ssh.go:211 +0x696
github.com/moul/sshportal/vendor/github.com/gliderlabs/ssh.(*session).handleRequests.func1(0xc420265d90)
	/go/src/github.com/moul/sshportal/vendor/github.com/gliderlabs/ssh/session.go:219 +0x3b
created by github.com/moul/sshportal/vendor/github.com/gliderlabs/ssh.(*session).handleRequests
	/go/src/github.com/moul/sshportal/vendor/github.com/gliderlabs/ssh/session.go:218 +0x216
@cnf
Copy link
Author

cnf commented Mar 7, 2018

Still happens with the :latest tag on docker hub as of this evening.

@adyxax
Copy link

adyxax commented Mar 22, 2018

This was fixed in (#54) by @jle64.

@jle64
Copy link
Contributor

jle64 commented Mar 22, 2018

@adyxax : I'm not sure of this, my stacktrace was different than this one that's why I didn't link the PR #54 to this issue.

@moul moul added the bug label Apr 3, 2018
@moul
Copy link
Owner

moul commented Apr 3, 2018

I just gave a new trial and cannot reproduce the error,

By reading the stack trace, I noticed the version running while you created the post is not up to date:

	/go/src/github.com/moul/sshportal/shell.go:1886 +0x61b

-> https://github.com/moul/sshportal/blob/master/shell.go#L1886


Can you double-check that you are using the latest version (maybe flush some cache before) and try again?

If you still have the error, I would love some more context or an updated stack trace

@cnf
Copy link
Author

cnf commented Apr 25, 2018

just checked with 1.8.0+dev, and session ls works now

@cnf
Copy link
Author

cnf commented May 3, 2018

and now i get

config> session ls
error: too many SQL variables

@moul
Copy link
Owner

moul commented Sep 15, 2020

Closing the issue as I plan to work on the v2 of this project and I need to make some cleanup in the issues see #210

@moul moul closed this as completed Sep 15, 2020
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

4 participants