goneovim
goneovim copied to clipboard
Some time closing Goneovim take about 10 seconds
To reproduce just run and quit (by ':q') goneovim. Usually, quit does not take any time, but one time of 5-6 times goneovim window stays open about 10 seconds. Note, that edited file is closed, only window is opened. Debug log (goneovim --debug=...) goneovim_debug.log
@damanis Thanks for the report. I am experiencing this issue myself. It is not a high priority, but I will report any new findings in this issue.
Processes when goneovim run:
33544 ? Sl 0:00 /home/sergey/go/src/github.com/akiyosi/goneovim/cmd/goneovim/deploy/linux/goneovim --nofork
33554 ? S 0:00 /tmp/.mount_nvim4XvPGZ/usr/bin/nvim --cmd let g:gonvim_running=1 --cmd let g:goneovim=1 --cmd set termguicolors --cmd let
33557 ? Ssl 0:00 nvim --cmd let g:gonvim_running=1 --cmd let g:goneovim=1 --cmd set termguicolors --cmd let &rtp.=',/home/sergey/go/src/gi
33566 ? S 0:00 /tmp/.mount_nvimOE4lDW/usr/bin/nvim -u NONE -n --embed --headless
33569 ? Ssl 0:00 nvim -u NONE -n --embed --headless
33575 pts/2 R+ 0:00 ps ax
Processes after ':q'
33544 ? Sl 0:00 /home/sergey/go/src/github.com/akiyosi/goneovim/cmd/goneovim/deploy/linux/goneovim --nofork
33566 ? S 0:00 /tmp/.mount_nvimOE4lDW/usr/bin/nvim -u NONE -n --embed --headless
33569 ? Ssl 0:00 nvim -u NONE -n --embed --headless
33577 ? S 0:00 /lib/systemd/systemd-udevd
33580 pts/2 R+ 0:00 ps ax
gdb session closed while goneovim window isn't closed yet.
Inferior 1 (process 33613) exited normally]
(gdb) bt
No stack.
(gdb)
So, main thread is closed properly. Seems, some goroutine still run, isn't it?
@damanis Thanks. It is very helpful. It seems that the nvim process related to minimap viewer take long time for finishing. I will investigate based on the information
@akiyosi FYI: minimap is disabled in my configuration.
@damanis Hmmm, that is odd. If the minimap is disabled in settings.toml like this;
[MiniMap]
Disable = true
the nvim process will not start according to the minimap. But in your environment it does start?
I had commented out full MiniMap section. After set
[MiniMap]
Disable = true
the ps ax | grep nvim
output isn't changed.
Hmmm, that is weird. If minimap is disable, then goneovim only starts the main nvim. Does goneovim restart after changing the settings?
Sure.
There are processes started by 'goneovim .bashrc':
To be sure: settings.toml in ~/.config/goneovim?
@damanis Yes, the location of settings.toml is correct.
Why are there three processes associated with goneovim in the above image? Is it possible that a zombie process is included?
@akiyosi There are no zombie processes. Exactly these four processes were ran by bash command 'goneovim .bashrc'. Do you get another list?
@akiyosi
Oh, sorry, the parameter is 'Disable'... Now I changed it to 'Disable = true'.
@damanis
From the above image it appears that the process corresponding to minimap is no longer started.
However, it appears that two processes are still being started. This is not expected by goenovim.
It seems that nvim process under /tmp
is being started, is this something specific to your environment?
I'm using nvim.appimage. It same as docker and mount to /tmp some its parts. After I set
[MiniMap]
Disable = true
I didn't see the problem. Seems, it relates to minimap code.
Update
. I got the problem with disabled minimap. ps ax | grep nvim
output was empty (goneovim process still exists).
I don't know if this is same problem. Sometimes the nvim processes, like first two on screenshot below, stay exist after goneovim window is closed until killed manually.
@akiyosi I know why we have different 'ps ax' output when Goneovim runs. I used nvim.appimage - it runs more processes. After I installed nvim deb package only one nvim process started.
@damanis Thanks for the info! Ah, so appimage behaves that way. I was not familiar with how appimage works. It was a good learning experience.
Regarding the issue you originally reported about the hang for a few seconds at the end of goneovim, I will continue to investigate the insufficiency of the nvim process which is responsible for minimap when it exits. Has the problem occurred since then after disabling minimap?
@akiyosi Yes, I saw the problem with slow exit after disable minimap. Today I replaced appimage by deb package, so let's see if it will change something.
@akiyosi Today i got slow exit (one time).
Catch slow exit with minimap disabled: no nvim process, only goneovim process in 'ps ax' output.
@damanis Thanks for the info. I have looked into the code that may be the possible cause of this issue. However, this issue is not 100% reproducible, so if you would like to test it in your environment, I would be happy to do so. You can get the binaries corresponding to the fixed code at the following CI job.
https://github.com/akiyosi/goneovim/actions/runs/3113312704
@akiyosi I would test after I return from vacation. Next two weeks I will have Internet access, but no PC to check.
@damanis NP!. Enjoy your vacation :)
@akiyosi I'm testing provided image. The problem isn't seem yet; I'll update if it occurs. Or prefer take latest image?
@damanis Thanks for confirming! There is no need to use the latest image.
@akiyosi Last week I didn't see the slow exit. Will you merge the fix to master?
@damanis Thanks! I will merge the branch and also close this issue for now. If the issue occurs again, please re-open it.