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

panic: Mutex bug somewhere #166

Closed
shazow opened this issue Aug 3, 2016 · 2 comments
Closed

panic: Mutex bug somewhere #166

shazow opened this issue Aug 3, 2016 · 2 comments

Comments

@shazow
Copy link
Owner

shazow commented Aug 3, 2016

Running the v1.2 tag:

^Apanic: runtime error: index out of range
        panic: sync: unlock of unlocked mutex

goroutine 2760 [running]:
panic(0x774180, 0xc420446580)
        /usr/local/Cellar/go/1.7rc1/libexec/src/runtime/panic.go:500 +0x1a1
sync.(*Mutex).Unlock(0xc420212d90)
        /usr/local/Cellar/go/1.7rc1/libexec/src/sync/mutex.go:111 +0x104
panic(0x7945e0, 0xc42000e0e0)
        /usr/local/Cellar/go/1.7rc1/libexec/src/runtime/panic.go:458 +0x243
github.com/shazow/ssh-chat.(*Host).AutoCompleteFunction.func1(0xc42041f3b0, 0x49, 0x0, 0xc400000009, 0x49, 0xc42041f3b0, 0x49, 0x593d19)
        /Users/shazow/local/go/src/github.com/shazow/ssh-chat/host.go:222 +0x4b5
golang.org/x/crypto/ssh/terminal.(*Terminal).handleKey(0xc420212d80, 0x9, 0x100, 0x0, 0x9)
        /Users/shazow/local/go/src/golang.org/x/crypto/ssh/terminal/terminal.go:546 +0x585
golang.org/x/crypto/ssh/terminal.(*Terminal).readLine(0xc420212d80, 0x8340b0, 0xc420212d90, 0xc420452e30, 0xc420452e20)
        /Users/shazow/local/go/src/golang.org/x/crypto/ssh/terminal/terminal.go:707 +0x173
golang.org/x/crypto/ssh/terminal.(*Terminal).ReadLine(0xc420212d80, 0x0, 0x0, 0x0, 0x0)
        /Users/shazow/local/go/src/golang.org/x/crypto/ssh/terminal/terminal.go:664 +0xa4
github.com/shazow/ssh-chat.(*Host).Connect(0xc420102500, 0xc420212d80)
        /Users/shazow/local/go/src/github.com/shazow/ssh-chat/host.go:135 +0x431
github.com/shazow/ssh-chat.(*Host).Connect-fm(0xc420212d80)
        /Users/shazow/local/go/src/github.com/shazow/ssh-chat/host.go:185 +0x34
github.com/shazow/ssh-chat/sshd.(*SSHListener).Serve.func1(0xc4200fe330, 0x9bb860, 0xc420022558)
        /Users/shazow/local/go/src/github.com/shazow/ssh-chat/sshd/net.go:64 +0x69
created by github.com/shazow/ssh-chat/sshd.(*SSHListener).Serve
        /Users/shazow/local/go/src/github.com/shazow/ssh-chat/sshd/net.go:65 +0xac
shazow added a commit that referenced this issue Aug 3, 2016
Also added mutex for user replyTo pointer, since that's being set by
both the host and user.
@shazow
Copy link
Owner Author

shazow commented Aug 3, 2016

Autocomplete is disabled on the chat2 server until this is fixed.

@shazow
Copy link
Owner Author

shazow commented Aug 3, 2016

This can be reproduced with Autocomplete enabled by running a server, joining with at least one user, then running cat /dev/urandom | ssh ... a few times.

shazow added a commit that referenced this issue Aug 3, 2016
@shazow shazow closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant