jesseduffield / jesseduffield/lazydocker

Crash on lazydocker view switching

Open
#585 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
While using lazydocker connected to my production box through ssh there are random crashes

**To Reproduce**
Steps to reproduce the behavior:
Change views rapidly while being on a ssh tunnel to docker

**Expected behaviour**
Not crash :)
**Screenshots**

```
POTENTIAL DEADLOCK: Inconsistent locking. saw this ordering in one goroutine:
happened before
pkg/tasks/tasks.go:66 tasks.(*TaskManager).NewTask.func1 { t.waitingMutex.Lock() } <<<<<
pkg/tasks/tasks.go:65 tasks.(*TaskManager).NewTask.func1 { }

happened after
pkg/gui/focus.go:133 gui.(*Gui).currentSideViewName { gui.Mutexes.ViewStackMutex.Lock() } <<<<<
pkg/gui/focus.go:132 gui.(*Gui).currentSideViewName { func (gui *Gui) currentSideViewName() string { }
pkg/gui/window.go:14 gui.(*Gui).currentSideWindowName { func (gui *Gui) currentSideWindowName() string { }
pkg/gui/window.go:14 gui.(*Gui).currentSideWindowName { func (gui *Gui) currentSideWindowName() string { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:74 boxlayout.ArrangeWindows { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:55 boxlayout.ArrangeWindows { func ArrangeWindows(root *Box, x0, y0, width, height int) map[string]Dimensions { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:83 boxlayout.ArrangeWindows { if direction == COLUMN { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:88 boxlayout.ArrangeWindows { }
pkg/gui/arrangement.go:63 gui.(*Gui).getWindowDimensions { }
pkg/gui/layout.go:68 gui.(*Gui).layout { // we assume that the view has already been created. }
vendor/github.com/jesseduffield/gocui/gui.go:706 gocui.ManagerFunc.Layout { func (f ManagerFunc) Layout(g *Gui) error { }
vendor/github.com/jesseduffield/gocui/gui.go:1152 gocui.(*Gui).flush { for _, m := range g.managers { }
vendor/github.com/jesseduffield/gocui/gui.go:783 gocui.(*Gui).processEvent { } }
vendor/github.com/jesseduffield/gocui/gui.go:748 gocui.(*Gui).MainLoop { for { }
pkg/gui/gui.go:275 gui.(*Gui).Run { err = g.MainLoop() }
main.go:84 main.main { }
pkg/app/app.go:58 app.(*App).Run { func (app *App) Run() error { }
/usr/lib/go/src/internal/runtime/atomic/types.go:193 atomic.(*Uint32).Load { func (u *Uint32) Load() uint32 { }

in another goroutine: happened before
pkg/gui/focus.go:133 gui.(*Gui).currentSideViewName { gui.Mutexes.ViewStackMutex.Lock() } <<<<<
pkg/gui/focus.go:132 gui.(*Gui).currentSideViewName { func (gui *Gui) currentSideViewName() string { }
pkg/gui/window.go:14 gui.(*Gui).currentSideWindowName { func (gui *Gui) currentSideWindowName() string { }
pkg/gui/window.go:14 gui.(*Gui).currentSideWindowName { func (gui *Gui) currentSideWindowName() string { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:74 boxlayout.ArrangeWindows { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:55 boxlayout.ArrangeWindows { func ArrangeWindows(root *Box, x0, y0, width, height int) map[string]Dimensions { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:83 boxlayout.ArrangeWindows { if direction == COLUMN { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:88 boxlayout.ArrangeWindows { }
pkg/gui/arrangement.go:63 gui.(*Gui).getWindowDimensions { }
pkg/gui/layout.go:68 gui.(*Gui).layout { // we assume that the view has already been created. }
vendor/github.com/jesseduffield/gocui/gui.go:706 gocui.ManagerFunc.Layout { func (f ManagerFunc) Layout(g *Gui) error { }
vendor/github.com/jesseduffield/gocui/gui.go:1152 gocui.(*Gui).flush { for _, m := range g.managers { }
vendor/github.com/jesseduffield/gocui/gui.go:783 gocui.(*Gui).processEvent { } }
vendor/github.com/jesseduffield/gocui/gui.go:748 gocui.(*Gui).MainLoop { for { }
pkg/gui/gui.go:275 gui.(*Gui).Run { err = g.MainLoop() }
main.go:84 main.main { }
pkg/app/app.go:58 app.(*App).Run { func (app *App) Run() error { }
/usr/lib/go/src/internal/runtime/atomic/types.go:193 atomic.(*Uint32).Load { func (u *Uint32) Load() uint32 { }

happened after
pkg/tasks/tasks.go:66 tasks.(*TaskManager).NewTask.func1 { t.waitingMutex.Lock() } <<<<<
pkg/tasks/tasks.go:65 tasks.(*TaskManager).NewTask.func1 { }

Other goroutines holding locks:
goroutine 2 lock 0xc00033472c
pkg/gui/focus.go:133 gui.(*Gui).currentSideViewName { gui.Mutexes.ViewStackMutex.Lock() } <<<<<
pkg/gui/focus.go:132 gui.(*Gui).currentSideViewName { func (gui *Gui) currentSideViewName() string { }
pkg/gui/window.go:14 gui.(*Gui).currentSideWindowName { func (gui *Gui) currentSideWindowName() string { }
pkg/gui/window.go:14 gui.(*Gui).currentSideWindowName { func (gui *Gui) currentSideWindowName() string { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:74 boxlayout.ArrangeWindows { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:55 boxlayout.ArrangeWindows { func ArrangeWindows(root *Box, x0, y0, width, height int) map[string]Dimensions { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:83 boxlayout.ArrangeWindows { if direction == COLUMN { }
vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go:88 boxlayout.ArrangeWindows { }
pkg/gui/arrangement.go:63 gui.(*Gui).getWindowDimensions { }
pkg/gui/layout.go:68 gui.(*Gui).layout { // we assume that the view has already been created. }
vendor/github.com/jesseduffield/gocui/gui.go:706 gocui.ManagerFunc.Layout { func (f ManagerFunc) Layout(g *Gui) error { }
vendor/github.com/jesseduffield/gocui/gui.go:1152 gocui.(*Gui).flush { for _, m := range g.managers { }
vendor/github.com/jesseduffield/gocui/gui.go:783 gocui.(*Gui).processEvent { } }
vendor/github.com/jesseduffield/gocui/gui.go:748 gocui.(*Gui).MainLoop { for { }
pkg/gui/gui.go:275 gui.(*Gui).Run { err = g.MainLoop() }
main.go:84 main.main { }
pkg/app/app.go:58 app.(*App).Run { func (app *App) Run() error { }
/usr/lib/go/src/internal/runtime/atomic/types.go:193 atomic.(*Uint32).Load { func (u *Uint32) Load() uint32 { }

exit status 2

```

**Desktop (please complete the following information):**
- OS: Linux
- Lazydocker Version
- The last commit id `1da548a29519b8a105b88c8c733ccde23c967dcd`

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.