Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Panic
To Reproduce
Steps to reproduce the behavior:
- $ lazygit
- Press
1 - Press
e - Close editor
Expected behavior
Program must work
Screenshots
~/w/udf $ lazygit
+ /bin/zsh -c hx -- "/Users/rrokker/Library/Application Support/lazygit/config.yml"
Press enter to return to lazygit
panic: gocui: userEvents channel full; refusing to block or reorder
goroutine 370 [running]:
github.com/jesseduffield/lazygit/pkg/gocui.(*Gui).Update(0x367bec2d01e0, 0x367bed01b440)
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gocui/gui.go:636 +0x80
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).onUIThread(...)
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gui/gui.go:1187
github.com/jesseduffield/lazygit/pkg/gui.(*guiCommon).OnUIThread(0x20?, 0x367bec5bf4e0)
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gui/gui_common.go:124 +0x7c
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*RefreshHelper).refreshView(...)
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gui/controllers/helpers/refresh_helper.go:1003
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*RefreshHelper).refreshStashEntries(0x367bec6a8960)
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gui/controllers/helpers/refresh_helper.go:960 +0x134
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*RefreshHelper).Refresh.func2.10()
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gui/controllers/helpers/refresh_helper.go:212 +0x20
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*RefreshHelper).Refresh.func2.1.1({0x367bec0b4000?, 0x33c85e994f60?})
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gui/controllers/helpers/refresh_helper.go:148 +0x24
github.com/jesseduffield/lazygit/pkg/gocui.(*Gui).onWorkerAux(0x367bec2d01e0, 0x40ec284000000000?, {0x101d65cf8?, 0x367bec7841c0?})
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gocui/gui.go:668 +0x68
github.com/jesseduffield/lazygit/pkg/gocui.(*Gui).OnWorker.func1()
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gocui/gui.go:655 +0x30
created by github.com/jesseduffield/lazygit/pkg/gocui.(*Gui).OnWorker in goroutine 1
/Users/rrokker/go/pkg/mod/github.com/jesseduffield/lazygit@v0.63.0/pkg/gocui/gui.go:654 +0x90
Version info:
- Run
lazygit --versionand paste the result here
$ lazygit --version
commit=, build date=, build source=unknown, version=unversioned, os=darwin, arch=arm64, git version=2.50.1 (Apple Git-155)
Terminal info:
What terminal are you using, and which version? For some types of bugs this information can be relevant.
Wave Terminal
Open-Source AI-Integrated Terminal
Built for Seamless Workflows
Client Version 0.14.5 (202604161535)
Update Channel: latest
Additional context
Add any other context about the problem here.
Note
Please try updating to the latest version or manually building the latest master to see if the issue still occurs.
Reacted by lurkydismal
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
stefanhaller commentedon Jul 8, 2026
Is this actually reproducible, or does it happen intermittently? If you do those four steps, does it happen every time? I'm asking because I can't reproduce it that way. (Even when setting my editor preset to vim so that it suspends to the terminal like yours did.)
I'm very interested in tracking this down; this was a change in 0.63 that I felt slightly uncomfortable with, so if there's any more information you can provide on this, that would be great.
Schuasda commentedon Jul 9, 2026
I have the same bug. I don't know exactly how I can reliably reproduce it, but i think it happens most often when changing views to/from staged files. Either by going up/down in the Files-panel or going left/right to other panels.
lazygit freezes for quite a while, maybe 1-2 minutes, then i get the same error with a similar stack trace
I am using windows terminal, with Powershell 7.6.3 (idk if relevant), on Windows 11
lazygit version
commit=ce5a8b61bdc9439f2137a1ce9c6a5981c412a0ad, build date=2026-07-04T12:45:51Z, build source=binaryRelease, version=0.63.0, os=windows, arch=amd64, git version=2.53.0.windows.2I did recently upgrade lazygit (i think from 0.62) and I don't remember seeing this crash happen before that
EDIT: I just realized that the original issue was specifically describing editing the config from panel[1]. This works fine in my case and i can not reproduce OP's bug.
console output after crash:
stefanhaller commentedon Jul 9, 2026
@Schuasda Is the freezing of 1-2 minutes also new with 0.63, or did you see this before too?
If the main thread blocks for such a long time, then I can see how the userEvents channel overflows easily. We refresh the Files panel every 10s, causing several user events to be posted to the userEvents channel, and if they can't be serviced by the main thread then you get the panic. I can reproduce this by adding a time.Sleep of a few minutes into a command handler.
This doesn't explain @rokkerruslan's scenario; we pause background refreshes when suspending to the terminal.
Schuasda commentedon Jul 9, 2026
I don't remember seeing it that often, but I also only recently switched 100% to using lazygit.
Do you have any idea of what causes the main thread to block for so long? Can I change something about my setup or assist you in finding the problem?
stefanhaller commentedon Jul 10, 2026
@rokkerruslan @Schuasda Here's a fix, can you please test this thoroughly: #5793. I'd like to release a patch update soon (Sunday or early next week).
No, this is not normal. You could run with
-debugand send the log, maybe it shows it.Schuasda commentedon Jul 13, 2026
I didn't get to it earlier, but today i pulled your PR and installed that version.
Unfortunately i quickly reproduced the same bug as before. Some additional findings I have:
I can quite reliably reproduce the bug by going to the branches pane and quickly going up/down through the branches. This first produces the bug I described in #5783 . When I then go back to the files pane (with some staged and some unstaged changes), I just need to go up/down the files list a bit and the whole GUI freezes, crashing to the console output we've seen before.
I ran
lazygit --debugas well this time, this was the output:lazygit --version:stefanhaller commentedon Jul 13, 2026
I can't believe this, assuming you mean the bug originally reported in this issue (i.e. the "userEvents channel full; refusing to block or reorder" panic). This code is no longer present in the branch you are testing.
Sorry for the deadlocks that you are running into; I'm fairly confident that those will be fixed in the next release. I've been making lots of changes to lazygit's concurrency system recently. Unfortunately I can't ship any of this as a v0.63.1 patch release, since the changes are too entangled with other stuff that has changed on master and that I can't release just yet.
Schuasda commentedon Jul 13, 2026
Ah sorry for the confusion. I think I saw the output again while still using the released 0.63.0 version.
With the PR, while not using the debug flag, lazygit just freezes. The way to reproduce the bug is still accurate though.
I just thought I had already installed the dev-version when I saw the output again. Sorry again
I think i can work with the released version, or actually simply rollback to 62. So the fixes will probably come with a v64 at some point?
rokkerruslan commentedon Jul 14, 2026
Sorry for the late reply. I reproduced the issue three times in a row before opening the issue. But now I can't, even though I'm using the same build.
I don't even know what to say, I was sure there was a bug :)
stefanhaller commentedon Jul 14, 2026
@Schuasda I pushed another commit to #5793 that should hopefully address the deadlocks you were seeing. Can you please test this? If it works, I might release a patch update later this week.
Schuasda commentedon Jul 14, 2026
To my eyes there seems no change, unfortunately. I hope I am doing the pull and manual install steps correctly ??
I do uninstall the normal version with winget (how I also installed it) and
lazygit --versionoutput seems logical to me:But i still get the deadlock error when running
lazygit --debug:Without debug flag it just freezes indefinitely (at least 20-30 minutes, after that I usually close the Terminal tab)
I don't know if my config is super weird for some reason, here it is for good measure:
lazygit/config.yml
stefanhaller commentedon Jul 14, 2026
@Schuasda Thanks for your patience testing this. I have pushed one more commit for you to try: daffec1.
Schuasda commentedon Jul 14, 2026
Who else is gonna do it, when I have this problem? :D
And I think it worked! I can jump around all panels and never make lazygit freeze up.
I am looking forward to the next release 😁
Fix userEvents panic (#5793)
stefanhaller commentedon Jul 15, 2026
Fixed by #5793